real time scheduling under uncertainty challenges and
play

Real-Time scheduling under uncertainty: challenges and solutions - PowerPoint PPT Presentation

Real-Time scheduling under uncertainty: challenges and solutions Giuseppe Lipari CRIStAL meraude May 17, 2016 Giuseppe Lipari (CRIStAL meraude) Real-Time scheduling under uncertainty: challenges and solutions May 17, 2016 1 / 50


  1. Real-Time scheduling under uncertainty: challenges and solutions Giuseppe Lipari CRIStAL – Émeraude May 17, 2016 Giuseppe Lipari (CRIStAL – Émeraude) Real-Time scheduling under uncertainty: challenges and solutions May 17, 2016 1 / 50

  2. Outline Introduction to RT Systemes 1 Unpredictability 2 Resource Reservations 3 Multicore systems 4 Soft real-time and control systems 5 Giuseppe Lipari (CRIStAL – Émeraude) Real-Time scheduling under uncertainty: challenges and solutions May 17, 2016 2 / 50

  3. Outline Introduction to RT Systemes 1 Unpredictability 2 Resource Reservations 3 Multicore systems 4 Soft real-time and control systems 5 Giuseppe Lipari (CRIStAL – Émeraude) Real-Time scheduling under uncertainty: challenges and solutions May 17, 2016 3 / 50

  4. Real-Time Systems Most real-time systems are concurrent need to handle many events with different temporal characteristics Periodic events In control systems, periodic sampling, computation of the control algorithm, actuation Different events may have different periods Aperiodic events May be triggered by the external environment Examples: a sensor triggers an interrupt, a packet arrives from the network Different events are handled by different tasks that run concurrently Constraints: each task instance must complete before a certain instant (deadline) Scheduling problem: how to interleave tasks executions so that each task instance meets its deadline Giuseppe Lipari (CRIStAL – Émeraude) Real-Time scheduling under uncertainty: challenges and solutions May 17, 2016 4 / 50

  5. Task model A periodic task τ i = ( C i , D i , T i ) consists of a (infinite) sequence of jobs J i , k = { a i , k , c i , k , d i , k } k = 0 , 1 , 2 , . . . , with: a i , 0 = 0 ∀ k > 0 a i , k = a i , k − 1 + T i ∀ k ≥ 0 d i , k = a i , k + D i C i = max { k ≥ 0 | c i , k } Pseudo-code for a periodic task: void * PeriodicTask( void *arg) { <initialization>; <start periodic timer, period = T>; while (cond) { <read sensors>; <update outputs>; <update state variables>; <wait next activation>; } } Giuseppe Lipari (CRIStAL – Émeraude) Real-Time scheduling under uncertainty: challenges and solutions May 17, 2016 5 / 50

  6. Example of schedule Every task τ i is assigned a fixed priority p i ; the active task with the highest priority is executed on the processor τ 1 τ 2 τ 3 0 2 4 6 8 10 12 14 16 18 20 22 24 Giuseppe Lipari (CRIStAL – Émeraude) Real-Time scheduling under uncertainty: challenges and solutions May 17, 2016 6 / 50

  7. Scheduling analysis Theorem (Liu and Layland, 1973) Consider n periodic (or sporadic) tasks with relative deadline equal to periods, whose priorities are assigned in Rate Monotonic order. Then, N C i ≤ U lub = n ( 2 1 / n − 1 ) � U = T i i = 1 U lub is a decreasing function of n ; For large n : U lub → 0 . 69 n U lub n U lub 2 0.828 7 0.728 3 0.779 8 0.724 4 0.756 9 0.720 5 0.743 10 0.717 6 0.734 11 . . . Giuseppe Lipari (CRIStAL – Émeraude) Real-Time scheduling under uncertainty: challenges and solutions May 17, 2016 7 / 50

  8. Dynamic priority The most important (and analysed) dynamic priority algorithm is Earliest Deadline First (EDF) The priority of a job (instance) is inversely proportional to its absolute deadline; Example with U = 23 24 τ 1 τ 2 τ 3 0 2 4 6 8 10 12 14 16 18 20 22 24 Giuseppe Lipari (CRIStAL – Émeraude) Real-Time scheduling under uncertainty: challenges and solutions May 17, 2016 8 / 50

  9. Scheduling analysis Theorem (Optimality, Dertouzos ’73) If a set of jobs J is schedulable by an algorithm A, then it is schedulable by EDF. Theorem (Liu & Layland ’71) Given a task set of periodic or sporadic tasks, with relative deadlines equal to periods, the task set is schedulable by EDF if and only if N C i � U = ≤ 1 T i i = 1 Giuseppe Lipari (CRIStAL – Émeraude) Real-Time scheduling under uncertainty: challenges and solutions May 17, 2016 9 / 50

  10. Domino effect In case of overhead ( U > 1), in EDF we have the domino effect : it means that all tasks miss their deadlines. An example of domino effect is the following: τ 1 τ 2 τ 3 τ 4 0 2 4 6 8 10 12 14 16 18 20 22 24 Giuseppe Lipari (CRIStAL – Émeraude) Real-Time scheduling under uncertainty: challenges and solutions May 17, 2016 10 / 50

  11. Domino effect In case of overhead ( U > 1), in EDF we have the domino effect : it means that all tasks miss their deadlines. An example of domino effect is the following: τ 1 τ 2 τ 3 τ 4 0 2 4 6 8 10 12 14 16 18 20 22 24 Giuseppe Lipari (CRIStAL – Émeraude) Real-Time scheduling under uncertainty: challenges and solutions May 17, 2016 10 / 50

  12. Domino effect In case of overhead ( U > 1), in EDF we have the domino effect : it means that all tasks miss their deadlines. An example of domino effect is the following: τ 1 τ 2 τ 3 τ 4 0 2 4 6 8 10 12 14 16 18 20 22 24 Giuseppe Lipari (CRIStAL – Émeraude) Real-Time scheduling under uncertainty: challenges and solutions May 17, 2016 10 / 50

  13. Domino effect In case of overhead ( U > 1), in EDF we have the domino effect : it means that all tasks miss their deadlines. An example of domino effect is the following: τ 1 τ 2 τ 3 τ 4 0 2 4 6 8 10 12 14 16 18 20 22 24 Giuseppe Lipari (CRIStAL – Émeraude) Real-Time scheduling under uncertainty: challenges and solutions May 17, 2016 10 / 50

  14. Domino effect In case of overhead ( U > 1), in EDF we have the domino effect : it means that all tasks miss their deadlines. An example of domino effect is the following: τ 1 τ 2 τ 3 τ 4 0 2 4 6 8 10 12 14 16 18 20 22 24 Giuseppe Lipari (CRIStAL – Émeraude) Real-Time scheduling under uncertainty: challenges and solutions May 17, 2016 10 / 50

  15. Domino effect In case of overhead ( U > 1), in EDF we have the domino effect : it means that all tasks miss their deadlines. An example of domino effect is the following: τ 1 τ 2 τ 3 τ 4 0 2 4 6 8 10 12 14 16 18 20 22 24 Giuseppe Lipari (CRIStAL – Émeraude) Real-Time scheduling under uncertainty: challenges and solutions May 17, 2016 10 / 50

  16. Domino effect In case of overhead ( U > 1), in EDF we have the domino effect : it means that all tasks miss their deadlines. An example of domino effect is the following: τ 1 τ 2 τ 3 τ 4 0 2 4 6 8 10 12 14 16 18 20 22 24 Giuseppe Lipari (CRIStAL – Émeraude) Real-Time scheduling under uncertainty: challenges and solutions May 17, 2016 10 / 50

  17. Domino effect In case of overhead ( U > 1), in EDF we have the domino effect : it means that all tasks miss their deadlines. An example of domino effect is the following: τ 1 τ 2 τ 3 τ 4 0 2 4 6 8 10 12 14 16 18 20 22 24 Giuseppe Lipari (CRIStAL – Émeraude) Real-Time scheduling under uncertainty: challenges and solutions May 17, 2016 10 / 50

  18. Domino effect In case of overhead ( U > 1), in EDF we have the domino effect : it means that all tasks miss their deadlines. An example of domino effect is the following: τ 1 τ 2 τ 3 τ 4 0 2 4 6 8 10 12 14 16 18 20 22 24 Giuseppe Lipari (CRIStAL – Émeraude) Real-Time scheduling under uncertainty: challenges and solutions May 17, 2016 10 / 50

  19. Domino effect In case of overhead ( U > 1), in EDF we have the domino effect : it means that all tasks miss their deadlines. An example of domino effect is the following: τ 1 τ 2 τ 3 τ 4 0 2 4 6 8 10 12 14 16 18 20 22 24 Giuseppe Lipari (CRIStAL – Émeraude) Real-Time scheduling under uncertainty: challenges and solutions May 17, 2016 10 / 50

  20. Domino effect In case of overhead ( U > 1), in EDF we have the domino effect : it means that all tasks miss their deadlines. An example of domino effect is the following: τ 1 τ 2 τ 3 τ 4 0 2 4 6 8 10 12 14 16 18 20 22 24 Giuseppe Lipari (CRIStAL – Émeraude) Real-Time scheduling under uncertainty: challenges and solutions May 17, 2016 10 / 50

  21. Domino effect In case of overhead ( U > 1), in EDF we have the domino effect : it means that all tasks miss their deadlines. An example of domino effect is the following: τ 1 τ 2 τ 3 τ 4 0 2 4 6 8 10 12 14 16 18 20 22 24 Giuseppe Lipari (CRIStAL – Émeraude) Real-Time scheduling under uncertainty: challenges and solutions May 17, 2016 10 / 50

  22. Domino effect and fixed priority FP is more predictable: only lower priority tasks miss their deadlines! In the previous example, if we use FP: τ 1 τ 2 τ 3 τ 4 0 2 4 6 8 10 12 14 16 18 20 22 24 Giuseppe Lipari (CRIStAL – Émeraude) Real-Time scheduling under uncertainty: challenges and solutions May 17, 2016 11 / 50

  23. Outline Introduction to RT Systemes 1 Unpredictability 2 Resource Reservations 3 Multicore systems 4 Soft real-time and control systems 5 Giuseppe Lipari (CRIStAL – Émeraude) Real-Time scheduling under uncertainty: challenges and solutions May 17, 2016 12 / 50

  24. Execution time and schedulability The analysis depends on the worst-case execution time C i of each task As we have seen in the previous slides, a wrong estimate may lead to a deadline miss How to compute the WCET of tasks ? Giuseppe Lipari (CRIStAL – Émeraude) Real-Time scheduling under uncertainty: challenges and solutions May 17, 2016 13 / 50

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend