dynamic power management in embedded systems - tu dresden

49
Fakultät Informatik – Institut für Systemarchitektur – Professur Rechnernetze Dynamic Power Management in Embedded Systems Waltenegus Dargie Waltenegus Dargie TU Dresden Chair of Computer Networks

Upload: others

Post on 02-May-2022

10 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Dynamic Power Management in Embedded Systems - TU Dresden

Fakultät Informatik – Institut für Systemarchitektur – Professur Rechnernetze

Dynamic Power Management in Embedded Systems

Waltenegus DargieWaltenegus DargieTU DresdenChair of Computer Networks

Page 2: Dynamic Power Management in Embedded Systems - TU Dresden

Outline

• Motivation• Aspects of power consumption• Selective switchingg• Dynamic scaling• Research Issues• Research Issues

2

Page 3: Dynamic Power Management in Embedded Systems - TU Dresden

Motivation

• Power dissipation – Due to circuit leakage – Unforeseen circumstances– Overhead of the operating system calls– Inefficient code– System resource utilisation

• This talk focuses on the last aspect only p y

3

Page 4: Dynamic Power Management in Embedded Systems - TU Dresden

Motivation

• Embedded system– Smart phones– Personal MP3 players– Point of sale mobile devices– Portable GPS navigators– Digital cameras– Digital video cameras– Pen digitizers– Handheld OCR

4

Page 5: Dynamic Power Management in Embedded Systems - TU Dresden

Motivation • The global market for embedded systems is

expected to increase from $92 0 billion in 2008 toexpected to increase from $92.0 billion in 2008 to an estimated $112.5 billion by the end of 2013, a compound annual growth rate (CAGR) of 4.1%.p g ( ) %

• Embedded hardware was worth $89.8 billion in 2008 and is expected to grow at a CAGR of 4.1%p gto reach $109.6 billion in 2013

• Embedded software generated $2.2 billion in 2008. This should increase to $2.9 billion in 2013, for a CAGR of 5.6%.

5Source: BCC, April 2009

Page 6: Dynamic Power Management in Embedded Systems - TU Dresden

Motivation

Source: EMUCO Project 2008 6

Page 7: Dynamic Power Management in Embedded Systems - TU Dresden

Outline

• Motivation• Aspects of power consumption• Selective switchingg• Dynamic scaling• Research Issues• Research Issues

7

Page 8: Dynamic Power Management in Embedded Systems - TU Dresden

Embedded Sys.: ArchitectureAnalogue Baseband RF

I/O Interface RF InterfaceFilters and Power/Voltage

Receiver

ADC/DAC(Audio/Video)

Filters and Synthesiserscontrollers

DSP

Synthesiser

M d l t

Power/VoltageAmplifiers

DSP

ory

Uni

t

Modulator

Mem

o

Keyboard

Microcontroller Display

SIM card

Flash Memory

Digital Baseband 8

Page 9: Dynamic Power Management in Embedded Systems - TU Dresden

Power Consumption

Source: Vargas, 2005 9

Page 10: Dynamic Power Management in Embedded Systems - TU Dresden

Power Consumption

DPM

Source: Vargas, 2005 10

Page 11: Dynamic Power Management in Embedded Systems - TU Dresden

Power Consumption

• Batteries – Specified by a rated current capacity, C,

expressed in Ampere-Hour (mAh)D i t t t t th th di h• Drawing current at a rate greater than the discharge rate results in a current consumption rate higher than the rate of diffusion of the active elements in the electrolyte.

• If this process continues for a long time, the electrodes run out of active material even though theelectrodes run out of active material even though the electrolyte has not yet exhausted its active materials.

• This situation can be overcome by intermittently drawing current from the batterydrawing current from the battery.

11

Page 12: Dynamic Power Management in Embedded Systems - TU Dresden

Power Consumption

DischargeRate

Battery CapacityNormalised to

1C Discharge Rate1C Discharge Rate

C/5 107%

C/2 104%C/2 104%

1C 100%

2C 94%

4C 86%

Source: Bellosa, 2000: Lithium-ion Battery12

Page 13: Dynamic Power Management in Embedded Systems - TU Dresden

Outline

• Motivation• Aspects of power consumption• Dynamic Power Managementy g• Selective Switching • Dynamic scaling• Dynamic scaling• Research Issues

13

Page 14: Dynamic Power Management in Embedded Systems - TU Dresden

Concept

• Fundamental premises about Embedded tsystems:

– Predominantly event-driven– Experience non-uniform workload during

operation time1• DPM1 refers to selectively shutting-off

and/or slowing-down system components that are idle or underutilised

• A policy determines the type and timing of power transitions based on system history, workload and performance constraints

1. DPM: Dynamic power management14

Page 15: Dynamic Power Management in Embedded Systems - TU Dresden

Concept

• It has been described in the literature as a li ti i ti bllinear optimisation problem– The objective function is the expected

fperformance• Related to the expected waiting time and the number

of jobs in the queueof jobs in the queue– The constraint is the expected power

consumption p• Related to the power cost of staying in some

operation state and the energy consumption for the transfer from one server state to the nexttransfer from one server state to the next

15

Page 16: Dynamic Power Management in Embedded Systems - TU Dresden

Architecture

SchedulerSchedulertask arrival rates,

priority of tasks, task deadlines

Task1

Power Workload and

Task runtime, frequency and

Hardware profilemode

adaptation

and Energy

monitoring

frequency and duration of accessed resources

profileoperating pointsg

16

Page 17: Dynamic Power Management in Embedded Systems - TU Dresden

Outline

• Motivation• Aspects of power consumption• Dynamic Power Managementy g• Selective Switching• Dynamic scaling• Dynamic scaling• Research Issues

17

Page 18: Dynamic Power Management in Embedded Systems - TU Dresden

Selective Switching

• Power state machine for the StrongARM-11001100 processor

400mW

RUN

90µs

10µs 160ms

SLEEPIDLE90µs

160µW50mWWait for interrupt Wait wake-up event

18Source: Benini, 2000

Page 19: Dynamic Power Management in Embedded Systems - TU Dresden

Selective Switching

SlActive clock domains Oscillators Wake up sources

Sleep Mode clkCPU clkFLASH clkIO clkADC clkASY Main

ClockSourceEnabled

TimerOscEnabled

INT7 TWIAddr. Match

Timer EEPROMReady

ADC OtherI/O

IdlIdle X X X X X X X X X X XADC noise red.

X X X X X X X X X

power down X XPower save x x x x xstandby x x xExt. standby x x x x x

Active Clock Domains and Wake Up Sources in the Different Sleep Modes

19Source: ATMEL, Atmega 128: 2008

Page 20: Dynamic Power Management in Embedded Systems - TU Dresden

Selective Switching

• Memory accessCPU

Active300 mW +6 ns+6000 ns

Power down3 mW

Standby180 mW

+60 ns

Nap

+60 ns

30 mW Source: Ellis, 200320

Page 21: Dynamic Power Management in Embedded Systems - TU Dresden

Selective Switching

• Memory access

Software

CPU

OS

Software control

OS(MMU1)

Hardware control

ctrl ctrl ctrl

control

Chip 1 Chip 2 Chip n

Power DownStandbyActiveSource: Ellis, 2003

1. MMU: Memory Management unit

21

Page 22: Dynamic Power Management in Embedded Systems - TU Dresden

Selective Switching

Power Mode

StrongARM Memory MEMS & ADC

RF

P0 Sleep Sleep Off OffP1 Sleep Sleep On OffP2 Sleep Sleep On RXP3 Idle Sleep On RXP Active Active On TX RXP4 Active Active On TX, RX

22Source: Sinha and Chandrakasan, 2001

Page 23: Dynamic Power Management in Embedded Systems - TU Dresden

Selective SwitchingTask arrival pattern

Parameter Value

Always on

Pon 10 WPoff 0 W

yPon off 10 WPoff on 40 Wt 1

on

off

Greedyton off 1 stoff on 2 stR 25 s

on

DPM1

tR 25 s

Policy Energy Avg.

off

Policy Energy Avg. Latency

Always on 250 J 1 sR ti d 240 J 3

on

off

Reactive greedy 240 J 3 sPower-aware 140 J 2.5 s

Source: Pedram, 2003

Page 24: Dynamic Power Management in Embedded Systems - TU Dresden

Selective Switching

wer

(W)

Pi

Po

Pj

tth, j

Time (s)

24

Page 25: Dynamic Power Management in Embedded Systems - TU Dresden

Selective Switching

wer

(W)

Pi

Po

Pj

tth, j

( ) [ ]saved PPPPE

Time (s)

( ) [ ]jjijijjijiijjijisaved

j tPtPtPtttPE ×+×+×−++= ,,,,,,

( )( ) ⎟

⎟⎠

⎞⎜⎜⎝

−≥ jijii

jth PPtPP

t ,,, ,0max ( ) ⎟

⎠⎜⎝ ji PP

25

Page 26: Dynamic Power Management in Embedded Systems - TU Dresden

Selective SwitchingPower Mode

StrongARM Memory MEMS & ADC

RF

P0 Sleep Sleep Off OffP1 Sleep Sleep On OffP Sl Sl O RXP2 Sleep Sleep On RXP3 Idle Sleep On RXP4 Active Active On TX RXP4 Active Active On TX, RX

PowerMode

P(mW)

Trans. Latency (ms)

Threshold,Tth

P4 1,040 - -P4 400 5 8P 270 15 20P2 270 15 20P1 200 20 25P0 10 50 50

26

P0 10 50 50

Source: Sinha and Chandrakasan, 2001

Page 27: Dynamic Power Management in Embedded Systems - TU Dresden

Selective Switching

27

Page 28: Dynamic Power Management in Embedded Systems - TU Dresden

Selective Switching

• Selective switching should be application d d tdependent

• Weissel et al. demonstrate that long beacon periods in IEEE 802.11 wireless local area networks do not necessarily result in power saving for some applications– Continuous-aware mode, power-saving mode

and adaptive power saving mode • Periodical activation to synchronise with the server• The length of the sleep interval is called beacon

period (default value = 100 ms)period (default value 100 ms)28

Page 29: Dynamic Power Management in Embedded Systems - TU Dresden

Selective Switching

Mode Transition Time EnergyMode Transition Time Energy

PSP to CAM 320 ms 280 mJ

CAM to PSP 317 ms 283 mJ

Beacon interval adjustment

333 ms 300 mJ

Application Without PM With PM

Beacon = Not applicable

Beacon ≥ 100 ms; period

NFSTask : Negligibleruntime

Task : 250 msruntime

Energy: 4 J Energy: 67 J

29Source: Weissel et al., 2004: The runtime and energy cost of a dynamic power Management: Application: NFS; OS: Linux; Network interface: Cisco Aironet

Page 30: Dynamic Power Management in Embedded Systems - TU Dresden

Selective Switching

• Mitigation – Power management should take into account

the type of application, the send/receive characteristics and the user sensitiveness andcharacteristics and the user sensitiveness and tolerance

Application specific DPMApplication-specific DPM Average size of packets received

Ratio of average length of inactive toRatio of average length of inactive to length of active periodsRatio of average size of packets received to size of packets sentpRatio of traffic volume received to traffic volume sentAverage size of packets sent

30

Average size of packets sent

Page 31: Dynamic Power Management in Embedded Systems - TU Dresden

Outline

• Motivation• Aspects of power consumption• Dynamic Power Managementy g• Selective Switching • Dynamic Scaling• Dynamic Scaling• Research Issues

31

Page 32: Dynamic Power Management in Embedded Systems - TU Dresden

Dynamic Scaling

• Refers to runtime change in the supply lt d l k f f thvoltage and clock frequency of the

hardware componentsWh– Where

• CL: Load capacitance• V Supply voltage

fVCP ddL2∝

• Vdd: Supply voltage • f: Clock frequency• Vth: Threshold voltage

( )dd

LVCk=τ th g

• τ: Switching delay• k: Boltzmann’s constant

( )2thddL VV

Ck−

τ

V, f V, f

t0 t0 32

Page 33: Dynamic Power Management in Embedded Systems - TU Dresden

Dynamic Scaling

DPM without voltage scaling

1.0

zed

Ener

gy

Efficient DVS

Nor

mal

iz

DPM with

N li d kl d

ideal voltage scaling

0 1.0

Normalized workload

33

Page 34: Dynamic Power Management in Embedded Systems - TU Dresden

Outline

• Motivation• Aspects of power consumption• Dynamic Power Managementy g• Selective Switching • Dynamic scaling• Dynamic scaling• Research Issues

34

Page 35: Dynamic Power Management in Embedded Systems - TU Dresden

Research Issues

• The cost of power management• Workload arrival estimation as a basis for

decision making• Side effects of DPM

35

Page 36: Dynamic Power Management in Embedded Systems - TU Dresden

Cost

• Performance cost• Resource cost

– For example, MMU requires associative memory that is accessed whenever memory is referencedS– Size and computational cost

36

Page 37: Dynamic Power Management in Embedded Systems - TU Dresden

Workload Estimation

• Given an observation period, T, and an li d kl d ( ) i thaverage normalized workload, w(n), in the

interval (n−1)T ≤ t ≤ nT, the task is to d id th d f th t ldecide the power mode for the next cycle

37

Page 38: Dynamic Power Management in Embedded Systems - TU Dresden

Workload Estimation

• FIR Filter[ ] [ ] [ ]∑

−1N

kkhW [ ] [ ] [ ]∑=

−=0k

np knwkhnW

Filter Filter CoefficientsMoving Average (MAW) N

ihk1)( =( )

Exponential weighted average (EWA)Li t M

ik aih −=)(

( ) ( ) ( ) ( )kkhkh

N

List Mean Square (LMS)

( ) ( ) ( ) ( )k-nwnwμkhkh en1n +=+

• Expected workload state (EWS)

[ ] [ ]{ } ∑L

[ ] [ ]{ } ∑=

==j

jijii pwnwEnw0

38

Page 39: Dynamic Power Management in Embedded Systems - TU Dresden

Workload Estimation

39Source: Sinha and Chandrakasan, 2001

Page 40: Dynamic Power Management in Embedded Systems - TU Dresden

Workload Estimation

• Often task estimation is made from within th t b t h ld id t lthe system but should consider external factors as well– For example in audio and video streaming,

knowledge of bandwidth and data rate should be helpfulbe helpful

• Rich context information (operation diti ) i t t kl id ff tcondition) is to tackle side-effects

40

Page 41: Dynamic Power Management in Embedded Systems - TU Dresden

Side Effects

• Scaling latency– Power supplies require a finite amount of time

to settle to the new operating voltageTh d l i f ti f l d th l– The delay is a function of load on the supply voltageComparatively the clock generator requires– Comparatively, the clock-generator requires negligible time

• Unreliable operation during transition• Unreliable operation during transition• The CPU should be halted during a transition• Requires an external hardwareRequires an external hardware

41

Page 42: Dynamic Power Management in Embedded Systems - TU Dresden

Commercial Product

Source: Lattice Semiconductor (ispPAC-POWR1208P1), 2005

Page 43: Dynamic Power Management in Embedded Systems - TU Dresden

Conclusion • Most of the subsystems of an embedded system

are not equally active at the same timeare not equally active at the same time• Dynamic scaling is preferred over selective

switching if the long term task arrival pattern isswitching if the long term task arrival pattern is known

• This requires a comprehensive model for taskThis requires a comprehensive model for task arrival rate estimation

• The resource cost of power management is so far p gthe least addressed issue

43

Page 44: Dynamic Power Management in Embedded Systems - TU Dresden

Journals and Conferences • ACM Transactions on Embedded Computing

SystemsSystems• IEEE Transaction on VLSI Systems• IEEE Journal of Solid State Circuit• IEEE Journal of Solid-State Circuit• IEEE Transaction on Computer-Aided Design

IEEE Design and Test of Comp ters• IEEE Design and Test of Computers• DATE (2010 Dresden)

DAC (US D i t d)• DAC (US Dominated)• ASP-DAC (Asia-Pacific)

ARCS (2010 H )• ARCS (2010 Hannover)

44

Page 45: Dynamic Power Management in Embedded Systems - TU Dresden

Thanks for ListeningThanks for Listening45

Page 46: Dynamic Power Management in Embedded Systems - TU Dresden

Significant Contributions• Sinha and Chandrakasan (IEEE Design and Test of

Computers, 2001)Computers, 2001)– Mathematical model (DVFS) and task arrival estimation

• Su et al. (ISLPED1 2003)– Leakage estimation under power supply and

temperature variations• Weissel et al (ARCS2 2004)• Weissel et al. (ARCS , 2004)

– Application-aware DPM• Kang et al. (DAC3 2007)

– Variation resilient circuit design technique• Jung and Pedram (DATE4 2008)

St h ti d l t l (S ( ) A (V F– Stochastic process model as a tuple (S (power), A (V-F value), O (temperature), T, Z, c)

1 ISLPED: International Symposium on Low Power Electronics and Design1. ISLPED: International Symposium on Low Power Electronics and Design2. ARCS: International conference on architecture of computing systems3. DAT: Design automation conference4. DATE: Design automation and test in Europe

46

Page 47: Dynamic Power Management in Embedded Systems - TU Dresden

Scheduling

• Most research concentrates on finding ti l bi ti f t k b t doptimal combinations of tasks, but does

not discuss how a multiprocessor h d l i l t d ischeduler in a real system can succeed in

combining tasks accordingly.

47

Page 48: Dynamic Power Management in Embedded Systems - TU Dresden

Scheduling

• It does not pay-off to co-schedule b d t k i d t b bl tmemory-bound tasks in order to be able to

profit from lower chip frequencies– Combining tasks in order to reduce resource

contention is more important than combining tasks that share a common optimal frequencytasks that share a common optimal frequency.

• Co-scheduling policy that avoids t ti f b ttl kcontention for bottleneck resources.

• Migration policy that balances resource utilization across execution contexts

48

Page 49: Dynamic Power Management in Embedded Systems - TU Dresden

CMOS

49