1 / 16

CprE 458/558: Real-Time Systems

CprE 458/558: Real-Time Systems. Resource Reclaiming (Contd.). Restriction Vector (RV) Algorithm. Scheduler computes RV for each task in the pre-run schedule. RV depends on resource and/or precedence constraints and the pre-run schedule.

nami
Download Presentation

CprE 458/558: Real-Time Systems

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CprE 458/558: Real-Time Systems Resource Reclaiming (Contd.) CprE 458/558: Real-Time Systems (G. Manimaran)

  2. Restriction Vector (RV) Algorithm • Scheduler computes RV for each task in the pre-run schedule. • RV depends on resource and/or precedence constraints and the pre-run schedule. • Processor checks the RV of the task before starts executing it. The RV algorithm says: start executing a task Ti only if processor on which Ti is scheduled is idle and all the tasks in its restriction vector have finished their execution. CprE 458/558: Real-Time Systems (G. Manimaran)

  3. Understanding the notation: T<i T<1= {T2,T5,T6,T7} T<1(1) = {T6} T<1(2) = {T2,T7} T<1(5) = {T5} T1 P1 T6 T9 P2 T2 T7 T8 P3 T3 P4 T4 P5 T5 T10 CprE 458/558: Real-Time Systems (G. Manimaran)

  4. Understanding the notation: T>i T>1= {T3,T9} T1 P1 T6 T9 P2 T2 T7 T8 P3 T3 P4 T4 P5 T5 T10 CprE 458/558: Real-Time Systems (G. Manimaran)

  5. Understanding the notation: T~i T~1= {T4,T8,T10} T1 P1 T6 T9 P2 T2 T7 T8 P3 T3 P4 T4 P5 T5 T10 CprE 458/558: Real-Time Systems (G. Manimaran)

  6. RV Definition • Each task Ti has an associated m-component vector, RVi[1..m], called the Restriction Vector, where m is the number of processors. • RVi[j] for a task Ti contains the last task in T<i(j) which must be completed before the execution of Ti begins. CprE 458/558: Real-Time Systems (G. Manimaran)

  7. RV Definition (Contd.) • Where denoting the set of tasks that are scheduled (in the pre-run schedule) to finish before Tistarts. • RV Migration Algorithm: Swaps dispatch queues of two processors when original RV algorithm is not able to reclaim. . CprE 458/558: Real-Time Systems (G. Manimaran)

  8. RV Algorithm -- Example CprE 458/558: Real-Time Systems (G. Manimaran)

  9. RV Example (Contd.) CprE 458/558: Real-Time Systems (G. Manimaran)

  10. RV Migration Algorithm CprE 458/558: Real-Time Systems (G. Manimaran)

  11. Accounting the cost of reclaiming • Algorithm overhead must be accounted as part of the WCET of the task • Higher the complexity (cost) of reclaiming algorithm, the lesser the “hole” seen by it for reclaiming • Let WCET, ACET of task Ti be 10 and 8, respectively • Let the WCET of Basic, Early start, RV, and RV-migration algorithms be 1, 2, 2, and 3, respectively • Assume we are evaluating these four algorithms • Overall, WCET’ of task Ti is 10 + Max(1,2,2,3) = 13 • When Ti finishes executing (before invoking reclaiming), the holes seen by Basic, Early start, RV, and RV-migration algorithms will be 4 (=13-(8+1), 3, 3, and 2 respectively • Employing more complex reclaiming algorithm does not necessarily increase the resource reclaimed CprE 458/558: Real-Time Systems (G. Manimaran)

  12. Effect of actual to worst-case computation CprE 458/558: Real-Time Systems (G. Manimaran)

  13. Effect of Worst-case Computation Time CprE 458/558: Real-Time Systems (G. Manimaran)

  14. Basic idea of passing Resource constraints T6 R T6 cannot execute in this hole, since it has resource constraints with T2 However T1 can execute at time = 0 T2 T1 P1 T6 T9 P2 T2 T7 T8 time = 0 CprE 458/558: Real-Time Systems (G. Manimaran)

  15. Basic idea of passing T2 Precedence constraints T6 cannot execute in this hole, since it has precedence constraints with T2 However T1 can execute at time = 0 T6 T1 P1 T6 T9 P2 T2 T7 T8 time = 0 CprE 458/558: Real-Time Systems (G. Manimaran)

  16. Reclaiming algorithms -- properties • Basic, Early Start, RV, and RV-migration • Passing is not allowed -- this helps to avoid run-time anomaly • Bounded complexity – depends on fixed parameters (#processors, RV-check-const, mig-attempt, etc.) • Algorithm overhead must be included as part of the WCET of the task • Employing more complex reclaiming algorithm does not necessarily increase the resource reclaimed CprE 458/558: Real-Time Systems (G. Manimaran)

More Related