Power Aware Realtime Systems A joint project with

  • Slides: 27
Download presentation
Power Aware Real-time Systems A joint project with profs Rami Melhem Bruce Childers Ahmed

Power Aware Real-time Systems 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 n Introduction to real-time systems n Introduction to power management n Speed adjustment

Outline n Introduction to real-time systems n Introduction to power management n Speed adjustment in frame-based systems n Dynamic speed adjustment in multiprocessor environment n Tradeoff between energy consumption and reliability n Saving power in wireless networks

Real-time systems Hard RT systems Periodic preemptive non preemptive uni-processor Soft RT systems Aperiodic

Real-time systems Hard RT systems Periodic preemptive non preemptive uni-processor Soft RT systems Aperiodic (frame-based) preemptive non preemptive parallel processors

REAL-TIME SYSTEMS Hard Real Time system guarantee deadlines • To guarantee deadlines, we need

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

Periodic, EDF scheduling • n tasks with maximum computation times Ci and periods Ti,

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: 24 + 37

Outline n Introduction to real-time systems n Introduction to power management n Speed adjustment

Outline n Introduction to real-time systems n Introduction to power management n Speed adjustment in frame-based systems n Dynamic speed adjustment in multiprocessor environment n Tradeoff between energy consumption and reliability n Saving power in wireless networks

Power Management n Why & What: Power Management? o o o n Battery operated:

Power Management n Why & What: Power Management? o o o n Battery operated: Laptop, PDA and Cell phone Heating : complex Servers (multiprocessors) Power Aware: maintain Qo. S, reduce energy How? o o Power off un-used parts: LCD, disk for Laptop Gracefully reduce the performance l CPU: dynamic power Pd = Cef*Vdd 2*f [Chandrakasan-1992, Burd-1996] m Cef : switch capacitance m Vdd : supply voltage m f : processor frequency linear related to Vdd

Power Aware Scheduling n Static Power Management (SPM) o Static slack: uniformly slow all

Power Aware Scheduling n Static Power Management (SPM) o Static slack: uniformly slow all tasks [Weiser-1994, Yao-1995, fmax Static Slack T 1 T 2 idle T 2 T 1 T 1 T 2 0. 6 E T 2 T 1 0. 6 E time fmax/2 f E time Gruian-2000] Energy D T 2 E/4 time

Power Management n Dynamic Power Management (DPM) o o Dynamic slack: non-worst execution 10%

Power Management n Dynamic Power Management (DPM) o o Dynamic slack: non-worst execution 10% [Ernst-1994] DPM: [Krishna-2000, Kumar-2000, Pillai-2001, Shin-2001] fmax Static Slack T 1 T 2 idle D E time fmax/2 T 1 T 2 E/4 time fmax/2 Dynamic Slack n Multi-Processor SPM: length of schedule over deadline o DPM ? ? ? T 1 time o fmax/3 T 1 T 2 0. 12 E time

Outline n Introduction to real-time systems n Introduction to power management n Speed adjustment

Outline n Introduction to real-time systems n Introduction to power management n Speed adjustment in frame-based systems n Dynamic speed adjustment in multiprocessor environment n Tradeoff between energy consumption and reliability n Saving power in wireless networks

Speed adjustment in frame-based systems Static speed adjustment Assumption: all tasks have the same

Speed adjustment in frame-based systems Static speed adjustment Assumption: all tasks have the same deadline. CPU speed WCET 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 ACET time Speed adjustment based

Dynamic Speed adjustment techniques for linear code WCET time ACET time 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 Remaining time Speed adjustment

Dynamic Speed adjustment techniques for linear code Remaining WCET time Remaining time Speed adjustment based on remaining WCET

Dynamic Speed adjustment techniques for linear code Remaining WCET time Remaining time Speed adjustment

Dynamic Speed adjustment techniques for linear code Remaining WCET time Remaining time Speed adjustment based on remaining WCET

Dynamic Speed adjustment techniques for linear code time Speed adjustment based on remaining WCET

Dynamic Speed adjustment techniques for linear code time Speed adjustment based on remaining WCET

Dynamic Speed adjustment techniques for linear code time Speed adjustment based on remaining WCET

Dynamic Speed adjustment techniques for linear code 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 WCET WCE ACET Smax WCE time Remaining

Dynamic Speed adjustment techniques for linear code WCET WCE ACET Smax WCE time Remaining av. ex. time AV AV time Smax WCE Speed adjustment based on remaining average execution time

An alternate point of view WCET WCE WCE time ACET WCE Reclaimed slack WCE

An alternate point of view WCET WCE WCE time ACET WCE Reclaimed slack WCE AV time stolen slack WCE time

Dynamic Speed adjustment techniques for non-linear code p 1 p 2 p 3 min

Dynamic Speed adjustment techniques for non-linear code p 1 p 2 p 3 min average At a • Remaining WCET is based on the longest path • Remaining average case execution time is based on the branching probabilities (from trace information). max

correct Greedy dynamic speed adjustment incorrect § Giving reclaimed slack to the next ready

correct Greedy dynamic speed adjustment incorrect § Giving reclaimed slack to the next ready task is not always a correct scheme § 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

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 § 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 n Introduction to real-time systems n Introduction to power management n Speed adjustment

Outline n Introduction to real-time systems n Introduction to power management n Speed adjustment in frame-based systems n Dynamic speed adjustment in multiprocessor environment n Tradeoff between energy consumption and reliability n Saving power in wireless networks

Multiprocs and AND/OR Applications n Real-Time Application (1, 2/3) Set of tasks o Single

Multiprocs and AND/OR Applications n Real-Time Application (1, 2/3) Set of tasks o Single Deadline o Directed Acyclic Graph (DAG) o o o Ti Comp. (ci, ai) AND (0, 0) OR (0, 0): probabilities 40% 60% (2, 1) n T 1 (1, 1) T 2 (4, 2) T 3 (3, 2) T 4 T 5 (1, 1) T 6 (1, 1) T 7 The Example

Slack Stealing n Shifting Static Schedule: 2 -proc, D = 8 f T 3

Slack Stealing n Shifting Static Schedule: 2 -proc, D = 8 f T 3 T 2 T 1 D L 1 T 6 L 0 T 7 T 5 ` T 4 0 1 2 3 4 5 6 7 8 time Shifting Recursive if embedded OR nodes f L 1 L 0 D T 3 T 2 T 1 T 6 T 7 T 5 T 4 0 1 2 3 4 5 6 7 8 time

Proposed Algorithms n Greedy algorithm, two phases: o. Off-line: longest task first heuristic; Slack

Proposed Algorithms n Greedy algorithm, two phases: o. Off-line: longest task first heuristic; Slack stealing via shifting: LSTi , EOi o. On-line: l Same execution order l Claim the slack: LSTi – ti (ti LSTi) l Compute speed: l Meet timing requirement [Zhu-2001]

Proposed Algorithms (cont) Actual Running Trace: left branch, Ti use ai n L 1

Proposed Algorithms (cont) Actual Running Trace: left branch, Ti use ai n L 1 D f T 3 L 0 n 1 2 3 4 5 6 Possible Shortcomings o Number T 7 T 2 T 1 0 T 6 of Speed change (overhead) o Too greedy: slow fast 7 8 time

Proposed Algorithms (cont) n Optimal for uniprocessor: Single speed o o n Energy –

Proposed Algorithms (cont) n Optimal for uniprocessor: Single speed o o n Energy – Speed: Concave Minimal Energy when all tasks SAME speed Speculation: statistical information about Application o Static l l Speculation All tasks fi = max ( fss, fgi) o Adaptive l l Speculation Remaining tasks fi = max ( fas, fgi)