230 likes | 351 Views
Preemption Handling and Scalability of Feedback DVS-EDF. Yifan Zhu , Frank Mueller mueller@cs.ncsu.edu Center for Embedded Systems Research / Department of Computer Science North Carolina State University. Background. Dynamic voltage scaling
E N D
Preemption Handling and Scalability of Feedback DVS-EDF Yifan Zhu , Frank Mueller mueller@cs.ncsu.edu Center for Embedded Systems Research / Department of Computer Science North Carolina State University
Background • Dynamic voltage scaling • Reduce energy consumption by lowering the supply voltage and operating frequency • Energy consumption scales • lineally with frequency • quadratically with voltage E ~ f V² • Hard real-time system • Actual exec. time Worst case exec. time (WCET) • Most practical system: utilization<1 NC State University
DVS-EDF • Original EDF: • DVS-EDF: , =scaling level • Greedily scale current task • Capitalize on early completion NC State University
slack Slack Generation • Two opportunities for slack generation: 1. Early completion of tasks 2. Idle slots WCET c1j T1 T1 T2 T3 NC State University
Idle Slots --> Slack • Introducing idle task into the task set, to convert idle time slots into slack • We choose so that there is at least one idle time slot lying between any actual task’s invocation (actual exec. time=0) NC State University
C1 (WCET) slack c1j T1 T2 t2 t4 t5 t8 t9 Slack Passing • Slack generated by one task will usually not be exhausted when the task completes • Initial slack capable to be passed on = C1-c1j S=S+C1-c1j, Note: it’s possible that c1j > C1, as long as the total slack is not over- exploited d1 d2 NC State University
r2 r2 r2 d1 d1 d1 T1 T1 T1 T2 T2 T2 t1 t1 t1 Deadline Restriction • Initial slack can’t be passed in full to the next task. Slack beyond the next task’s release time and deadline cannot be used. • Assume: T1’s deadline is d1, T2 releases at r2 • T2 can use: all the slack part of the slack none of the slack r2<t1 t1 r2<d1 d1 t2 NC State University
d1 d2 C1 (WCET) slack c1j idle T1 T2 t2 t4 t5 t8 t9 Adding Idle Slots • Total slack can be further increased if idle task exists between T1 and T2’s deadline slack = slack + idle(d1…d2) NC State University
Preemption Handling • Preempted task relinquishes its remaining slack, passing it on to the next task • Two differences here • Preempted task itself cannot generate any slack • Remaining exec. time of the preempted task must be reserved in advance NC State University
idle idle idle idle idle idle idle Forward Sweep Scheme • Remaining exec. time is reserved by stealing slack from the next task • Assume: = 3 slots • Forward sweep: zero slack for T2 and T3 (in the worst case, if P2>>P1, T2 is likely to get no slack always) T1 preempted T1 cont. T3 T2 t1 t2 d2 d3 d1 NC State University
idle idle idle idle idle idle idle Backward Sweep Scheme • Remaining exec. time is reserved as late as possible ( but no later than the preempted task’s deadline ). Assume: = 3 slots Backward sweep: 2 idle slots for T2, 1 idle slots for T3 • More greedy than forward sweep scheme T1 preempted T1 cont. T3 T2 t1 t2 d2 d3 d1 NC State University
Feedback Scheme • Split task k: Ck = Ca + Cb • The average actual exec. time of Ck over past is used to anticipate future Ca portions. 100% Ck Ca Cb • the 1st instance of Ck: • later instances: NC State University
Experiments • Parameters: 3-task sets and 10-tasks sets • Vary: utilization and cc/WCET • Compare • Look-ahead DVS [Pillai et al.] • Our feedback DVS • Optimal: ideal scaling, disregard deadline • All energy values are relative to Look-ahead DVS : • Look-ahead DVS : 0% • Ours: additional savings over Look-ahead DVS NC State University
Scalability ( lowest workload) • cc=25%WCET Look-ahead DVS NC State University
Look ahead DVS Scalability ( medium workload) • cc=50% WCET NC State University
Look ahead DVS Scalability ( higher workload) • cc= 75% WCET NC State University
Look ahead DVS major savings minor losses Scalability ( maximum workload) • cc= 100% WCET NC State University
Feedback Effect • Varying actual exec. time of task set • Actual exec. time (cc) always equals to 50% WCET • Actual exec. Time = sin(t), in [0.1WCET, 0.9 WCET] WCET cc 50% t WCET cc 50% t NC State University
Feedback Effect • Not much difference good! • Feedback scheme compensates for fluctuations NC State University
Conclusion • Feedback-EDF DVS for hard real-time systems • Slack generation and passing • Slots reservation at preemption points • Up to 37% additional energy savings over the best prior work • Scalability: 3-tasks and 10-tasks show savings. NC State University
Future Work • Time penalty for voltage changes • Cost depends on architecture (getting smaller) • Experiments with embedded device • Handling of dependent tasks NC State University
Related Work • Pillai et al. [SOSP’01] • Assuming same scaling factor for all real-time tasks • Look ahead DVS • F. Gruian [ISLPED’01] • Deriving dual-voltage schedule from the ideal case with stochastic information • D. Mosse et al. [RTSS’01] • Dynamically exploiting early completion of tasks’ future executions NC State University
Slack Passing (Over-Scaling) • Over-scaling: • actual exec. time > WCET • is feasible if the total slack is not exceeded as well Slack=C1-c1j<0 T2 can still be scaled without any deadline misses as long as S=S+C1-c1j >0 C1 (WCET) c1j T2 T1 t2 t4 t5 d1 d2 NC State University