Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "CprE 458/558: Real-Time Systems (G. Manimaran)1 CprE 458/558: Real-Time Systems Resource Reclaiming (Contd.)"— Presentation transcript:

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

2 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 T i only if processor on which T i is scheduled is idle and all the tasks in its restriction vector have finished their execution.

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

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

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

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

7 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 T i starts. RV Migration Algorithm: Swaps dispatch queues of two processors when original RV algorithm is not able to reclaim..

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

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

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

11 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

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

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

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

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

16 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


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

Similar presentations


Ads by Google