View
448
Download
1
Category
Tags:
Preview:
DESCRIPTION
My presentation about the real-time, EDF-based, scheduling classes and solutions for the Linux kernel at the 2010 edition of the Linux Kernel Summit.
Citation preview
Real-Time Deadline Scheduling and More...
Dario FaggioliReTiS Lab, Scuola Superiore Sant’Anna - Pisa (Italy),10th Annual Linux KERNEL SUMMIT, Cambridge, MA
1st, November 2010
D. Faggioli, ReTiS Lab, Scuola Superiore Sant’Anna, Pisa (IT) Real-Time Deadline Scheduling and More...
What is Real-Time?
Real-Time is all about determinism and guarantees:
guarantee that your system is deterministic,
achieve determinism, so that you can provide guarantees.
Classic Real-Time theory says:”Hey, we can do that, just give us the following:
knowledge of how many and what task there will be,
knowledge of their periodicity and computation times,
either tasks are independent ...
... or you must know what, for how long and how manytimes they access shared resources,
use uniprocessors ...
... or must run a schedulability test taking minutes ... For apessimistic result”
D. Faggioli, ReTiS Lab, Scuola Superiore Sant’Anna, Pisa (IT) Real-Time Deadline Scheduling and More...
What is Real-Time?
Real-Time is all about determinism and guarantees:
guarantee that your system is deterministic,
achieve determinism, so that you can provide guarantees.
Classic Real-Time theory says:”Hey, we can do that, just give us the following:
knowledge of how many and what task there will be,
knowledge of their periodicity and computation times,
either tasks are independent ...
... or you must know what, for how long and how manytimes they access shared resources,
use uniprocessors ...
... or must run a schedulability test taking minutes ... For apessimistic result”
D. Faggioli, ReTiS Lab, Scuola Superiore Sant’Anna, Pisa (IT) Real-Time Deadline Scheduling and More...
What is Real-Time?
Real-Time is all about determinism and guarantees:
guarantee that your system is deterministic,
achieve determinism, so that you can provide guarantees.
Classic Real-Time theory says:”Hey, we can do that, just give us the following:
knowledge of how many and what task there will be,
knowledge of their periodicity and computation times,
either tasks are independent ...
... or you must know what, for how long and how manytimes they access shared resources,
use uniprocessors ...
... or must run a schedulability test taking minutes ... For apessimistic result”
D. Faggioli, ReTiS Lab, Scuola Superiore Sant’Anna, Pisa (IT) Real-Time Deadline Scheduling and More...
What is Real-Time?
Real-Time is all about determinism and guarantees:
guarantee that your system is deterministic,
achieve determinism, so that you can provide guarantees.
Classic Real-Time theory says:”Hey, we can do that, just give us the following:
knowledge of how many and what task there will be,
knowledge of their periodicity and computation times,
either tasks are independent ...
... or you must know what, for how long and how manytimes they access shared resources,
use uniprocessors ...
... or must run a schedulability test taking minutes ... For apessimistic result”
D. Faggioli, ReTiS Lab, Scuola Superiore Sant’Anna, Pisa (IT) Real-Time Deadline Scheduling and More...
What is Real-Time?
Real-Time is all about determinism and guarantees:
guarantee that your system is deterministic,
achieve determinism, so that you can provide guarantees.
Classic Real-Time theory says:”Hey, we can do that, just give us the following:
knowledge of how many and what task there will be,
knowledge of their periodicity and computation times,
either tasks are independent ...
... or you must know what, for how long and how manytimes they access shared resources,
use uniprocessors ...
... or must run a schedulability test taking minutes ... For apessimistic result”
D. Faggioli, ReTiS Lab, Scuola Superiore Sant’Anna, Pisa (IT) Real-Time Deadline Scheduling and More...
What is Real-Time?
Real-Time is all about determinism and guarantees:
guarantee that your system is deterministic,
achieve determinism, so that you can provide guarantees.
Classic Real-Time theory says:”Hey, we can do that, just give us the following:
knowledge of how many and what task there will be,
knowledge of their periodicity and computation times,
either tasks are independent ...
... or you must know what, for how long and how manytimes they access shared resources,
use uniprocessors ...
... or must run a schedulability test taking minutes ... For apessimistic result”
D. Faggioli, ReTiS Lab, Scuola Superiore Sant’Anna, Pisa (IT) Real-Time Deadline Scheduling and More...
What is Real-Time?
Real-Time is all about determinism and guarantees:
guarantee that your system is deterministic,
achieve determinism, so that you can provide guarantees.
Classic Real-Time theory says:”Hey, we can do that, just give us the following:
knowledge of how many and what task there will be,
knowledge of their periodicity and computation times,
either tasks are independent ...
... or you must know what, for how long and how manytimes they access shared resources,
use uniprocessors ...
... or must run a schedulability test taking minutes ... For apessimistic result”
D. Faggioli, ReTiS Lab, Scuola Superiore Sant’Anna, Pisa (IT) Real-Time Deadline Scheduling and More...
What is Real-Time?
Real-Time is all about determinism and guarantees:
guarantee that your system is deterministic,
achieve determinism, so that you can provide guarantees.
Classic Real-Time theory says:”Hey, we can do that, just give us the following:
knowledge of how many and what task there will be,
knowledge of their periodicity and computation times,
either tasks are independent ...
... or you must know what, for how long and how manytimes they access shared resources,
use uniprocessors ...
... or must run a schedulability test taking minutes ... For apessimistic result”
D. Faggioli, ReTiS Lab, Scuola Superiore Sant’Anna, Pisa (IT) Real-Time Deadline Scheduling and More...
Resource Reservations
Task are reserved Q (runtime or budget) time units every T timeunits (period) (i.e., they have a ”CPU bandwidth” of Q
P).
D. Faggioli, ReTiS Lab, Scuola Superiore Sant’Anna, Pisa (IT) Real-Time Deadline Scheduling and More...
Resource Reservations
Task are reserved Q (runtime or budget) time units every T timeunits (period) (i.e., they have a ”CPU bandwidth” of Q
P).
Applications get guaranteed CPU time, and misbehaviors areconfined within each task’s ”bandwidth capsule”.
D. Faggioli, ReTiS Lab, Scuola Superiore Sant’Anna, Pisa (IT) Real-Time Deadline Scheduling and More...
Resource Reservations
Task are reserved Q (runtime or budget) time units every T timeunits (period) (i.e., they have a ”CPU bandwidth” of Q
P).
Applications get guaranteed CPU time, and misbehaviors areconfined within each task’s ”bandwidth capsule”.
0 2 4 6 8 10 12 14
τA
τB
D. Faggioli, ReTiS Lab, Scuola Superiore Sant’Anna, Pisa (IT) Real-Time Deadline Scheduling and More...
Resource Reservations
Task are reserved Q (runtime or budget) time units every T timeunits (period) (i.e., they have a ”CPU bandwidth” of Q
P).
Applications get guaranteed CPU time, and misbehaviors areconfined within each task’s ”bandwidth capsule”.
0 2 4 6 8 10 12 14
τA
τB
0 2 4 6 8 10 12 14
τA
τB
0 2 4 6 8 10 12 14
τA
τB
D. Faggioli, ReTiS Lab, Scuola Superiore Sant’Anna, Pisa (IT) Real-Time Deadline Scheduling and More...
What Applications are Real-Time? (I)
D. Faggioli, ReTiS Lab, Scuola Superiore Sant’Anna, Pisa (IT) Real-Time Deadline Scheduling and More...
What Applications Are Real-Time? (II)
D. Faggioli, ReTiS Lab, Scuola Superiore Sant’Anna, Pisa (IT) Real-Time Deadline Scheduling and More...
Concerning Latency... (I)
0
50000
100000
150000
200000
250000
100 200 300 400 500 600 700 800
low RT priority
100 200 300 400 500 600 700 800
high RT priority
100 200 300 400 500 600 700 800
CBS (12.5, 40)
100 200 300 400 500 600 700 800
CBS (25, 40)
Two concurrently running video players
D. Faggioli, ReTiS Lab, Scuola Superiore Sant’Anna, Pisa (IT) Real-Time Deadline Scheduling and More...
Concerning Latency... (II)
0
200
400
600
800
1000
1200
1400
0 10000 20000 30000 40000 0 10000 20000 30000 40000 0 10000 20000 30000 40000 0 10000 20000 30000 40000 0 10000 20000 30000 40000
(1) CFS/CFS (2) FIFO/FIFO (3) FIFO/FIFO (4) AQuoSA/AQuoSA (5) SHRUB/SHRUB
0
10000
20000
30000
40000
50000
60000
70000
80000
0 500 1000 1500 0 500 1000 1500 0 500 1000 1500 0 500 1000 1500 0 500 1000 1500
JACK with 10 periodic clients plus a (fake!) real-time task
D. Faggioli, ReTiS Lab, Scuola Superiore Sant’Anna, Pisa (IT) Real-Time Deadline Scheduling and More...
Concerning Throughput... (I)
0
10
20
30
40
50
60
70
80
0 0.0005 0.001 0.0015 0.002 0.0025 0.003
Thr
ough
put (
MB
/s)
Reserved fraction of CPU time (Q/T)
Disk throughput (DMA enabled).
D. Faggioli, ReTiS Lab, Scuola Superiore Sant’Anna, Pisa (IT) Real-Time Deadline Scheduling and More...
Concerning Throughput... (II)
0
0.2
0.4
0.6
0.8
1
1.2
1.4
0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4
Thr
ough
put (
MB
/s)
Reserved fraction of CPU time
MinimumAverage
Maximum
Disk throughput (without DMA).
D. Faggioli, ReTiS Lab, Scuola Superiore Sant’Anna, Pisa (IT) Real-Time Deadline Scheduling and More...
Concerning Latency and Throughput...
A video player plus interrupt load by netperf.
0
50000
100000
150000
200000
250000
100 200 300 400 500 600 700 800
Player Alone
100 200 300 400 500 600 700 800
Player + netperf
100 200 300 400 500 600 700 800
Player with RT priority + netperf
Network throughput: -, 88 Mbps, 58 Mbps.
0
50000
100000
150000
200000
250000
100 200 300 400 500 600 700 800
CBS (20, 40)
100 200 300 400 500 600 700 800
CBS (25, 40)
100 200 300 400 500 600 700 800
CBS (29, 40)
Network throughput: 88 Mbps, 76 Mbps, 59 Mbps.
D. Faggioli, ReTiS Lab, Scuola Superiore Sant’Anna, Pisa (IT) Real-Time Deadline Scheduling and More...
Can Linux Do This... (I)
With POSIX-like fix priority scheduling?
Yes, by means of implementing the SCHED SPORADICpolicy (part of POSIX).Have a patch for that! :-)
With deadline-based scheduling (more convenient, sometimes moreefficient)?
Yes, by means of SCHED DEADLINE 1 and/orEDF-throttling.Have a patch for that! :-)
1Together with Evidence s.r.l. within http://www.actors-project.eu
D. Faggioli, ReTiS Lab, Scuola Superiore Sant’Anna, Pisa (IT) Real-Time Deadline Scheduling and More...
Can Linux Do This... (I)
With POSIX-like fix priority scheduling?
Yes, by means of implementing the SCHED SPORADICpolicy (part of POSIX).Have a patch for that! :-)
With deadline-based scheduling (more convenient, sometimes moreefficient)?
Yes, by means of SCHED DEADLINE 1 and/orEDF-throttling.Have a patch for that! :-)
1Together with Evidence s.r.l. within http://www.actors-project.eu
D. Faggioli, ReTiS Lab, Scuola Superiore Sant’Anna, Pisa (IT) Real-Time Deadline Scheduling and More...
Can Linux Do This... (I)
With POSIX-like fix priority scheduling?
Yes, by means of implementing the SCHED SPORADICpolicy (part of POSIX).Have a patch for that! :-)
With deadline-based scheduling (more convenient, sometimes moreefficient)?
Yes, by means of SCHED DEADLINE 1 and/orEDF-throttling.Have a patch for that! :-)
1Together with Evidence s.r.l. within http://www.actors-project.eu
D. Faggioli, ReTiS Lab, Scuola Superiore Sant’Anna, Pisa (IT) Real-Time Deadline Scheduling and More...
Can Linux Do This... (I)
With POSIX-like fix priority scheduling?
Yes, by means of implementing the SCHED SPORADICpolicy (part of POSIX).Have a patch for that! :-)
With deadline-based scheduling (more convenient, sometimes moreefficient)?
Yes, by means of SCHED DEADLINE 1 and/orEDF-throttling.Have a patch for that! :-)
1Together with Evidence s.r.l. within http://www.actors-project.eu
D. Faggioli, ReTiS Lab, Scuola Superiore Sant’Anna, Pisa (IT) Real-Time Deadline Scheduling and More...
Can Linux Do This... (II)
I just released v3 of SCHED DEADLINE (last Friday).
D. Faggioli, ReTiS Lab, Scuola Superiore Sant’Anna, Pisa (IT) Real-Time Deadline Scheduling and More...
Can Linux Do This... (II)
I just released v3 of SCHED DEADLINE (last Friday).I planned to have more code ready by now, but I got preemptedby a very high priority ”task”, about a month ago...
D. Faggioli, ReTiS Lab, Scuola Superiore Sant’Anna, Pisa (IT) Real-Time Deadline Scheduling and More...
Can Linux Do This... (II)
I just released v3 of SCHED DEADLINE (last Friday).I planned to have more code ready by now, but I got preemptedby a very high priority ”task”, about a month ago...
D. Faggioli, ReTiS Lab, Scuola Superiore Sant’Anna, Pisa (IT) Real-Time Deadline Scheduling and More...
Now, The Really Important Part...
... Questions and open issues:
Do you want this ?
In what fashion? Priorities? Deadlines? Hierarchical? All ofthem ;-P) ?
With what user interface? New syscalls? Cgroupfs? Binary?
At what privilege level/with what security model? FIFO/RRones? Maybe less restrictions?
Are users/application-developers ever start using this (if it’saccepted)? Is there something that can/needs to be donetoward this?
How to balance stability of the API(s) and the new featurerequests that might come out?
...
D. Faggioli, ReTiS Lab, Scuola Superiore Sant’Anna, Pisa (IT) Real-Time Deadline Scheduling and More...
Now, The Really Important Part...
... Questions and open issues:
Do you want this ?
In what fashion? Priorities? Deadlines? Hierarchical? All ofthem ;-P) ?
With what user interface? New syscalls? Cgroupfs? Binary?
At what privilege level/with what security model? FIFO/RRones? Maybe less restrictions?
Are users/application-developers ever start using this (if it’saccepted)? Is there something that can/needs to be donetoward this?
How to balance stability of the API(s) and the new featurerequests that might come out?
...
D. Faggioli, ReTiS Lab, Scuola Superiore Sant’Anna, Pisa (IT) Real-Time Deadline Scheduling and More...
Now, The Really Important Part...
... Questions and open issues:
Do you want this ?
In what fashion? Priorities? Deadlines? Hierarchical? All ofthem ;-P) ?
With what user interface? New syscalls? Cgroupfs? Binary?
At what privilege level/with what security model? FIFO/RRones? Maybe less restrictions?
Are users/application-developers ever start using this (if it’saccepted)? Is there something that can/needs to be donetoward this?
How to balance stability of the API(s) and the new featurerequests that might come out?
...
D. Faggioli, ReTiS Lab, Scuola Superiore Sant’Anna, Pisa (IT) Real-Time Deadline Scheduling and More...
Now, The Really Important Part...
... Questions and open issues:
Do you want this ?
In what fashion? Priorities? Deadlines? Hierarchical? All ofthem ;-P) ?
With what user interface? New syscalls? Cgroupfs? Binary?
At what privilege level/with what security model? FIFO/RRones? Maybe less restrictions?
Are users/application-developers ever start using this (if it’saccepted)? Is there something that can/needs to be donetoward this?
How to balance stability of the API(s) and the new featurerequests that might come out?
...
D. Faggioli, ReTiS Lab, Scuola Superiore Sant’Anna, Pisa (IT) Real-Time Deadline Scheduling and More...
Now, The Really Important Part...
... Questions and open issues:
Do you want this ?
In what fashion? Priorities? Deadlines? Hierarchical? All ofthem ;-P) ?
With what user interface? New syscalls? Cgroupfs? Binary?
At what privilege level/with what security model? FIFO/RRones? Maybe less restrictions?
Are users/application-developers ever start using this (if it’saccepted)? Is there something that can/needs to be donetoward this?
How to balance stability of the API(s) and the new featurerequests that might come out?
...
D. Faggioli, ReTiS Lab, Scuola Superiore Sant’Anna, Pisa (IT) Real-Time Deadline Scheduling and More...
Now, The Really Important Part...
... Questions and open issues:
Do you want this ?
In what fashion? Priorities? Deadlines? Hierarchical? All ofthem ;-P) ?
With what user interface? New syscalls? Cgroupfs? Binary?
At what privilege level/with what security model? FIFO/RRones? Maybe less restrictions?
Are users/application-developers ever start using this (if it’saccepted)? Is there something that can/needs to be donetoward this?
How to balance stability of the API(s) and the new featurerequests that might come out?
...
D. Faggioli, ReTiS Lab, Scuola Superiore Sant’Anna, Pisa (IT) Real-Time Deadline Scheduling and More...
Now, The Really Important Part...
... Questions and open issues:
Do you want this ?
In what fashion? Priorities? Deadlines? Hierarchical? All ofthem ;-P) ?
With what user interface? New syscalls? Cgroupfs? Binary?
At what privilege level/with what security model? FIFO/RRones? Maybe less restrictions?
Are users/application-developers ever start using this (if it’saccepted)? Is there something that can/needs to be donetoward this?
How to balance stability of the API(s) and the new featurerequests that might come out?
...
D. Faggioli, ReTiS Lab, Scuola Superiore Sant’Anna, Pisa (IT) Real-Time Deadline Scheduling and More...
Recommended