36
Power Aware Power Aware Real-time Systems Real-time Systems A joint project with profs Daniel Mosse Bruce Childers Mootaz Elnozahy (IBM Austin) And students Nevine Abougazaleh Cosmin Rusu Dakai Zhu Ruibin Xu Matt Craven Sameh Gobriel

Power Aware Real-time Systems A joint project with profs Daniel Mosse Bruce Childers Mootaz Elnozahy (IBM Austin) And students Nevine Abougazaleh Cosmin

Embed Size (px)

Citation preview

Page 1: Power Aware Real-time Systems A joint project with profs Daniel Mosse Bruce Childers Mootaz Elnozahy (IBM Austin) And students Nevine Abougazaleh Cosmin

Power AwarePower AwareReal-time SystemsReal-time Systems

A joint project with profsDaniel Mosse

Bruce Childers Mootaz Elnozahy (IBM Austin)

And studentsNevine Abougazaleh

Cosmin RusuDakai ZhuRuibin Xu

Matt CravenSameh Gobriel

Page 2: Power Aware Real-time Systems A joint project with profs Daniel Mosse Bruce Childers Mootaz Elnozahy (IBM Austin) And students Nevine Abougazaleh Cosmin

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

Page 3: Power Aware Real-time Systems A joint project with profs Daniel Mosse Bruce Childers Mootaz Elnozahy (IBM Austin) And students Nevine Abougazaleh Cosmin

Hard RT systems

Periodic Aperiodic(frame-based)

preemptive nonpreemptive preemptive

nonpreemptive

uni-processor parallel processors

Soft RT systems

Real-time systems

Page 4: Power Aware Real-time Systems A joint project with profs Daniel Mosse Bruce Childers Mootaz Elnozahy (IBM Austin) And students Nevine Abougazaleh Cosmin

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

Page 5: Power Aware Real-time Systems A joint project with profs Daniel Mosse Bruce Childers Mootaz Elnozahy (IBM Austin) And students Nevine Abougazaleh Cosmin

• n tasks with maximum computation times Ci and periods Ti, for i=1,…,n.

• 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: +

C=2, T=4

C=3, T=7

Periodic, EDF scheduling

24

37

Page 6: Power Aware Real-time Systems A joint project with profs Daniel Mosse Bruce Childers Mootaz Elnozahy (IBM Austin) And students Nevine Abougazaleh Cosmin

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

Page 7: Power Aware Real-time Systems A joint project with profs Daniel Mosse Bruce Childers Mootaz Elnozahy (IBM Austin) And students Nevine Abougazaleh Cosmin

Power Management

Why & What: Power Management?Battery operated: Laptop, PDA and Cell phoneHeating : complex Servers (multiprocessors)Power Aware: maintain QoS, reduce energy

How?Power off un-used parts: LCD, disk for LaptopGracefully reduce the performance

CPU: dynamic power Pd = Cef*Vdd2*f [Chandrakasan-1992, Burd-

1996] Cef : switch capacitance Vdd : supply voltage f : processor frequency linear related to Vdd

Page 8: Power Aware Real-time Systems A joint project with profs Daniel Mosse Bruce Childers Mootaz Elnozahy (IBM Austin) And students Nevine Abougazaleh Cosmin

Power Aware Scheduling

T1

Dfmax

time

Static Power Management (SPM) Static slack: uniformly slow all

tasks [Weiser-1994, Yao-1995, Gruian-2000]

T2

EStatic Slack

Energy

fT1 T2

idle

timeT1

timeT2

T2

T1

0.6E

0.6E

timeT1 T2

fmax/2 E/4

Page 9: Power Aware Real-time Systems A joint project with profs Daniel Mosse Bruce Childers Mootaz Elnozahy (IBM Austin) And students Nevine Abougazaleh Cosmin

Power Management

T1

Dfmax

time

time

Dynamic Power Management (DPM) Dynamic slack: non-worst execution

10% [Ernst-1994] DPM: [Krishna-2000, Kumar-2000,

Pillai-2001, Shin-2001]

T1

T2

T2

fmax/2

Static Slack

idleE

E/4

timeT1 T2

fmax/3 0.12E

timeT1

fmax/2Dynamic Slack Multi-Processor

SPM: length of schedule over deadline

DPM ???

Page 10: Power Aware Real-time Systems A joint project with profs Daniel Mosse Bruce Childers Mootaz Elnozahy (IBM Austin) And students Nevine Abougazaleh Cosmin

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

Page 11: Power Aware Real-time Systems A joint project with profs Daniel Mosse Bruce Childers Mootaz Elnozahy (IBM Austin) And students Nevine Abougazaleh Cosmin

time

Smax

Smin

Select the speed based on worst-case execution time,WCET, and deadline

CPU speed

time

deadline

Smax

Smin

WCET

Speed adjustment in frame-based systems

Assumption: all tasks have the same deadline.

Static speed adjustment

Page 12: Power Aware Real-time Systems A joint project with profs Daniel Mosse Bruce Childers Mootaz Elnozahy (IBM Austin) And students Nevine Abougazaleh Cosmin

Dynamic Speed adjustment techniques

for linear code

time

time

WCET

ACET

Speed adjustment based on remaining WCET

Note: a task very rarely consumes its estimated worst case execution time.

Page 13: Power Aware Real-time Systems A joint project with profs Daniel Mosse Bruce Childers Mootaz Elnozahy (IBM Austin) And students Nevine Abougazaleh Cosmin

Dynamic Speed adjustment techniques

for linear code

time

time

Remaining WCET

Remaining time

Speed adjustment based on remaining WCET

Page 14: Power Aware Real-time Systems A joint project with profs Daniel Mosse Bruce Childers Mootaz Elnozahy (IBM Austin) And students Nevine Abougazaleh Cosmin

Dynamic Speed adjustment techniques

for linear code

time

time

Remaining WCET

Remaining time

Speed adjustment based on remaining WCET

Page 15: Power Aware Real-time Systems A joint project with profs Daniel Mosse Bruce Childers Mootaz Elnozahy (IBM Austin) And students Nevine Abougazaleh Cosmin

Dynamic Speed adjustment techniques

for linear code

time

time

Speed adjustment based on remaining WCET

Page 16: Power Aware Real-time Systems A joint project with profs Daniel Mosse Bruce Childers Mootaz Elnozahy (IBM Austin) And students Nevine Abougazaleh Cosmin

An alternate point of view

timeWCE WCE WCE

time

WCET

ACET

time

AV

WCE WCE

WCE

Reclaimed slack

stolen slack

Page 17: Power Aware Real-time Systems A joint project with profs Daniel Mosse Bruce Childers Mootaz Elnozahy (IBM Austin) And students Nevine Abougazaleh Cosmin

Dynamic Speed adjustment techniques

for non-linear code

• Remaining WCET is based on the longest path• Remaining average case execution time is based on

the branching probabilities (from trace information).

At a

p3p2p1

min average max

Page 18: Power Aware Real-time Systems A joint project with profs Daniel Mosse Bruce Childers Mootaz Elnozahy (IBM Austin) And students Nevine Abougazaleh Cosmin

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

Page 19: Power Aware Real-time Systems A joint project with profs Daniel Mosse Bruce Childers Mootaz Elnozahy (IBM Austin) And students Nevine Abougazaleh Cosmin

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

T1

T2 T3 T4 T5

(1,2/3)

(2,1) (1,1) (4,2) (3,2)

T7

T6

(1,1)

(1,1)

60% 40%

The Example

Ti

Page 20: Power Aware Real-time Systems A joint project with profs Daniel Mosse Bruce Childers Mootaz Elnozahy (IBM Austin) And students Nevine Abougazaleh Cosmin

Slack Stealing

Shifting Static Schedule: 2-proc, D = 8

0 1 2 3 4 5 6 7 8 time

f

T1

T4

T5

T7

D

L0

T1

T4

T5

T7

f

0 1 2 3 4 5 6 7 8 time

Shifting

D

L0

T3

T2 T6L1

Recursive if embedded OR nodes

T3

T2 T6

T1T7

`L1

Page 21: Power Aware Real-time Systems A joint project with profs Daniel Mosse Bruce Childers Mootaz Elnozahy (IBM Austin) And students Nevine Abougazaleh Cosmin

Proposed Algorithms

Greedy algorithm, two phases:Off-line: longest task first heuristic; Slack

stealing via shifting: LSTi , EOi

On-line:Same execution orderClaim the slack: LSTi – ti (tiLSTi)Compute speed:

Meet timing requirement [Zhu-2001]

ii

iig Slackc

cff

max

Page 22: Power Aware Real-time Systems A joint project with profs Daniel Mosse Bruce Childers Mootaz Elnozahy (IBM Austin) And students Nevine Abougazaleh Cosmin

Proposed Algorithms (cont)

Actual Running Trace: left branch, Ti use ai

Possible ShortcomingsNumber of Speed change (overhead)Too greedy: slow fast

T7

f

0 1 2 3 4 5 6 7 8 time

D

T6

T1

L0

T3

T2

L1

Page 23: Power Aware Real-time Systems A joint project with profs Daniel Mosse Bruce Childers Mootaz Elnozahy (IBM Austin) And students Nevine Abougazaleh Cosmin

Optimal for uniprocessor: Single speed Energy – Speed: Concave Minimal Energy when all tasks SAME speed

Speculation: statistical information about ApplicationStatic Speculation

All tasks fi = max ( fss, fg

i)

Adaptive Speculation Remaining tasks fi = max ( fas, fg

i)

D

wf

allaverage

ss

r

remainingaverage

as time

wf

Proposed Algorithms (cont)

Page 24: Power Aware Real-time Systems A joint project with profs Daniel Mosse Bruce Childers Mootaz Elnozahy (IBM Austin) And students Nevine Abougazaleh Cosmin

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

Page 25: Power Aware Real-time Systems A joint project with profs Daniel Mosse Bruce Childers Mootaz Elnozahy (IBM Austin) And students Nevine Abougazaleh Cosmin

Basic hypothesis:Dependable systems must include redundant capacity

in either time or space (or both)Redundancy can also be exploited to reduce power

consumption

Tradeoff: energy & dependability

Time redundancy(checkpointing and rollbacks) Space redundancy

Page 26: Power Aware Real-time Systems A joint project with profs Daniel Mosse Bruce Childers Mootaz Elnozahy (IBM Austin) And students Nevine Abougazaleh Cosmin

Exploring time redundancy

deadline

The slack can be used to

1) add checkpoints

2) reserve recovery time

3) reduce processing speed

For a given number of checkpoints,we can find the speed that minimizes

energy consumption, while guaranteeing recovery and timeliness.

Smax

Page 27: Power Aware Real-time Systems A joint project with profs Daniel Mosse Bruce Childers Mootaz Elnozahy (IBM Austin) And students Nevine Abougazaleh Cosmin

More checkpoints = more overhead + less recovery slack

D

C

r

Optimal number of checkpoints

For a given slack (C/D) and checkpoint overhead (r/C),we can find the number of checkpointsthat minimizes energy consumption, and guarantee recovery and timeliness.

# of checkpoints

Energy

Page 28: Power Aware Real-time Systems A joint project with profs Daniel Mosse Bruce Childers Mootaz Elnozahy (IBM Austin) And students Nevine Abougazaleh Cosmin

Non-uniform check-pointing

Observation: May continue executing at Smax after recovery.

Advantage: recovery in an early section can use slack created by execution of later sections at Smax

Disadvantage: increases energy consumption when a fault occurs (a rare event)

Requires non-uniform checkpoints.

Page 29: Power Aware Real-time Systems A joint project with profs Daniel Mosse Bruce Childers Mootaz Elnozahy (IBM Austin) And students Nevine Abougazaleh Cosmin

Non-uniform check-pointing

Can find # of checkpoints, their distribution, and the CPU speedsuch that energy is minimized, recovery is guaranteed and deadlines are met

Page 30: Power Aware Real-time Systems A joint project with profs Daniel Mosse Bruce Childers Mootaz Elnozahy (IBM Austin) And students Nevine Abougazaleh Cosmin

Triple Modular Redundancy vs. Duplex

TMR: vote and exclude the faulty result

Duplex: Compare and roll-back if different results

Load=0.7

Load=0.5

Load=0.6

Energy efficiency of TMR Vs. Duplex depends on , and load

Duplex is more Energy efficient

TMR is more Energy efficient

0.02

0.035Load=0.7

Load

0.1 0.2

: overhead of checkpoint

: ratio of static/dynamic power

: slack in the system

Page 31: Power Aware Real-time Systems A joint project with profs Daniel Mosse Bruce Childers Mootaz Elnozahy (IBM Austin) And students Nevine Abougazaleh Cosmin

Outline

Introduction to real-time systems

Introduction to power management

Speed adjustment in frame-based systems

Dynamic speed adjustment in multiprocessor environment

Maximizing computational reward for given energy and deadline

Tradeoff between energy consumption and reliability

Saving power in wireless networks

Page 32: Power Aware Real-time Systems A joint project with profs Daniel Mosse Bruce Childers Mootaz Elnozahy (IBM Austin) And students Nevine Abougazaleh Cosmin

Saving Power

Power is proportional to the square of the distance

The closer the nodes, the less power is needed

Power-aware Routing (PARO) identifies new nodes “between” other nodes and re-routes packets to save energy

Nodes decide to reduce/increase their transmit power

Page 33: Power Aware Real-time Systems A joint project with profs Daniel Mosse Bruce Childers Mootaz Elnozahy (IBM Austin) And students Nevine Abougazaleh Cosmin

Asymmetry in Transmit Power

Instead of C sending directly to A, it can go through B

Saves transmit power, but may cause some problems.

AB

C

AB

C

Page 34: Power Aware Real-time Systems A joint project with profs Daniel Mosse Bruce Childers Mootaz Elnozahy (IBM Austin) And students Nevine Abougazaleh Cosmin

Problems due to one-way links.

Collision avoidance (RTS/CTS) scheme is impaired Even across bidirectional links!

Unreliable transmissions through one-way link. May need multi-hop Acks at Data Link Layer.

Link outage can be discovered only at downstream nodes.

A B C

RTSCTS XCTS

MSG MSG MSG

Page 35: Power Aware Real-time Systems A joint project with profs Daniel Mosse Bruce Childers Mootaz Elnozahy (IBM Austin) And students Nevine Abougazaleh Cosmin

Problems for Routing Protocols

Route discovery mechanism.Cannot reply using inverse path of route request.Need to identify unidirectional links. (AODV)

Route Maintenance.Need explicit neighbor discovery mechanism.

Connectivity of the network.Gets worse (partitions!) if only bidirectional links

are used.

Page 36: Power Aware Real-time Systems A joint project with profs Daniel Mosse Bruce Childers Mootaz Elnozahy (IBM Austin) And students Nevine Abougazaleh Cosmin

Wireless bandwidth and Power savings

In addition to transmit power, what else can we do to save energy?

Power has a direct relation with signal to noise ratio (SNR)The higher the power, the higher the signal, the less noise, the

less errors, the more data a node can transmitIncreasing the power allows for higher bandwidth

Is it useful to explore the power/bandwidth problem? Is it easy to characterize the problem?