<s>
SCHED_DEADLINE	O
is	O
a	O
CPU	O
scheduler	O
available	O
in	O
the	O
Linux	B-Operating_System
kernel	I-Operating_System
since	O
version	O
3.14	O
,	O
based	O
on	O
the	O
Earliest	O
Deadline	O
First	O
(	O
EDF	O
)	O
and	O
Constant	O
Bandwidth	O
Server	O
(	O
CBS	O
)	O
algorithms	O
,	O
supporting	O
resource	O
reservations	O
:	O
each	O
task	O
scheduled	O
under	O
such	O
policy	O
is	O
associated	O
with	O
a	O
budget	O
Q	O
(	O
aka	O
runtime	O
)	O
,	O
and	O
a	O
period	O
P	O
,	O
corresponding	O
to	O
a	O
declaration	O
to	O
the	O
kernel	B-Operating_System
that	O
Q	O
time	O
units	O
are	O
required	O
by	O
that	O
task	O
every	O
P	O
time	O
units	O
,	O
on	O
any	O
processor	O
.	O
</s>
<s>
This	O
makes	O
SCHED_DEADLINE	O
particularly	O
suitable	O
for	O
real-time	B-General_Concept
applications	I-General_Concept
,	O
like	O
multimedia	O
or	O
industrial	O
control	O
,	O
where	O
P	O
corresponds	O
to	O
the	O
minimum	O
time	O
elapsing	O
between	O
subsequent	O
activations	O
of	O
the	O
task	O
,	O
and	O
Q	O
corresponds	O
to	O
the	O
worst-case	O
execution	O
time	O
needed	O
by	O
each	O
activation	O
of	O
the	O
task	O
.	O
</s>
<s>
The	O
Linux	B-Operating_System
kernel	I-Operating_System
contains	O
different	O
scheduler	O
classes	O
.	O
</s>
<s>
By	O
default	O
,	O
the	O
kernel	B-Operating_System
uses	O
a	O
scheduler	O
mechanism	O
called	O
the	O
Completely	B-Application
Fair	I-Application
Scheduler	I-Application
(	O
CFS	O
)	O
introduced	O
in	O
the	O
2.6.23	O
version	O
of	O
the	O
kernel	B-Operating_System
.	O
</s>
<s>
Internally	O
,	O
this	O
default	O
scheduler	O
class	O
is	O
also	O
known	O
as	O
SCHED_NORMAL	O
,	O
and	O
the	O
kernel	B-Operating_System
also	O
contains	O
two	O
POSIX-compliant	O
real-time	B-General_Concept
scheduling	O
classes	O
named	O
SCHED_FIFO	O
(	O
realtime	O
first-in-first-out	B-Operating_System
)	O
and	O
SCHED_RR	O
(	O
realtime	O
round-robin	B-Algorithm
)	O
both	O
of	O
which	O
take	O
precedence	O
over	O
the	O
default	O
class	O
.	O
</s>
<s>
The	O
SCHED_DEADLINE	O
scheduling	O
class	O
was	O
added	O
to	O
the	O
Linux	B-Operating_System
scheduler	O
in	O
version	O
3.14	O
of	O
the	O
Linux	B-Operating_System
kernel	I-Operating_System
mainline	O
,	O
released	O
on	O
30	O
March	O
2014	O
,	O
</s>
<s>
However	O
,	O
when	O
an	O
application	O
needs	O
a	O
predictable	O
and	O
precise	O
schedule	O
,	O
normally	O
it	O
has	O
to	O
recur	O
to	O
one	O
of	O
the	O
other	O
real-time	B-General_Concept
schedulers	O
,	O
SCHED_RR	O
or	O
SCHED_FIFO	O
,	O
which	O
apply	O
fixed-priority	O
to	O
schedule	O
tasks	O
by	O
priorities	O
,	O
and	O
whose	O
tasks	O
are	O
scheduled	O
before	O
any	O
task	O
in	O
the	O
SCHED_NORMAL	O
class	O
.	O
</s>
<s>
When	O
mixing	O
real-time	B-General_Concept
workloads	O
with	O
heterogeneous	O
timing	O
requirements	O
on	O
the	O
same	O
system	O
,	O
a	O
well-known	O
problem	O
of	O
SCHED_RR	O
and	O
SCHED_FIFO	O
is	O
that	O
,	O
as	O
these	O
are	O
based	O
on	O
tasks	O
priorities	O
,	O
higher-priority	O
tasks	O
running	O
for	O
longer	O
than	O
expected	O
may	O
arbitrarily	O
delay	O
lower-priority	O
tasks	O
in	O
an	O
uncontrolled	O
way	O
.	O
</s>
<s>
With	O
SCHED_DEADLINE	O
,	O
instead	O
,	O
tasks	O
declare	O
independently	O
their	O
timing	O
requirements	O
,	O
in	O
terms	O
of	O
a	O
per-task	O
runtime	O
needed	O
every	O
per-task	O
period	O
(	O
and	O
due	O
within	O
a	O
per-task	O
deadline	O
since	O
each	O
period	O
start	O
)	O
,	O
and	O
the	O
kernel	B-Operating_System
accepts	O
them	O
in	O
the	O
scheduler	O
after	O
a	O
schedulability	O
test	O
.	O
</s>
<s>
Now	O
,	O
if	O
a	O
task	O
tries	O
to	O
run	O
for	O
longer	O
than	O
its	O
assigned	O
budget	O
,	O
the	O
kernel	B-Operating_System
will	O
suspend	O
that	O
task	O
and	O
defer	O
its	O
execution	O
to	O
its	O
next	O
activation	O
period	O
.	O
</s>
<s>
This	O
non-work	B-General_Concept
conserving	I-General_Concept
property	O
of	O
the	O
scheduler	O
allows	O
it	O
to	O
provide	O
temporal	B-General_Concept
isolation	I-General_Concept
among	O
the	O
tasks	O
.	O
</s>
<s>
Also	O
,	O
a	O
peculiar	O
property	O
of	O
the	O
CBS	O
algorithm	O
is	O
that	O
it	O
guarantees	O
temporal	B-General_Concept
isolation	I-General_Concept
also	O
in	O
presence	O
of	O
tasks	O
blocking	O
and	O
resuming	O
execution	O
:	O
this	O
is	O
done	O
by	O
resetting	O
a	O
task	O
scheduling	O
deadline	O
to	O
a	O
whole	O
period	O
apart	O
,	O
whenever	O
a	O
task	O
wakes	O
up	O
too	O
late	O
.	O
</s>
<s>
For	O
each	O
task	O
,	O
in	O
addition	O
to	O
the	O
configured	O
runtime	O
and	O
(	O
relative	O
)	O
period	O
,	O
the	O
kernel	B-Operating_System
keeps	O
track	O
of	O
a	O
current	O
runtime	O
and	O
a	O
current	O
(	O
absolute	O
)	O
deadline	O
.	O
</s>
<s>
Each	O
time	O
a	O
task	O
is	O
scheduled	O
to	O
run	O
on	O
any	O
CPU	O
,	O
the	O
kernel	B-Operating_System
lets	O
it	O
run	O
for	O
at	O
most	O
the	O
available	O
current	O
budget	O
,	O
and	O
whenever	O
the	O
task	O
is	O
descheduled	O
its	O
current	O
budget	O
is	O
decreased	O
by	O
the	O
amount	O
of	O
time	O
it	O
has	O
been	O
run	O
.	O
</s>
<s>
This	O
is	O
not	O
sufficient	O
to	O
guarantee	O
temporal	B-General_Concept
isolation	I-General_Concept
.	O
</s>
<s>
However	O
,	O
if	O
an	O
excessive	O
amount	O
of	O
time	O
has	O
elapsed	O
,	O
then	O
the	O
kernel	B-Operating_System
resets	O
the	O
current	O
deadline	O
to	O
the	O
current	O
time	O
plus	O
the	O
reservation	O
period	O
,	O
and	O
the	O
current	O
budget	O
to	O
the	O
allocated	O
reservation	O
budget	O
.	O
</s>
<s>
However	O
,	O
the	O
scheduler	O
also	O
respects	O
tasks	O
 '	O
affinity	B-General_Concept
masks	I-General_Concept
,	O
so	O
one	O
can	O
easily	O
create	O
partitioned	O
scheduling	O
scenarios	O
,	O
partitioning	O
tasks	O
in	O
groups	O
where	O
each	O
group	O
is	O
restricted	O
to	O
a	O
specific	O
CPU	O
,	O
or	O
clustered	O
scheduling	O
scenarios	O
,	O
obtained	O
by	O
also	O
partitioning	O
CPUs	O
and	O
each	O
tasks	O
partition	O
is	O
pinned	O
down	O
to	O
a	O
specific	O
CPUs	O
partition	O
.	O
</s>
<s>
For	O
technical	O
details	O
about	O
SCHED_DEADLINE	O
,	O
refer	O
to	O
the	O
documentation	O
available	O
within	O
the	O
kernel	B-Operating_System
source	O
tree	O
.	O
</s>
<s>
For	O
further	O
details	O
on	O
the	O
CBS	O
and	O
how	O
it	O
enables	O
temporal	B-General_Concept
isolation	I-General_Concept
,	O
refer	O
to	O
the	O
original	O
CBS	O
paper	O
,	O
or	O
the	O
section	O
about	O
the	O
CBS	O
in	O
this	O
article	O
appeared	O
on	O
lwn.net	O
.	O
</s>
<s>
The	O
initial	O
idea	O
of	O
a	O
Linux	B-Operating_System
scheduling	O
class	O
based	O
on	O
the	O
Earliest	O
Deadline	O
First	O
(	O
EDF	O
)	O
algorithm	O
was	O
born	O
in	O
the	O
small	O
context	O
of	O
the	O
Real-Time	B-General_Concept
Systems	I-General_Concept
(	O
ReTiS	O
)	O
Lab	O
of	O
Scuola	O
Superiore	O
Sant'Anna	O
and	O
its	O
Spin-Off	O
company	O
Evidence	O
Srl	O
.	O
</s>
<s>
The	O
patch	O
has	O
been	O
periodically	O
released	O
to	O
the	O
kernel	B-Operating_System
community	O
through	O
the	O
Linux	B-Application
kernel	I-Application
mailing	I-Application
list	I-Application
(	O
LKML	B-Application
)	O
.	O
</s>
<s>
Each	O
release	O
aligned	O
the	O
code	O
to	O
the	O
latest	O
version	O
of	O
the	O
kernel	B-Operating_System
and	O
took	O
into	O
account	O
comments	O
received	O
at	O
the	O
previous	O
submission	O
.	O
</s>
<s>
As	O
the	O
popularity	O
of	O
the	O
scheduler	O
increased	O
,	O
a	O
higher	O
number	O
of	O
kernel	B-Operating_System
developers	O
started	O
providing	O
their	O
feedback	O
and	O
their	O
contribution	O
.	O
</s>
<s>
The	O
project	O
was	O
originally	O
called	O
SCHED_EDF	O
and	O
presented	O
to	O
the	O
Linux	B-Operating_System
kernel	I-Operating_System
community	O
in	O
2009	O
.	O
</s>
<s>
With	O
this	O
name	O
was	O
also	O
presented	O
to	O
the	O
Real-Time	B-General_Concept
Linux	B-Operating_System
Workshop	O
after	O
a	O
few	O
weeks	O
.	O
</s>
<s>
The	O
name	O
has	O
been	O
then	O
changed	O
to	O
SCHED_DEADLINE	O
after	O
the	O
request	O
of	O
the	O
Linux	B-Operating_System
kernel	I-Operating_System
community	O
.	O
</s>
<s>
The	O
first	O
version	O
of	O
the	O
scheduler	O
after	O
the	O
name	O
changed	O
to	O
SCHED_DEADLINE	O
was	O
submitted	O
to	O
LKML	B-Application
on	O
October	O
16	O
,	O
2009	O
.	O
</s>
<s>
The	O
second	O
version	O
of	O
the	O
scheduler	O
has	O
been	O
submitted	O
to	O
LKML	B-Application
on	O
February	O
28	O
,	O
2010	O
,	O
and	O
had	O
a	O
first	O
implementation	O
of	O
the	O
Deadline	O
Inheritance	O
protocol	O
.	O
</s>
<s>
The	O
third	O
version	O
of	O
the	O
scheduler	O
has	O
been	O
submitted	O
to	O
LKML	B-Application
on	O
October	O
29	O
,	O
2010	O
,	O
and	O
it	O
added	O
support	O
for	O
global/clustered	O
multiprocessor	O
scheduling	O
through	O
dynamic	O
task	O
migrations	O
.	O
</s>
<s>
The	O
fourth	O
version	O
of	O
the	O
scheduler	O
has	O
been	O
submitted	O
to	O
LKML	B-Application
on	O
April	O
6	O
,	O
2012	O
,	O
and	O
has	O
better	O
handling	O
of	O
rq	O
selection	O
for	O
dynamic	O
task	O
migration	O
and	O
better	O
integration	O
with	O
PREEMPT_RT	O
.	O
</s>
<s>
The	O
fifth	O
version	O
of	O
the	O
scheduler	O
has	O
been	O
submitted	O
to	O
LKML	B-Application
on	O
May	O
23	O
,	O
2012	O
.	O
</s>
<s>
The	O
sixth	O
version	O
of	O
the	O
scheduler	O
has	O
been	O
submitted	O
to	O
LKML	B-Application
on	O
October	O
24	O
,	O
2012	O
.	O
</s>
<s>
The	O
seventh	O
version	O
of	O
the	O
scheduler	O
has	O
been	O
submitted	O
to	O
LKML	B-Application
on	O
February	O
11	O
,	O
2013	O
.	O
</s>
<s>
The	O
eighth	O
version	O
of	O
the	O
scheduler	O
has	O
been	O
submitted	O
to	O
LKML	B-Application
on	O
October	O
14	O
,	O
2013	O
.	O
</s>
<s>
The	O
ninth	O
version	O
of	O
the	O
scheduler	O
has	O
been	O
submitted	O
to	O
LKML	B-Application
on	O
November	O
7	O
,	O
2013	O
.	O
</s>
<s>
The	O
last	O
version	O
was	O
merged	O
into	O
the	O
mainline	O
Linux	B-Operating_System
kernel	I-Operating_System
(	O
commit	O
number	O
a0fa1dd3cdbccec9597fe53b6177a9aa6e20f2f8	O
)	O
,	O
and	O
is	O
since	O
then	O
a	O
regular	O
part	O
of	O
it	O
.	O
</s>
<s>
Articles	O
on	O
Linux	B-Operating_System
Weekly	O
News	O
and	O
Phoronix	O
websites	O
argued	O
that	O
SCHED_DEADLINE	O
may	O
be	O
merged	O
into	O
the	O
mainline	O
kernel	B-Operating_System
in	O
the	O
very	O
next	O
releases	O
.	O
</s>
<s>
Finally	O
,	O
after	O
more	O
than	O
four	O
years	O
and	O
the	O
submission	O
of	O
nine	O
releases	O
,	O
the	O
patch	O
has	O
been	O
accepted	O
and	O
merged	O
into	O
the	O
Linux	B-Operating_System
kernel	I-Operating_System
3.14	O
.	O
</s>
<s>
Before	O
SCHED_DEADLINE	O
,	O
the	O
Real-Time	B-General_Concept
Systems	I-General_Concept
(	O
ReTiS	O
)	O
Lab	O
of	O
Scuola	O
Superiore	O
Sant'Anna	O
had	O
provided	O
various	O
other	O
open-source	O
implementations	O
of	O
CBS	O
and	O
its	O
variants	O
within	O
the	O
Linux	B-Operating_System
kernel	I-Operating_System
,	O
in	O
the	O
context	O
of	O
other	O
European	O
research	O
projects	O
,	O
including	O
OCERA	O
,	O
the	O
AQuoSA	B-Application
architecture	O
within	O
the	O
FRESCOR	O
project	O
,	O
and	O
IRMOS	O
.	O
</s>
<s>
However	O
,	O
these	O
prior	O
efforts	O
started	O
with	O
an	O
academic	O
approach	O
where	O
the	O
main	O
aim	O
was	O
to	O
gather	O
experimental	O
results	O
for	O
research	O
projects	O
,	O
rather	O
than	O
providing	O
an	O
implementation	O
suitable	O
for	O
integration	O
within	O
the	O
mainline	O
kernel	B-Operating_System
.	O
</s>
<s>
With	O
IRMOS	O
,	O
the	O
lab	O
had	O
a	O
first	O
serious	O
contact	O
with	O
Linux	B-Operating_System
kernel	I-Operating_System
developers	O
.	O
</s>
<s>
Since	O
kernel	B-Operating_System
4.13	O
,	O
SCHED_DEADLINE	O
completed	O
CBS	O
with	O
the	O
Greedy	O
Reclamation	O
of	O
Unused	O
Bandwidth	O
(	O
GRUB	O
)	O
algorithm	O
.	O
</s>
<s>
Since	O
kernel	B-Operating_System
4.16	O
,	O
SCHED_DEADLINE	O
has	O
been	O
further	O
evolved	O
to	O
reduce	O
energy	O
consumption	O
on	O
ARM	O
platforms	O
by	O
implementing	O
the	O
GRUB-PA	O
algorithm	O
.	O
</s>
<s>
Juri	O
Lelli	O
,	O
Giuseppe	O
Lipari	O
,	O
Dario	O
Faggioli	O
,	O
Tommaso	O
Cucinotta	O
,	O
An	O
efficient	O
and	O
scalable	O
implementation	O
of	O
global	O
EDF	O
in	O
Linux	B-Operating_System
,	O
International	O
Workshop	O
on	O
Operating	O
Systems	O
Platforms	O
for	O
Embedded	O
Real-Time	B-General_Concept
Applications	I-General_Concept
(	O
OSPERT	O
)	O
,	O
Porto	O
(	O
Portugal	O
)	O
,	O
July	O
2011	O
.	O
</s>
<s>
Andrea	O
Parri	O
,	O
Juri	O
Lelli	O
,	O
Mauro	O
Marinoni	O
,	O
Giuseppe	O
Lipari	O
,	O
Design	O
and	O
Implementation	O
of	O
the	O
Multiprocessor	O
Bandwidth	O
Inheritance	O
Protocol	O
on	O
Linux	B-Operating_System
,	O
15th	O
Real-Time	B-General_Concept
Linux	B-Operating_System
Workshop	O
(	O
RTLWS	O
)	O
,	O
Lugano-Manno	O
,	O
Switzerland	O
,	O
October	O
2013	O
.	O
</s>
<s>
Luca	O
Abeni	O
,	O
Juri	O
Lelli	O
,	O
Claudio	O
Scordino	O
,	O
Luigi	O
Paolopoli	O
,	O
Greedy	O
CPU	O
reclaiming	O
for	O
SCHED_DEADLINE	O
,	O
Proceedings	O
of	O
16th	O
Real-Time	B-General_Concept
Linux	B-Operating_System
Workshop	O
(	O
RTLWS	O
)	O
,	O
Düsseldorf	O
,	O
Germany	O
,	O
October	O
2014	O
.	O
</s>
<s>
Juri	O
Lelli	O
,	O
Claudio	O
Scordino	O
,	O
Luca	O
Abeni	O
,	O
Dario	O
Faggioli	O
,	O
Deadline	O
scheduling	O
in	O
the	O
Linux	B-Operating_System
kernel	I-Operating_System
,	O
Software	O
:	O
Practice	O
and	O
Experience	O
,	O
46(6 )	O
:	O
821	O
–	O
839	O
,	O
June	O
2016	O
.	O
</s>
<s>
Claudio	O
Scordino	O
,	O
Luca	O
Abeni	O
,	O
Juri	O
Lelli	O
,	O
Energy-Aware	O
Real-Time	B-General_Concept
Scheduling	O
in	O
the	O
Linux	B-Operating_System
Kernel	I-Operating_System
,	O
33rd	O
ACM/SIGAPP	O
Symposium	O
On	O
Applied	O
Computing	O
(	O
SAC	O
2018	O
)	O
,	O
Pau	O
,	O
France	O
,	O
April	O
2018	O
.	O
</s>
<s>
Claudio	O
Scordino	O
,	O
Luca	O
Abeni	O
,	O
Juri	O
Lelli	O
,	O
Real-time	B-General_Concept
and	O
Energy	O
Efficiency	O
in	O
Linux	B-Operating_System
:	O
Theory	O
and	O
Practice	O
,	O
ACM	O
SIGAPP	O
Applied	O
Computing	O
Review	O
(	O
ACR	O
)	O
Vol	O
.	O
</s>
<s>
The	O
project	O
has	O
been	O
also	O
presented	O
at	O
the	O
Kernel	B-Operating_System
Summit	O
in	O
2010	O
,	O
at	O
the	O
Linux	B-Operating_System
Plumbers	O
Conference	O
2012	O
,	O
and	O
at	O
the	O
Embedded	O
Linux	B-Operating_System
Conference	O
2013	O
.	O
</s>
<s>
Since	O
mainline	O
integration	O
,	O
the	O
official	O
code	O
is	O
included	O
in	O
the	O
Linux	B-Operating_System
kernel	I-Operating_System
source	O
tree	O
.	O
</s>
<s>
Several	O
articles	O
have	O
appeared	O
on	O
Linux	B-Operating_System
Weekly	O
News	O
,	O
Slashdot	O
,	O
OSNews	O
and	O
LinuxToday	O
.	O
</s>
<s>
Before	O
integration	O
in	O
the	O
mainline	O
kernel	B-Operating_System
,	O
SCHED_DEADLINE	O
was	O
already	O
integrated	O
into	O
the	O
Yocto	B-Application
Project	I-Application
.	O
</s>
