290 likes | 548 Views
Power Aware Real-time Systems. Daniel Mosse. A joint project with profs Rami Melhem Bruce Childers Ahmed Amer Trying to rope in everyone else. And students Nevine Abougazaleh Cosmin Rusu Dakai Zhu Sameh Gobriel Matt Craven Ruibin Xu. Outline. Introduction to real-time systems
E N D
Power AwareReal-time Systems Daniel Mosse A joint project with profs Rami Melhem Bruce Childers Ahmed Amer Trying to rope in everyone else And students Nevine Abougazaleh Cosmin Rusu Dakai Zhu Sameh Gobriel Matt Craven Ruibin Xu
Outline • Introduction to real-time systems • Introduction to power management • Speed adjustment in frame-based systems • Dynamic speed adjustment in multiprocessor environment • Tradeoff between energy consumption and reliability • Saving power in wireless networks
Real-time systems Hard RT systems Soft RT systems Periodic Aperiodic (frame-based) non preemptive non preemptive preemptive preemptive parallel processors uni-processor
REAL-TIME SYSTEMS Hard Real Time system guarantee deadlines • To guarantee deadlines, we need to know worst case execution times • Predictability: need to know if deadlines may be missed Soft Real Time system try to meet deadlines • If a deadline is missed, there is a penalty • Provides statistical guarantees (probabilistic analysis) • Need to know the statistical distribution of execution times Applications: Safety critical systems, control and command systems, robotics, Communication, multimedia
3 2 4 7 Periodic, EDF scheduling • n tasks with maximum computation times Ci and periods Ti, for i=1,…,n. C=2, T=4 C=3, T=7 • Dynamic priority scheduling (high priority to the task with earlier deadline) • All tasks will meet their deadlines if utilization is not more than 1. • Task set utilization is percentage of CPU used by all tasks: • This example: +
Outline • Introduction to real-time systems • Introduction to power management • Speed adjustment in frame-based systems • Dynamic speed adjustment in multiprocessor environment • Tradeoff between energy consumption and reliability • Saving power in wireless networks
Power Management • Why & What: Power Management? • Battery operated: Laptop, PDA and Cell phone • Heating : complex Servers (multiprocessors) • Power Aware: maintainQoS, reduce energy • How? • Power off un-used parts: LCD, disk for Laptop • Gracefully reduce the performance • CPU: dynamic power Pd = Cef*Vdd2*f [Chandrakasan-1992, Burd-1995] • Cef : switch capacitance • Vdd : supply voltage • f : processor frequency linear related to Vdd
Energy f 0.6E T1 T2 T2 T1 time 0.6E T1 T2 time fmax/2 E/4 T1 T2 time Power Aware Scheduling • Static Power Management (SPM) • Static slack: uniformly slow all tasks [Weiser-1994, Yao-1995, Gruian-2000] fmax Static Slack D E T1 T2 idle time
Dynamic Slack fmax/2 T1 time fmax/3 0.12E T1 T2 time Power Management • Dynamic Power Management (DPM) • Dynamic slack: non-worst execution 10% [Ernst-1997] • DPM: [Krishna-2000, Kumar-2000, Pillai-2001, Shin-2001] fmax Static Slack D E T1 T2 idle time E/4 fmax/2 T1 T2 time • Multi-Processor • SPM: length of schedule over deadline • DPM ???
Outline • Introduction to real-time systems • Introduction to power management • Speed adjustment in frame-based systems • Dynamic speed adjustment in multiprocessor environment • Tradeoff between energy consumption and reliability • Saving power in wireless networks
CPU speed deadline WCET Smax Smin time Speed adjustment in frame-based systems Static speed adjustment Assumption: all tasks have the same deadline. Smax Smin time Select the speed based on worst-case execution time,WCET, and deadline
Dynamic Speed adjustment techniques for linear code WCET time PMP PMP ACET time PMP Speed adjustment based on remaining WCET Note: a task very rarely consumes its estimated worst case execution time.
Dynamic Speed adjustment techniques for linear code Remaining WCET time PMP PMP Remaining time time PMP Speed adjustment based on remaining WCET
Dynamic Speed adjustment techniques for linear code Remaining WCET time PMP PMP Remaining time time PMP Speed adjustment based on remaining WCET
Dynamic Speed adjustment techniques for linear code time PMP PMP time Speed adjustment based on remaining WCET
time Greedy speed adjustment: Give reclaimed slack to next task rather than all future tasks Dynamic Speed adjustment techniques for linear code time PMP PMP time Speed adjustment based on remaining WCET
Dynamic Speed adjustment techniques for linear code WCET WCE WCE WCE time Remaining time ACET Remaining av. ex. time AV AV Smax time PMP Smax WCE WCE time Speed adjustment based on remaining average execution time
An alternate point of view WCET WCE WCE WCE time ACET WCE AV time PMP stolen slack Reclaimed slack WCE WCE time
Dynamic Speed adjustment techniques for non-linear code PMP p1 p3 p2 min average max At a PMP • Remaining WCET is based on the longest path • Remaining average case execution time is based on the branching probabilities (from trace information).
Greedy dynamic speed adjustment correct • Giving reclaimed slack to the next ready task is not always a correct scheme incorrect PMP • Theorem: A reclaimed slack has to be associated with a deadline and can be given safely to a task with an earlier or equal deadline.
aggressive dynamic speed adjustment • Theorem: if tasks 1, …, k are ready and will complete before the next task arrival, then we can swap the time allocation of the k tasks. That is we can add stolen slack to the reclaimed slack PMP • Experimental rule: Do not be very aggressive and reduce the speed of a task below a certain speed (the optimal speed determined by Uav)
Outline • Introduction to real-time systems • Introduction to power management • Speed adjustment in frame-based systems • Dynamic speed adjustment in multiprocessor environment • Tradeoff between energy consumption and reliability • Saving power in wireless networks
T1 (1,2/3) 40% 60% (2,1) (1,1) (4,2) (3,2) T2 T3 T4 T5 (1,1) T6 (1,1) The Example T7 Multiprocs and AND/OR Applications • Real-Time Application • Set of tasks • Single Deadline • Directed Acyclic Graph (DAG) • Comp. (ci, ai) • AND (0,0) • OR (0,0): probabilities Ti
f T3 T2 T6 T7 T7 T1 T1 T5 T4 0 0 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 time time Shifting D f T3 L1 L1 T2 T6 T7 L0 T1 T5 T4 Slack Stealing • Shifting Static Schedule: 2-proc, D = 8 ` D L0 Recursive if embedded OR nodes
Proposed Algorithms • Greedy algorithm, two phases: • Off-line: longest task first heuristic; Slack stealing via shifting: LSTi , EOi • On-line: • Same execution order • Claim the slack: LSTi – ti (tiLSTi) • Compute speed: • Meet timing requirement[Zhu-2001]
L1 D T3 T6 T7 0 1 2 3 T2 4 5 6 7 8 time T1 L0 Proposed Algorithms (cont) • Actual Running Trace: left branch,Ti use ai f • Possible Shortcomings • Number of Speed change (overhead) • Too greedy: slow fast
Speculation: statistical information about Application • Static Speculation • All tasks • fi = max ( fss, fgi) • Adaptive Speculation • Remaining tasks • fi = max ( fas, fgi) Proposed Algorithms (cont) • Optimal for uniprocessor: Single speed • Energy – Speed: Concave • Minimal Energy when all tasks SAME speed
References • [Chandrakasan-1992] A. P. Chandrakasan and S. Sheng and R. W. Brodersen. Low-Power CMOS Digital Design. IEEE Journal of Solidstate Circuit, V27, N4, April 1992, pp 473--484 • [Burd-1995] T. D. Burd and R. W. Brodersen. Energy efficient cmos microprocessor design. In Proc. of The HICSS Conference, pages 288-297, Maui, Hawaii, Jan. 1995. • [Weiser-1994] M. Weiser, B. Welch, A. J. Demers, and S. Shenker. Scheduling for reduced CPU energy. In Operating Systems Design and Implementation, pages 13-23, 1994 • [Yao-1995] F. Yao, A. Demers, and S. Shenker. A scheduling model for reduced cpu energy. In Proc. of The 36th Annual Symposium on Foundations of Computer Science, pages 374-382, Milwaukee, WI, Oct. 1995. • [Gruian-2000] F. Gruian. System-Level Design Methods for Low-Energy Architectures Containing Variable Voltage Processors. The Power-Aware Computing Systems 2000 Workshop at ASPLOS 2000, Cambridge, MA, November 2000 • [Ernst-1997] R. Ernst and W. Ye. Embedded program timing analysis based on path clustering and architecture classification. In Proc. of The International Conference on Computer-Aided Design, pages 598–604, San Jose, CA, Nov. 1997. • [Krishna-2000] C. M. Krishna and Y. H. Lee. Voltage clock scaling adaptive scheduling techniques for low power in hard real-time systems. In Proc. of The 6th IEEE Real-Time Technology and Applications Symposium (RTAS00), Washington D.C., May. 2000. • [Kumar-2000] P. Kumar and M. Srivastava, Predictive Strategies for Low-Power RTOS Scheduling, Proceedings of the 2000 IEEE International Conference on Computer Design: VLSI in Computers and Processors • [Pillai-2001] P. Pillai and K. G. Shin. Real-Time Dynamic Voltage Scaling for Low-Power Embedded Operating Systems, 18th ACM Symposium on Operating Systems Principles (SOSP?1), Banff, Canada, Oct. 2001 • [Shin-2001] D. Shin, J. Kim and S. Lee, Intra-Task Voltage Scheduling for Low-Energy Hard Real-Time Applications, IEEE Design and Test of Computers, March 2001 • [Zhu-2001] D. Zhu, R. Melhem, and B. Childers. Scheduling with Dynamic Voltage/Speed Adjustment Using Slack Reclamation in Multi-Processor RealTime Systems, RTSS'01 (Real-Time Systems Symposium), London, England, Dec 2001 152