Timeslicing question

Kenneth Peters Kenneth.J.Peters at jpl.nasa.gov
Fri Oct 3 18:33:35 UTC 2003

I am willing to submit a PR and patch eventually, but it will take me a 
while to get around to doing the code nicely and learning how to submit it 
(3-6 months). For now I am just using my hacked function from outside the 
RTEMS library, since I  need to stick with the RTEMS-4.5.0 release with as 
few mods as possible.


At 01:21 PM 10/3/2003 -0500, you wrote:
>Kenneth Peters wrote:
>>What I have done as a quick fix is to take a copy of the Classic API
>>rtems_task_mode() function and modify it to
>>rtems_status_code my_rtems_task_mode(
>>   rtems_mode mode_set,
>>   rtems_mode mask,
>>   rtems_mode *previous_mode_set,
>>   boolean use_timeslice_exhaustion,
>>   boolean *previous_use_timeslice_exhaustion
>>and adjust the code appropriately so that a task can set itself to, in
>>effect, use the SCHED_RR methodology.

>I am open to adding another Classic API mode bit (or bits) which can be
>helped to make this scheduling mode available.
>I want the Classic API to promote out all core features when possible.  The
>Classic API Semaphore manager was enhanced to get access to priority
>inversion and ceiling -- which weren't even in the real-time lexicon when 
>were defined in the late 1980's.
>So feel free to file a PR with a patch to add this -- please also update 
>the documentation
>in the patch.  Doing that HAS to be easier than switching your application 
>to the
>Classic API.
>>Thanks for the help,
>>At 05:34 PM 10/2/2003 -0700, Kamen Penev wrote:
>> >Kenneth Peters wrote:
>> >
>> >>Ugh. Thanks for the quick reply. This is ugly, though, if I have to go
>> >>through and retrofit my task functions to the POSIX API.
>> >
>> >
>> >It is not that much work really. Follow the example that I gave at the end
>> >of the second thread. You don't have to change all your tasks to POSIX.
>> >Only the ones that need SCHED_RR. And you can still use classic
>> >semaphores, message queues etc. inside them.
>> >
>> >>Joel indicated maybe the pthread_setschedparam() function could be called
>> >>on a Classic API task to tweak the budget_algorithm parameter. If that
>> >>value is really the only thing I need to change, that would be a better
>> >>way for me. Has anyone tried that?
>> >
>> >It didn't work for me back then, as reported in:
>> >http://www.rtems.com/ml/rtems-users/2003/may/msg00158.html
>> >
>> >The bug may have been fixed, I don't know. Try pthread_setschedparam and
>> >see what happens.
>> >
>> >Kamen
>> >
>> >
>> >

More information about the users mailing list