Real-Time Deadline Scheduling and More...
Upcoming SlideShare
Loading in...5
×
 

Real-Time Deadline Scheduling and More...

on

  • 330 views

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.

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.

Statistics

Views

Total Views
330
Views on SlideShare
326
Embed Views
4

Actions

Likes
1
Downloads
6
Comments
0

2 Embeds 4

http://www.linkedin.com 3
https://www.linkedin.com 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

CC Attribution-NoDerivs LicenseCC Attribution-NoDerivs License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Real-Time Deadline Scheduling and More... Presentation Transcript

  • 1. Real-Time Deadline Scheduling and More... Dario Faggioli ReTiS Lab, Scuola Superiore Sant’Anna - Pisa (Italy), 10th Annual Linux KERNEL SUMMIT, Cambridge, MA 1st, November 2010D. Faggioli, ReTiS Lab, Scuola Superiore Sant’Anna, Pisa (IT) Real-Time Deadline Scheduling and More...
  • 2. 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 many times they access shared resources, use uniprocessors ... ... or must run a schedulability test taking minutes ... For a pessimistic result”D. Faggioli, ReTiS Lab, Scuola Superiore Sant’Anna, Pisa (IT) Real-Time Deadline Scheduling and More...
  • 3. 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 many times they access shared resources, use uniprocessors ... ... or must run a schedulability test taking minutes ... For a pessimistic result”D. Faggioli, ReTiS Lab, Scuola Superiore Sant’Anna, Pisa (IT) Real-Time Deadline Scheduling and More...
  • 4. 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 many times they access shared resources, use uniprocessors ... ... or must run a schedulability test taking minutes ... For a pessimistic result”D. Faggioli, ReTiS Lab, Scuola Superiore Sant’Anna, Pisa (IT) Real-Time Deadline Scheduling and More...
  • 5. 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 many times they access shared resources, use uniprocessors ... ... or must run a schedulability test taking minutes ... For a pessimistic result”D. Faggioli, ReTiS Lab, Scuola Superiore Sant’Anna, Pisa (IT) Real-Time Deadline Scheduling and More...
  • 6. 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 many times they access shared resources, use uniprocessors ... ... or must run a schedulability test taking minutes ... For a pessimistic result”D. Faggioli, ReTiS Lab, Scuola Superiore Sant’Anna, Pisa (IT) Real-Time Deadline Scheduling and More...
  • 7. 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 many times they access shared resources, use uniprocessors ... ... or must run a schedulability test taking minutes ... For a pessimistic result”D. Faggioli, ReTiS Lab, Scuola Superiore Sant’Anna, Pisa (IT) Real-Time Deadline Scheduling and More...
  • 8. 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 many times they access shared resources, use uniprocessors ... ... or must run a schedulability test taking minutes ... For a pessimistic result”D. Faggioli, ReTiS Lab, Scuola Superiore Sant’Anna, Pisa (IT) Real-Time Deadline Scheduling and More...
  • 9. 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 many times they access shared resources, use uniprocessors ... ... or must run a schedulability test taking minutes ... For a pessimistic result”D. Faggioli, ReTiS Lab, Scuola Superiore Sant’Anna, Pisa (IT) Real-Time Deadline Scheduling and More...
  • 10. Resource Reservations Task are reserved Q (runtime or budget) time units every T time units (period) (i.e., they have a ”CPU bandwidth” of Q ). PD. Faggioli, ReTiS Lab, Scuola Superiore Sant’Anna, Pisa (IT) Real-Time Deadline Scheduling and More...
  • 11. Resource Reservations Task are reserved Q (runtime or budget) time units every T time units (period) (i.e., they have a ”CPU bandwidth” of Q ). P Applications get guaranteed CPU time, and misbehaviors are confined within each task’s ”bandwidth capsule”.D. Faggioli, ReTiS Lab, Scuola Superiore Sant’Anna, Pisa (IT) Real-Time Deadline Scheduling and More...
  • 12. Resource Reservations Task are reserved Q (runtime or budget) time units every T time units (period) (i.e., they have a ”CPU bandwidth” of Q ). P Applications get guaranteed CPU time, and misbehaviors are confined within each task’s ”bandwidth capsule”. τA τB 0 2 4 6 8 10 12 14D. Faggioli, ReTiS Lab, Scuola Superiore Sant’Anna, Pisa (IT) Real-Time Deadline Scheduling and More...
  • 13. Resource Reservations Task are reserved Q (runtime or budget) time units every T time units (period) (i.e., they have a ”CPU bandwidth” of Q ). P Applications get guaranteed CPU time, and misbehaviors are confined within each task’s ”bandwidth capsule”. τA τB 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 14D. Faggioli, ReTiS Lab, Scuola Superiore Sant’Anna, Pisa (IT) Real-Time Deadline Scheduling and More...
  • 14. What Applications are Real-Time? (I)D. Faggioli, ReTiS Lab, Scuola Superiore Sant’Anna, Pisa (IT) Real-Time Deadline Scheduling and More...
  • 15. What Applications Are Real-Time? (II)D. Faggioli, ReTiS Lab, Scuola Superiore Sant’Anna, Pisa (IT) Real-Time Deadline Scheduling and More...
  • 16. Concerning Latency... (I) 250000 low RT priority high RT priority CBS (12.5, 40) CBS (25, 40) 200000 150000 100000 50000 0 100 200 300 400 500 600 700 800100 200 300 400 500 600 700 800100 200 300 400 500 600 700 800100 200 300 400 500 600 700 800 Two concurrently running video playersD. Faggioli, ReTiS Lab, Scuola Superiore Sant’Anna, Pisa (IT) Real-Time Deadline Scheduling and More...
  • 17. Concerning Latency... (II) 1400 1200 1000 800 600 400 200 (1) CFS/CFS (2) FIFO/FIFO (3) FIFO/FIFO (4) AQuoSA/AQuoSA (5) SHRUB/SHRUB 0 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 80000 70000 60000 50000 40000 30000 20000 10000 0 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 taskD. Faggioli, ReTiS Lab, Scuola Superiore Sant’Anna, Pisa (IT) Real-Time Deadline Scheduling and More...
  • 18. Concerning Throughput... (I) 80 70 60 50 Throughput (MB/s) 40 30 20 10 0 0 0.0005 0.001 0.0015 0.002 0.0025 0.003 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...
  • 19. Concerning Throughput... (II) 1.4 Minimum Average Maximum 1.2 1 Throughput (MB/s) 0.8 0.6 0.4 0.2 0 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 Reserved fraction of CPU time Disk throughput (without DMA).D. Faggioli, ReTiS Lab, Scuola Superiore Sant’Anna, Pisa (IT) Real-Time Deadline Scheduling and More...
  • 20. Concerning Latency and Throughput... A video player plus interrupt load by netperf. 250000 Player Alone Player + netperf Player with RT priority + netperf 200000 150000 100000 50000 0 100 200 300 400 500 600 700 800 100 200 300 400 500 600 700 800 100 200 300 400 500 600 700 800 Network throughput: -, 88 Mbps, 58 Mbps. 250000 CBS (20, 40) CBS (25, 40) CBS (29, 40) 200000 150000 100000 50000 0 100 200 300 400 500 600 700 800 100 200 300 400 500 600 700 800 100 200 300 400 500 600 700 800 Network throughput: 88 Mbps, 76 Mbps, 59 Mbps.D. Faggioli, ReTiS Lab, Scuola Superiore Sant’Anna, Pisa (IT) Real-Time Deadline Scheduling and More...
  • 21. Can Linux Do This... (I) With POSIX-like fix priority scheduling? Yes, by means of implementing the SCHED SPORADIC policy (part of POSIX). Have a patch for that! :-) With deadline-based scheduling (more convenient, sometimes more efficient)? Yes, by means of SCHED DEADLINE 1 and/or EDF-throttling. Have a patch for that! :-) 1 Together with Evidence s.r.l. within http://www.actors-project.euD. Faggioli, ReTiS Lab, Scuola Superiore Sant’Anna, Pisa (IT) Real-Time Deadline Scheduling and More...
  • 22. Can Linux Do This... (I) With POSIX-like fix priority scheduling? Yes, by means of implementing the SCHED SPORADIC policy (part of POSIX). Have a patch for that! :-) With deadline-based scheduling (more convenient, sometimes more efficient)? Yes, by means of SCHED DEADLINE 1 and/or EDF-throttling. Have a patch for that! :-) 1 Together with Evidence s.r.l. within http://www.actors-project.euD. Faggioli, ReTiS Lab, Scuola Superiore Sant’Anna, Pisa (IT) Real-Time Deadline Scheduling and More...
  • 23. Can Linux Do This... (I) With POSIX-like fix priority scheduling? Yes, by means of implementing the SCHED SPORADIC policy (part of POSIX). Have a patch for that! :-) With deadline-based scheduling (more convenient, sometimes more efficient)? Yes, by means of SCHED DEADLINE 1 and/or EDF-throttling. Have a patch for that! :-) 1 Together with Evidence s.r.l. within http://www.actors-project.euD. Faggioli, ReTiS Lab, Scuola Superiore Sant’Anna, Pisa (IT) Real-Time Deadline Scheduling and More...
  • 24. Can Linux Do This... (I) With POSIX-like fix priority scheduling? Yes, by means of implementing the SCHED SPORADIC policy (part of POSIX). Have a patch for that! :-) With deadline-based scheduling (more convenient, sometimes more efficient)? Yes, by means of SCHED DEADLINE 1 and/or EDF-throttling. Have a patch for that! :-) 1 Together with Evidence s.r.l. within http://www.actors-project.euD. Faggioli, ReTiS Lab, Scuola Superiore Sant’Anna, Pisa (IT) Real-Time Deadline Scheduling and More...
  • 25. 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...
  • 26. 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 preempted by 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...
  • 27. 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 preempted by 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...
  • 28. Now, The Really Important Part... ... Questions and open issues: Do you want this ? In what fashion? Priorities? Deadlines? Hierarchical? All of them ;-P) ? With what user interface? New syscalls? Cgroupfs? Binary? At what privilege level/with what security model? FIFO/RR ones? Maybe less restrictions? Are users/application-developers ever start using this (if it’s accepted)? Is there something that can/needs to be done toward this? How to balance stability of the API(s) and the new feature requests that might come out? ...D. Faggioli, ReTiS Lab, Scuola Superiore Sant’Anna, Pisa (IT) Real-Time Deadline Scheduling and More...
  • 29. Now, The Really Important Part... ... Questions and open issues: Do you want this ? In what fashion? Priorities? Deadlines? Hierarchical? All of them ;-P) ? With what user interface? New syscalls? Cgroupfs? Binary? At what privilege level/with what security model? FIFO/RR ones? Maybe less restrictions? Are users/application-developers ever start using this (if it’s accepted)? Is there something that can/needs to be done toward this? How to balance stability of the API(s) and the new feature requests that might come out? ...D. Faggioli, ReTiS Lab, Scuola Superiore Sant’Anna, Pisa (IT) Real-Time Deadline Scheduling and More...
  • 30. Now, The Really Important Part... ... Questions and open issues: Do you want this ? In what fashion? Priorities? Deadlines? Hierarchical? All of them ;-P) ? With what user interface? New syscalls? Cgroupfs? Binary? At what privilege level/with what security model? FIFO/RR ones? Maybe less restrictions? Are users/application-developers ever start using this (if it’s accepted)? Is there something that can/needs to be done toward this? How to balance stability of the API(s) and the new feature requests that might come out? ...D. Faggioli, ReTiS Lab, Scuola Superiore Sant’Anna, Pisa (IT) Real-Time Deadline Scheduling and More...
  • 31. Now, The Really Important Part... ... Questions and open issues: Do you want this ? In what fashion? Priorities? Deadlines? Hierarchical? All of them ;-P) ? With what user interface? New syscalls? Cgroupfs? Binary? At what privilege level/with what security model? FIFO/RR ones? Maybe less restrictions? Are users/application-developers ever start using this (if it’s accepted)? Is there something that can/needs to be done toward this? How to balance stability of the API(s) and the new feature requests that might come out? ...D. Faggioli, ReTiS Lab, Scuola Superiore Sant’Anna, Pisa (IT) Real-Time Deadline Scheduling and More...
  • 32. Now, The Really Important Part... ... Questions and open issues: Do you want this ? In what fashion? Priorities? Deadlines? Hierarchical? All of them ;-P) ? With what user interface? New syscalls? Cgroupfs? Binary? At what privilege level/with what security model? FIFO/RR ones? Maybe less restrictions? Are users/application-developers ever start using this (if it’s accepted)? Is there something that can/needs to be done toward this? How to balance stability of the API(s) and the new feature requests that might come out? ...D. Faggioli, ReTiS Lab, Scuola Superiore Sant’Anna, Pisa (IT) Real-Time Deadline Scheduling and More...
  • 33. Now, The Really Important Part... ... Questions and open issues: Do you want this ? In what fashion? Priorities? Deadlines? Hierarchical? All of them ;-P) ? With what user interface? New syscalls? Cgroupfs? Binary? At what privilege level/with what security model? FIFO/RR ones? Maybe less restrictions? Are users/application-developers ever start using this (if it’s accepted)? Is there something that can/needs to be done toward this? How to balance stability of the API(s) and the new feature requests that might come out? ...D. Faggioli, ReTiS Lab, Scuola Superiore Sant’Anna, Pisa (IT) Real-Time Deadline Scheduling and More...
  • 34. Now, The Really Important Part... ... Questions and open issues: Do you want this ? In what fashion? Priorities? Deadlines? Hierarchical? All of them ;-P) ? With what user interface? New syscalls? Cgroupfs? Binary? At what privilege level/with what security model? FIFO/RR ones? Maybe less restrictions? Are users/application-developers ever start using this (if it’s accepted)? Is there something that can/needs to be done toward this? How to balance stability of the API(s) and the new feature requests that might come out? ...D. Faggioli, ReTiS Lab, Scuola Superiore Sant’Anna, Pisa (IT) Real-Time Deadline Scheduling and More...