View Single Post
  #5   Spotlight this post!  
Unread 09-08-2012, 19:46
RyanCahoon's Avatar
RyanCahoon RyanCahoon is offline
Disassembling my prior presumptions
FRC #0766 (M-A Bears)
Team Role: Engineer
 
Join Date: Dec 2007
Rookie Year: 2007
Location: Mountain View
Posts: 689
RyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond repute
Re: default behavior for thread overrun

Quote:
Originally Posted by Ether View Post
a thread overruns (is not finished when next scheduled)
Quote:
Originally Posted by Todd View Post
a task monitor in C++ that tracked task overrun and decided what to do when a task overran
Can you explain what you mean by task overrun? The way I would interpret that doesn't have any meaning in the context of a preemptive scheduler like VxWorks uses.

If you're looking for a way for multiple tasks of the same priority to share the processor (in C++), the docs say you can enable round-robin scheduling by using taskLib's kernelTimeSlice() function, which accepts the round-robin time-slice period as a parameter. Tasks always run if they have the highest task priority that is ready to run (as before), but after enabling round-robin, if you have multiple tasks at that priority, each task will be allowed to execute, in tern, until either its time slice has elapsed or the task blocks. You can can call taskDelay(NO_WAIT) if you want to place the current task at the end of the run queue without any delay.
__________________
FRC 2046, 2007-2008, Student member
FRC 1708, 2009-2012, College mentor; 2013-2014, Mentor
FRC 766, 2015-, Mentor