Timeslice issues with preemption enabled
sebastian.huber at embedded-brains.de
Thu Jun 10 14:58:25 UTC 2021
On 10/06/2021 16:24, Gedare Bloom wrote:
>>> 5. Can anyone give some suggestions to solve the problem? thanks!
> Classic and POSIX APIs can be mixed. It is a poorly documented benefit
> of RTEMS. I think in this case, you should be able to use
> pthread_setschedparam(...) with passing policy == SCHED_RR to get the
> behavior you seek. You have to use posix priorities in the sched_param
> argument. though, or else your thread will have its priority changed.
> Pass the task_id instead of pthread_t as the first argument, and the
> rest should work itself out. Do let us know if that works or it
> doesn't work/you have more questions.
You can use these directives to convert priority values:
In general, the timeslicing based on clock tick quantum is quite coarse.
The internal timestamps would allow a much finer grained timeslicing.
This could be added if someone is interested in a small project.
embedded brains GmbH
Herr Sebastian HUBER
email: sebastian.huber at embedded-brains.de
phone: +49-89-18 94 741 - 16
fax: +49-89-18 94 741 - 08
Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
More information about the users