[LITMUS^RT] Question about Litmus-RT yields CPU when finished with a task

Meng Xu xumengpanda at gmail.com
Sun May 29 02:02:05 CEST 2016


Hi Victor,

On Sat, May 28, 2016 at 5:36 PM, Yu-An(Victor) Chen <chen116 at usc.edu> wrote:
> Hi,
>
> My question is how does litmus-RT kernel give up CPUs when running a task?
> Given a period and execution time of a task, will litmus-RT kernel yields
> the CPU as soon as a task is finished? or will give up the CPU only when the
> task's period is reached?

IIRC, when a task finishes its execution (or budget) or get blocked,
the task will yield CPU. The scheduler will schedule the next ready
task. You can have a look at the schedule and _finish function in
litmus/sched_gsn_edf.c. It will deschedule a task if it finishes its
execution.

>
> For example, lets say I have two tasks with same utilization but one has
> longer period. And I run this two tasks on separate machine with same
> duration. Can I safely assume that the task with shorter period will have
> the litmus-RT yielding CPUs more frequently?

The short-period task has more jobs. So as long as its utilization is
less than 1, it should be, IMHO.

>
> Please let me know if there is any reference or paper I can read on
> regarding litmus-RT yielding CPUs. Thank you very much!

I guess the code is the best reference. :-)


Best Regards,

Meng
-----------
Meng Xu
PhD Student in Computer and Information Science
University of Pennsylvania
http://www.cis.upenn.edu/~mengxu/




More information about the litmus-dev mailing list