Timeslicing question

Kamen Penev kamen at penev.net
Thu Oct 2 23:32:30 UTC 2003


Ken,

What you want cannot be accomplished with the Classic API. You need to 
use the POSIX API and specify a SCHED_RR scheduling policy. This issue 
was discussed earlier in these threads:

http://www.rtems.com/ml/rtems-users/2003/may/msg00154.html
http://www.rtems.com/ml/rtems-users/2003/june/msg00019.html

Kamen

Kenneth Peters wrote:

> I am using rtems-4.5.0 with the erc32 BSP (slightly modified for my 
> board). I have a situation where there is a task of priority 99 and 
> two tasks of priority 100. Timeslicing and preemption are enabled.
>
> I have not completely traced what is happening, but it seems that 
> whichever priority 100 task gets in the priority 100 ready chain first 
> never gets timesliced out, since _Thread_Dispatch() after the priority 
> 99 task keeps resetting the priority 100 task's cpu_time_budget, so 
> _Thread_Reset_timeslice() never gets called to take the task off the 
> front of the priority 100 ready chain.
>
> Probably I am misunderstanding something, since this seems like a 
> simple task situation that should work. Setting different priorities 
> does not really accomplish what I need, and manual round-robin with 
> rtems_task_wake_after() does not seem to work right either (though I 
> expected that would at least get the tasks taking turns, it did not 
> seem to work. I am still looking into that).
>
> Any suggestions?
>
> Ken Peters
> Ken.Peters at jpl.nasa.gov
>
>
>





More information about the users mailing list