Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 “Scheduling with Dynamic Voltage/Speed Adjustment Using Slack Reclamation In Multi-processor Real-Time Systems” Dakai Zhu, Rami Melhem, and Bruce Childers.

Similar presentations


Presentation on theme: "1 “Scheduling with Dynamic Voltage/Speed Adjustment Using Slack Reclamation In Multi-processor Real-Time Systems” Dakai Zhu, Rami Melhem, and Bruce Childers."— Presentation transcript:

1 1 “Scheduling with Dynamic Voltage/Speed Adjustment Using Slack Reclamation In Multi-processor Real-Time Systems” Dakai Zhu, Rami Melhem, and Bruce Childers Computer Science Department University of Pittsburgh Presented by Jin W. Lee October, 2001

2 2 Outline 1. Task Model and Problem Description 2. Energy Model and Power Management 3. Power aware scheduling for independent tasks 4. Power aware scheduling for dependent tasks 5. Conclusion

3 3 Task Model and Problem Description - T i = (c i, a i ) c i is the task’s worst case execution time (WCET) based on full CPU speed a i is actual case execution time (ACET) - Problem: Scheduling Scheme for Multi-Processor Systems that Minimizes energy consumption for CPU while still meet Deadline

4 4 Processor Power Dissipation P d = C ef *V dd 2 * f - C ef is the switch capacitance - f is processor frequency -V dd is processor supply voltage Processor Speed f = k (V dd –V t ) 2 / V dd - k is a constant - V t is the threshold voltage Energy per Task E/task = P d * t = C ef * V dd 2 - t is the time to execute the task Energy Model and Power Management

5 5 Basic Idea Deadline D Cpu time units for task = X S max Cpu time units for task = X t

6 6 Slack Reclamation Schemes – Task’s Dynamic Behavior Actual Execution Time: 40% [9] – Slack Unused time considered as slack and can be reused by the following tasks at run-time – Reclaim Slack Greedy Scheme Shared Scheme

7 7 P1P1 P2P2 T1=(10, 7), T2=(8,4), T3=(6,6), T4=(6,6), T5=(6,6) Ready Queue T3 T4 T5 020Time P1P1 P2P2 T1T2 T3T4T5 020Time T1 T2 T1T2T3T4T5 LTF priority assignmentOptimal priority assignment P1P1 P2P2 T1 T2T3 T4 T5 020Time Actual execution with max cpu speed Basic Scheduling Schemes

8 8 P1P1 P2P2 T1=(5, 2), T2=(4,4), T3=(3,3), T4=(2,2), T5=(2,2), T6=(2,2) Ready Queue 09Time P1P1 P2P2 09 T1T2T3T4T5 Canonical ExecutionActual Execution with NPM T6 T1 T2T3 T4T5 T6T2 T3 T4 T5T1 T6 Example for Global Scheduling with Slack Reclamation for Independent Tasks

9 9 P1P1 P2P2 09Time Global Scheduling with Greedy Slack Reclamation T1 T2 P1P1 P2P2 09Time T1 T2 T3 T6 T4T5 P1P1 P2P2 09Time T1 T2 T3 T1T3 We know c1 for T1 and c3 for T3 c1+c3 is the time T3 must be finished If T3 can start time 2, we can expend execution time for T3 to time 7 like below graph. T1 T3 Miss Deadline !! T1=(5, 2), T2=(4,4), T3=(3,3), T4=(2,2), T5=(2,2), T6=(2,2)

10 10 P1P1 P2P2 09Time Global Scheduling with Shared Slack Reclamation T1 T2 P1P1 P2P2 09Time T1 T2 P1P1 P2P2 09Time T2 T3 T5 T6 T1 T4 Meet Deadline !! 2 T1=(5, 2), T2=(4,4), T3=(3,3), T4=(2,2), T5=(2,2), T6=(2,2) 4545

11 11 1While (Ready-Q is not Empty) 2{ 3T k = Dequeue (Ready-Q); 4If ( STNT id > STNT ~id ) 5 STNT id  STNT ~id ; 6EET k = STNT id + c k ; 7STNT id = EET k ; 8S id = S max * c k / ( EET k - t ); 9 Execute(T k, S id ); 10} Global Scheduling with Shared Slack Reclamation Algorithm Implementation

12 12 T1=(5, 2), T2=(4,4), T3=(3,3), T4=(2,2), T5=(2,2), T6=(2,2) Ready Queue T1T2T3T4T5T6 Time 0 Task 1(c1=5) dequeue id = 1 STNT1 = 0, STNT2 = 0 EET1 = STNT1 = 5 Cpu Speed 5/(5-0)  100 % Task 2(c2=4) dequeue id = 2 STNT1 = 5, STNT2 = 0 EET2 = STNT2 = 4 Cpu Speed 4/(4-0)  100 % P1P1 P2P2 09 T1 T2 Algorithm : Example Step 1

13 13 Time 2 Task 3(c1=3) dequeue id = 1 STNT1 = 5, STNT2 = 4 Switch STNT for sharing Slack !! STNT1 = 4, STNT2 = 5 EET3 = STNT1 = 7 Cpu Speed 3/(7-2)  60 % T1=(5, 2), T2=(4,4), T3=(3,3), T4=(2,2), T5=(2,2), T6=(2,2) Ready Queue T4T5T6 T1 P1P1 P2P2 09Time T2 Algorithm : Example Step 2 T1 P1P1 P2P2 09Time T2 T3 45

14 14 Time 4 Task 4(c1=2) dequeue id = 2 STNT1 = 7, STNT2 = 5 EET4 = STNT2 = 7 Cpu Speed 2/(7-4)  67 % T1=(5, 2), T2=(4,4), T3=(3,3), T4=(2,2), T5=(2,2), T6=(2,2) Ready Queue T5T6 T1 P1P1 P2P2 09Time T2 T3 T4 Algorithm : Example Step 3

15 15 T1=(5, 2), T2=(4,4), T3=(3,3), T4=(2,2), T5=(2,2), T6=(2,2) Ready Queue Time 7 Task 5(c1=2) dequeue id = 1 STNT1 = 7, STNT2 = 7 EET5 = STNT1 = 9 Cpu Speed 2/(9-7)  100 % Task 6(c2=2) dequeue id = 2 STNT1 = 9, STNT2 = 7 EET6 = STNT2 = 9 Cpu Speed 2/(9-7)  100 % T1 P1P1 P2P2 09Time T2 T3 T5 T6 T4 Meet Deadline !! Algorithm : Example Step 4

16 16 Example for Global Scheduling with Slack Reclamation for Dependent Tasks T2 T1 T3 T4 T6 T5 (2,2) (3,1) (3,3) (4,4) (6,6) Precedence Graph

17 17 P1P1 P2P2 T1=(3,1), T2=(2,2), T3=(4,4), T4=(3,3), T5=(6,6), T6=(6,6) Worst Case Ready Time 012Time P1P1 P2P2 012 Time T1T2T3T4 T5 Canonical ExecutionActual Execution with NPM T6 T1 T2T3 T4 T5 T6 T1 T2 T5 T3T4 T6 Actual Case Ready Time T1T2T3T4T6T5 List Scheduling for Dependent Tasks Miss Deadline !! List scheduling is a standard algorithm used to schedule task sets with precedence constraints

18 18 P1P1 P2P2 012 Time Actual Execution with NPM T1 T2 T5 T3 T4 T6 Ready Time T1T2T3T4T6T Miss Deadline !! T1=(3,1), T2=(2,2), T3=(4,4), T4=(3,3), T5=(6,6), T6=(6,6) List Scheduling with Shared Slack Reclamation for Dependent Tasks

19 19 Ready Time T1T2T3T4T6T T1=(3,1), T2=(2,2), T3=(4,4), T4=(3,3), T5=(6,6), T6=(6,6) Fixed-Order List Scheduling with Shared Slack Reclamation for Dependent Tasks Global Queue T1T2T3T4T6T Global Queue

20 20 1If (Head(Global-Q) is ready) 2{ 3T k = Dequeue (Global-Q); 4If ( STNT id > STNT ~id ) 5 STNT id  STNT ~id ; 6EET k = max{ RT c k, STNT id, t } + c k ; 7STNT id = EET k ; 8S id = S max * c k / ( EET k - t ); 9If((Head(Global-Q) is ready) AND (P ~id is idle)) 10 Signal(P ~id ); 11 Execute(T k, S id ); 12} else wait(); List Scheduling with Shared Slack Reclamation Algorithm Implementation

21 21 Global Queue Time 0 Task 1(c1=3) dequeue id = 1 STNT1 = 0, STNT2 = 0 EET1 = max{0, 0, 0} + 3 STNT1 = 3 Cpu Speed 3/(3-0)  100 % Task 2(c2=2) dequeue id = 2 STNT1 = 3, STNT2 = 0 EET2 = max{0, 0, 0} + 2 STNT2 = 2 Cpu Speed 2/(2-0)  100 % Algorithm : Example Step 1 T1=(3,1), T2=(2,2), T3=(4,4), T4=(3,3), T5=(6,6), T6=(6,6) Ready Time T1T2T3T4T6T P1P1 P2P2 012 Time T1 T2 23

22 22 Global Queue Time 1 Head(Global-Q) is not ready so id = 1 is wait(); Algorithm : Example Step 2 T1=(3,1), T2=(2,2), T3=(4,4), T4=(3,3), T5=(6,6), T6=(6,6) Ready Time T3T4T6T5 216 P1P1 P2P2 012 Time T1 T2 6

23 23 Global Queue Time 2 Head(Global-Q) is ready Task 3(c1=4) dequeue id = 1 STNT1 = 3, STNT2 = 2 Switch STNT for sharing Slack !! STNT1 = 2, STNT2 = 3 EET3 = max{2, 2, 2} + 4 STNT1 = 6 Cpu Speed 4/(6-2)  100 % Algorithm : Example Step 2 T1=(3,1), T2=(2,2), T3=(4,4), T4=(3,3), T5=(6,6), T6=(6,6) Ready Time T3T4T6T5 216 P1P1 P2P2 012 Time T1 T2 T3 236

24 24 Global Queue Time 2 Task 4(c1=3) dequeue id = 2 STNT1 = 6, STNT2 = 3 EET4 = max{2, 3, 2} + 3 STNT2 = 6 Cpu Speed 3/(6-2)  75 % Algorithm : Example Step 3 T1=(3,1), T2=(2,2), T3=(4,4), T4=(3,3), T5=(6,6), T6=(6,6) Ready Time T4T6T5 16 P1P1 P2P2 012 Time T1 T2 T4 236 T3

25 25 Global Queue Time 6 Task 5(c1=6) dequeue id = 1 STNT1 = 6, STNT2 = 6 EET5 = max{1, 6, 6} + 6 STNT1 = 12 Cpu Speed 6/(12-6)  100 % Task 6(c1=6) dequeue id = 2 STNT1 = 12, STNT2 = 6 EET6 = max{6, 6, 6} + 6 STNT2 = 12 Cpu Speed 6/(12-6)  100 % Algorithm : Example Step 4 T1=(3,1), T2=(2,2), T3=(4,4), T4=(3,3), T5=(6,6), T6=(6,6) Ready Time T6T5 16 P1P1 P2P2 012 Time T1 T2 T3 T4 T5 T6 Meet Deadline !!

26 26 Conclusion - Good Performance Result. Up to 60% power saving in simulation. - Problem for LSSR Need to reorder ready queue before start scheduling.  Enhanced List Scheduling with Shared Slack Reclamation This technique does not need reordering queue


Download ppt "1 “Scheduling with Dynamic Voltage/Speed Adjustment Using Slack Reclamation In Multi-processor Real-Time Systems” Dakai Zhu, Rami Melhem, and Bruce Childers."

Similar presentations


Ads by Google