[LITMUS^RT] SCHED_FIFO priority vs Litmus priority

Glenn Elliott gelliott at cs.unc.edu
Sat Mar 1 00:52:55 CET 2014


On Feb 28, 2014, at 2:21 PM, ayoade gbadebo <gbaduz at gmail.com> wrote:

> I have been able to find where litmus rt priorities is defined as shown below but in the paper  titled "A Comparison of Scheduling Latency
> in Linux, PREEMPT RT, and LITMUSRT  Felipe Cerqueira Bj¨orn B. Brandenburg" -    the paper says "LITMUSRT’s fixed-priority plugin currently supports 512 distinct priorities; the priority field is ignored by EDF-based plugins. 
> 
> That is EDF plugin does not use the priority value set by the the user Litmusrt  application. So what priority does EDF based plugin use? Is it based on priority boosting where a value of priority = 0 means the EDF scheduler should use priority boosting? Can someone elaborate?
> "
> /include/litmus/rt_param.h
> +#define LITMUS_MAX_PRIORITY     512
> +#define LITMUS_HIGHEST_PRIORITY   1
> +#define LITMUS_LOWEST_PRIORITY    (LITMUS_MAX_PRIORITY - 1)
> 
> 
> 
> On Mon, Feb 24, 2014 at 7:56 AM, Björn Brandenburg <bbb at mpi-sws.org> wrote:
> 
> On 20 Feb 2014, at 20:56, ayoade gbadebo <gbaduz at gmail.com> wrote:
> 
> > I observed the priority for SCHED_FIFO is 2 and LITMUS priority is 6 as shown in the header files.
> >
> > Knowing that priority values that are lower means a higher priority task, which means that in the case above, sched fifo tasks have higher priority than litmus task.
> > Can My assumption be verified ?. I always thought litmus tasks have the highest priority in the system.
> 
> You are confusing scheduling priorities with the symbolic constants used to identify scheduling policies. The #defines that you are looking at have nothing to do with scheduling priorities. The LITMUS^RT scheduling class indeed takes precedence over SCHED_FIFO.
> 
> - Björn



EDF stands for “earliest deadline first”.  Here’s a quick description: http://en.wikipedia.org/wiki/Earliest_deadline_first_scheduling

Work is prioritized by job deadline.  Every job from the same task have unique deadlines.  Thus, every job of the same task (thread) has a different priority.  There is no way for the programmer to specify a single priority (hence the name "fixed-priority”) for the task, like they can for the fixed-priority plugin.

Under Litmus for EDF, you specify a release time of the first job, the separation time between subsequent jobs of that task (period), and the relative deadline for each job.  The absolute deadline for a jobs computed as “job release time + relative deadline”.  The Litmus EDF schedulers prioritize jobs by absolute deadline.  (In Litmus code, the current absolute deadline of a job is stored in “struct rt_job::deadline”.  The time is in nanoseconds.

May I ask what you’re hoping to do with Litmus, in general?  Are you just curious in how it’s implemented, or are you hoping to implement a scheduling plugin of your own?  Are you interested in fixed-priority schedulers like general fixed-priority, rate-monotonic, deadline-monotonic?  Are you interested in dynamic-priority schedulers like EDF and pfair?  Or perhaps you’re interested in multi-criticality scheduling?  We might be able to provide you with a little more direction if we knew your general goals.

-Glenn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.litmus-rt.org/pipermail/litmus-dev/attachments/20140228/c618335c/attachment.html>


More information about the litmus-dev mailing list