Home
SCHED_DEADLINE
Introduction
This is the implementation of a new scheduling class called SCHED_DEADLINE for the Linux kernel. The scheduling class implements the real-time scheduling algorithm called Earliest Deadline First (EDF), one of the most common real-time scheduling algorithms.
The project has been started by Evidence srl within the FP7 European project called ACTORS (now completed) the which the company was participating with, among the others, Ericsson AB, AKatech SA, Xilinx, and others (full list here).
Real-time scheduling techniques, such as EDF, allows for the possibility of analyzing the system and enforcing, either statically (off-line) or dynamically (on-line) determinism for the running tasks. We feel that this might be particularly beneficial for time-sensitive workloads, such as multimedia and/or control applications, where it may be important to be guaranteed that some timing requirements will be met under any circumstance.
We feel that this prevents will improve the potentialities of Linux for many industrial contexts, including some of the ones addressed by the partners of the ACTORS project. Official information about SCHED_DEADLINE and the ACTORS project can be found at Evidence srl SCHED_DEADLINE page
Key Features
The existing Linux scheduling policies cannot provide the guarantees a time-sensitive application may require. For example, although it is possible to assign a fair share of the processor to (a group of) task(s), no concept of actual timing constraints, e.g., deadlines, can be associated to it (them).
Moreover, the the time between two consecutive executions of a task is not deterministic, and no bound can be found for it, as this is easy to calculate under EDF (if the system is not overloaded!).
Finally, SCHED_DEADLINE also provides “temporal isolation”, meaning that the temporal behavior of each task (i.e., its ability to meet its deadlines) is not affected by the behavior of any other task in the system. In other words, even if a task misbehaves, it is not able to exploit larger CPU share than the amount it has been allocated, with its own —strictly enforced— periodicity.
Algorithm Basics
Each task is characterized by a “budget” (sched_runtime) and a “period” (sched_period, equal to its deadline). At any time, the system schedules the ready task(s) having the earliest deadline(s). During execution, the budget is decreased by an amount equal to the time executed. When a task’s budget reaches zero (i.e., the task executed for a time interval equal to its budget), the task is stopped until the time instant of its next deadline. At that point, the task isresumed, its budget is refilled and a new deadline is computed.
This means that each task is guaranteed a share of processor time equal to sched_runtime/sched_period every sched_period. Of course, the sum of sched_runtime/sched_period of all tasks cannot be higher than the total bandwidth available in the system (usually equal to the number of CPUs), uniprocessor systems), otherwise deadlines cannot be guaranteed any longer.
Papers and Presentations
- Dario’s presentations at the 2010 Linux Kernel Summit (KS2010)
- Our paper and slides at 6th Workshop on Operating Systems Platforms for Embedded Real-Time Applications (OSPERT2010)
- Our paper and slides, as well as Luca’s slides on reservation and IRQ-Threads at the 11th Real-Time Linux Workshop in Dresden (RTLWS11)
Installation Instructions
Learn how to download, compile and install a SCHED_DEADLINE enabled kernel.
Usage Instructions
Learn how to use SCHED_DEADLINE for your applications.
Experiments and Evaluation
Here they are some simple examples and some more serious evaluation.
OSPERT 2011
Instructions on how to access the source code and reproduce the experiments of our paper submitted to the 7th annual workshop on Operating Systems Platforms for Embedded Real-Time applications (OSPERT'11) can be found here OSPERT11
Links
- Official project links:
SCHED_DEADLINEproject page at Evidence srl and Ericsson Labs posting aboutSCHED_DEADLINEand the ACTORS project.
- LKML threads for
SCHED_DEADLINEv2(here), forSCHED_DEADLINEv1(here) and for the oldSCHED_EDF(here)
- Articles and reviews: LWN and LWN again! :-D. Slashdot.org, OSNews, OsNews and programmazione.it (in Italian) on us.
Contact the Authors
Let us know what you think about out work!
- Dario Faggioli, raistlin_AT_linux_DOT_it or faggioli_AT_retis_DOT_sssup_DOT_it
- Juri Lelli, j_DOT_lelli_AT_sssup_DOT_it
- Michael Trimarchi, michael_AT_evidence_DOT_eu_DOT_com or michael_AT_panicking_DOT_kicks-ass_DOT_org
- Claudio Scordino, claudio_AT_evidence_DOT_eu_DOT_com
Created by Dario Faggioli, C 2009, 2010,2011

