Using the EDF scheduler

Jonathan Brandmeyer jbrandmeyer at planetiq.com
Fri Jan 17 18:33:33 UTC 2020


We're using the SMP EDF scheduler in our application, and I want to make
sure that I understand its semantics correctly when using it in conjunction
with both priority-based and deadline-based tasks.

"It assumes that tasks have priorities equal to deadlines" -> It is the
responsibility of the application author to give task priorities which are
actually equal to deadlines.  Otherwise, the utilization guarantee is not
valid.

"This EDF is initially preemptive, however, individual tasks may be
declared not-preemptive." -> Tasks are preemptive unless they set the
scheduling mode to RTEMS_NO_PREEMT.  Using the rate monotonic manager does
not make a task non-preemptive.

"The tasks with an active deadline have a higher priority than the
background tasks."  -> Any task which is using the rate monotonic manager
will preempt a task which does not when the rate-monotonic task is ready to
run.

"Deadlines are declared using only Rate Monotonic manager which goal is to
handle periodic behavior. Period is always equal to deadline." -> It's not
actually possible to give a task a deadline independent of its period.  The
task's deadline is implied by the previous call to
rtems_rate_monotonic_period().

I'd like to use the rate monotonic manager to schedule some tasks, while
using the rtems_event_send and posix condition variables to schedule
others.  In my application, it turns out that some of the tasks which are
being made ready to run by an ISR via rtems_event_send have stricter
requirements than the rate-monotonic tasks.  They also usually execute with
a period that is much finer than the kernel time quantum.

What is the best way to get event-,  condvar-, or queue-managed tasks to
cooperate with rate-monotonic tasks?  If I restrict rate-monotonic tasks to
just one core with the affinity API, then it sounds like the other core
will always be free to schedule event-triggered tasks + the remainder of
the rate-monotonic core.  What other tools are available for this purpose?

Thanks,
-- 
Jonathan Brandmeyer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20200117/fb0cdaa6/attachment.html>


More information about the users mailing list