Battery Aware Dynamic Scheduling for Periodic Task Graphs Venkat Rao #, Nicolas Navet #, Gaurav Singhal *, Anshul Kumar, GS Visweswaran Venkat Rao #, Nicolas.

Post on 26-Mar-2015

218 Views

Category:

Documents

2 Downloads

Preview:

Click to see full reader

Transcript

Battery Aware Battery Aware Dynamic Dynamic

Scheduling for Scheduling for Periodic Task Periodic Task

GraphsGraphsVenkat RaoVenkat Rao ##, Nicolas Navet , Nicolas Navet ##, Gaurav Singhal *, Anshul , Gaurav Singhal *, Anshul KumarKumar, GS Visweswaran, GS Visweswaran

##TRIO Group, INRIA-Lorraine /LORIA.TRIO Group, INRIA-Lorraine /LORIA.

* Dept of ECE, UT Austin, * Dept of ECE, UT Austin, Dept of CSE, IIT DelhiDept of CSE, IIT DelhiDept of EE, IIT Delhi Dept of EE, IIT Delhi

WDPRTS, Rhode Island Greece 25th April 2006 Venkat Rao – INRIA Lorraine /LORIA

Battery lifetime is major constraintBattery lifetime is major constraint Slow growth in energy densities not Slow growth in energy densities not

keeping up with increase in power keeping up with increase in power consumptionconsumption

Extension of battery lifetime and not just Extension of battery lifetime and not just low energy design the low energy design the REAL GOALREAL GOAL

IntroductionIntroduction

Mobile Embedded Systems Mobile Embedded Systems Design :Design :

WDPRTS, Rhode Island Greece 25th April 2006 Venkat Rao – INRIA Lorraine /LORIA

Traditional approaches to energy Traditional approaches to energy optimizationoptimization

CMOS Energy and powerCMOS Energy and powerEnergy α V2

Power α V2.ffmax α V

Dynamic Voltage Scaling (DVS):Dynamic Voltage Scaling (DVS):

busy system => increase Vbusy system => increase Vdddd, frequency, frequency

idle system => decrease Vidle system => decrease Vdddd, frequency, frequency Potential to achieve quadratic energy and cubic Potential to achieve quadratic energy and cubic

power savings.power savings.

WDPRTS, Rhode Island Greece 25th April 2006 Venkat Rao – INRIA Lorraine /LORIA

Variable-supply Variable-supply ArchitecturesArchitectures

High-efficiency adjustable DC-DC converterHigh-efficiency adjustable DC-DC converter View from battery sideView from battery side

VVbatbat is constant and depends on battery technology( 1.2 is constant and depends on battery technology( 1.2 V for NiMh, 3.6-4.2 V for Li ion)V for NiMh, 3.6-4.2 V for Li ion)

High VHigh Vdddd translates to high I translates to high Ibat `bat `

Power Manager

WKto f

f to Vdd

SwitchingDCDC

regulator

Vset

VsysClkg

en

SoC

BatteryVbat

Ibat

Isys

Vsys X Isys = µ X Vbat X Ibat

WDPRTS, Rhode Island Greece 25th April 2006 Venkat Rao – INRIA Lorraine /LORIA

Positive Ions

Load_ +

Electron Flow

Anode

Cathode

Electrolyte

Battery BasicsBattery Basics Battery characterized by Voc and

Vcut.

Battery lifetime governed by active species concentration at electrode-electrolyte interface.

Phenomenon governing battery lifetime:

“Rate Capacity Effect”

“high load current implies lower charge delivered.”

“Recovery Effect” “charge recovered by giving idle slots”

WDPRTS, Rhode Island Greece 25th April 2006 Venkat Rao – INRIA Lorraine /LORIA

Diffusion ModelDiffusion Model- Rakhmatov, Vrudula et al.- Rakhmatov, Vrudula et al.

Analytically very sound but computationally Analytically very sound but computationally intensiveintensive

Cannot be used for online scheduling decisions.Cannot be used for online scheduling decisions.

Fully charged battery

After Recovery

After a recent discharge

Fully discharged

Ele

ctr

od

eEle

ctr

od

e

Ele

ctr

od

eEle

ctr

od

e

Electro-active species

WDPRTS, Rhode Island Greece 25th April 2006 Venkat Rao – INRIA Lorraine /LORIA

Battery Aware Battery Aware SchedulingScheduling

Guideline 1: For a set of schedulable tasks (t0, t1……tN) having corresponding currents costs (I0, I1……IN) scheduling them in decreasing order of current costs is the optimum battery solution.[Rakhmatov03]

Ibat

time

WDPRTS, Rhode Island Greece 25th April 2006 Venkat Rao – INRIA Lorraine /LORIA

Battery Aware Battery Aware SchedulingScheduling

Guideline 2: For a given task t to be executed before a given deadline d its better to lower the frequency and run without giving an idle slot than give an idle slot and run at a higher frequency.[Rakhmatov03]

freq

time

freq

time

idle

dd

WDPRTS, Rhode Island Greece 25th April 2006 Venkat Rao – INRIA Lorraine /LORIA

Problem DefinitionProblem DefinitionTo find a battery efficient schedule for a given a set of periodic tasks graphs (T1, T2, ....Tn) which have corresponding deadlines (D1,D2, .....Dn) equal to their periods, where a taskgraph Ti comprises of any m interdependent nodes, each of which are in themselves tasks with given worst case computations (wci1, wci2, ......wcim).

T1 D1

T3D3

T2 D2

wciPrecendence

constraint

WDPRTS, Rhode Island Greece 25th April 2006 Venkat Rao – INRIA Lorraine /LORIA

Our MethodologyOur Methodology There are 2 aspects to the problemThere are 2 aspects to the problem

Global Frequency SettingGlobal Frequency Setting Local order of execution of nodesLocal order of execution of nodes

Task Graphs

Frequency Setting

Priority function for max slack

recovery

DVS Algorithm

Local Task Order

Ready listWCi’

s

Di’s

nodes

fcurr

next node

WDPRTS, Rhode Island Greece 25th April 2006 Venkat Rao – INRIA Lorraine /LORIA

Global Frequency SettingGlobal Frequency Setting To calculate the min frequency that can ensure all To calculate the min frequency that can ensure all

subsequent deadlines are met.subsequent deadlines are met.

upon release( Taskgraph Ti )

1: WCi = wcij

2: select_frequency( )

upon end_of_node( τij )

1: WCi = WCi + acij − wcij

2: select frequency( )

select_frequency ( )

1: U = WCi/Di

2: fref = U × Fmax , return fref

Modified ccEDF algorithm from

[pillai01]

wcijwcij WCET of the jth node WCET of the jth node of the ith task graph of the ith task graph at fmaxat fmax

acijacij Actual exec time for Actual exec time for jth node of the ith jth node of the ith task graph at fmaxtask graph at fmax

DiDi Deadline for the ith Deadline for the ith task graphtask graph

τij The jth node of the ith The jth node of the ith task graph whose task graph whose execution just ended.execution just ended.

WDPRTS, Rhode Island Greece 25th April 2006 Venkat Rao – INRIA Lorraine /LORIA

Global Frequency SettingGlobal Frequency Setting

Follows EDF so works up to U= 100%Follows EDF so works up to U= 100% Ensures all deadlines are met.Ensures all deadlines are met. Ensures a Non Increasing discharge profile Ensures a Non Increasing discharge profile

for set of jobs (set of instances of periodic for set of jobs (set of instances of periodic tasks) tasks)

freq

time

d

re-computing speed

WDPRTS, Rhode Island Greece 25th April 2006 Venkat Rao – INRIA Lorraine /LORIA

LocLocal order of executional order of execution

Slack Recovery maximization.Slack Recovery maximization. Worst case seldom arrives leading to dynamic Worst case seldom arrives leading to dynamic

slackslack Order of execution effects dynamic slack Order of execution effects dynamic slack

recoveryrecovery Important to choose the order optimallyImportant to choose the order optimally A priority function needs to be chosenA priority function needs to be chosen Heuristics like LTF and STF work well in Heuristics like LTF and STF work well in

specific casesspecific cases ppUBS UBS : a near optimal priority function from : a near optimal priority function from

[Gruian02][Gruian02]

WDPRTS, Rhode Island Greece 25th April 2006 Venkat Rao – INRIA Lorraine /LORIA

Ready ListReady List Ready list comprising of nodes from Ready list comprising of nodes from

current(EDF) Task graph only.current(EDF) Task graph only.

Ready listD1

D3D2

D1 < D2 < D3

Priority function

Execute

WDPRTS, Rhode Island Greece 25th April 2006 Venkat Rao – INRIA Lorraine /LORIA

Ready list comprising of Ready list comprising of nodes from current Task nodes from current Task

graph onlygraph only Advantages :Advantages :

Follows EDF so ensures meeting of Follows EDF so ensures meeting of deadlinesdeadlines

Simple to implementSimple to implement Disadvantages :Disadvantages :

Limited choice for the priority function.Limited choice for the priority function. Limited slack recovery.Limited slack recovery.

WDPRTS, Rhode Island Greece 25th April 2006 Venkat Rao – INRIA Lorraine /LORIA

Ready ListReady List Ready list comprising of nodes from all Ready list comprising of nodes from all

released Task graphs.released Task graphs.

Ready listD1

D3D2

D1 < D2 < D3

Priority function

Execute

WDPRTS, Rhode Island Greece 25th April 2006 Venkat Rao – INRIA Lorraine /LORIA

Ready list comprising of Ready list comprising of nodes from all released nodes from all released

Task graphsTask graphs Advantages :Advantages :

More choice for the priority function.More choice for the priority function. Better slack recovery hence lower energy Better slack recovery hence lower energy

consumptionconsumption Disadvantages :Disadvantages :

Out of EDF execution hence deadline can Out of EDF execution hence deadline can be missedbe missed

Need For additional feasibility check

WDPRTS, Rhode Island Greece 25th April 2006 Venkat Rao – INRIA Lorraine /LORIA

Ready ListReady List Ready list comprising of nodes from all Ready list comprising of nodes from all

released Task graphs.released Task graphs.

Ready listD1

D3D2

D1 < D2 < D3

Priority function

ExecuteFeasibility

check

WDPRTS, Rhode Island Greece 25th April 2006 Venkat Rao – INRIA Lorraine /LORIA

Feasibility checkFeasibility check Check to ensure that an out of EDF execution will not Check to ensure that an out of EDF execution will not

cause a deadline misscause a deadline miss Or more stringently will not cause the raising of Or more stringently will not cause the raising of

frequency later for meeting deadlinesfrequency later for meeting deadlines For task belonging to EDF order k, k-1 checks are For task belonging to EDF order k, k-1 checks are

required.required.

Feasibility Check ( tij )

flag= 1;

for (k=1 to j-1)

{

if (WCk +wcij > fcurr X Dk – Tcurr )

Flag =0;

}

return flag

WDPRTS, Rhode Island Greece 25th April 2006 Venkat Rao – INRIA Lorraine /LORIA

SimulationsSimulations C simulations were conducted to test our

methodology The DVS enabled processor simulated supports the

following 3 frequency-voltage tuples [(0.5GHz,3 V), (0.75GHz,4V), (1.0GHz,5V)].

Task graphs were generated from TGFF with random dependencies

Utilization of the system was kept to 70% Stochastic battery model from [G.Singhal05] was used

to estimate battery life for the profiles generated by various scheduling algorithms

Simulated for NiMH AAA Panasonic batteries with max capacity of 2000mAh and nominal capacity of 1600mAh

WDPRTS, Rhode Island Greece 25th April 2006 Venkat Rao – INRIA Lorraine /LORIA

Simulation Results :Simulation Results :Battery lifetime and charge delivered.Battery lifetime and charge delivered.

Results were obtained by averaging performance of the various algorithms over 100 random taskgraph sets

Battery Aware Schedule 2 delivers maximum battery life amongst the schemes compared

WDPRTS, Rhode Island Greece 25th April 2006 Venkat Rao – INRIA Lorraine /LORIA

ConclusionConclusion We have presented a Battery-aware

Scheduling Methodology that facilitates the combining of a good DVS algorithm with a heuristic based priority function for scheduling of taskgraphs.

Simulations suggest that our methodology performs up to 47% better than ccEDF and upto 23.3% better than laEDF scheduling schemes in terms of battery lifetime.

It can result in up to 100% improvement in battery lifetime over systems with no DVS.

WDPRTS, Rhode Island Greece 25th April 2006 Venkat Rao – INRIA Lorraine /LORIA

References and CreditsReferences and Credits[1] [1] V. Rao and G. Singhal. Integrated power management for embedded systems. V. Rao and G. Singhal. Integrated power management for embedded systems.

Bachelors Thesis, Indian Institute of Technology, DelhiBachelors Thesis, Indian Institute of Technology, Delhi , 2005., 2005.

[2] [2] FF..Yao,Yao, A Demers and S ShenkersA Demers and S Shenkers.. A Scheduling Model for Reduced CPU energy. A Scheduling Model for Reduced CPU energy. IEEE 1995.IEEE 1995.

[3] [3] P. Pillai and K. G.Shin. Real time dynamic voltage scaling for low powered P. Pillai and K. G.Shin. Real time dynamic voltage scaling for low powered embedded systems. embedded systems. Operating Systems ReviewOperating Systems Review, 35:89–102, October 2001., 35:89–102, October 2001.

[4] [4] S. Vrudhula and D. Rakhmatov. Energy management for battery powered S. Vrudhula and D. Rakhmatov. Energy management for battery powered embedded systems. embedded systems. ACM Transactions on Embedded Computing SystemsACM Transactions on Embedded Computing Systems , pages , pages 277– 324, August 2003277– 324, August 2003.

[5] [5] J. Luo and N. K. Jha. Battery-aware static scheduling for distributed real-time J. Luo and N. K. Jha. Battery-aware static scheduling for distributed real-time embedded systems. In embedded systems. In DAC’01: Proceedings of the 38th conference on Design DAC’01: Proceedings of the 38th conference on Design automationautomation, 2001, 2001.

[6] G[6] Gruianruian F., Energy-Centric Scheduling for Real-Time Systems, PhD F., Energy-Centric Scheduling for Real-Time Systems, PhD thesis, Lundthesis, Lund Institute of Technology, 2002.Institute of Technology, 2002.

[7] [7] V. Rao, G. Singhal, A. Kumar, and N. Navet. Battery model for embedded systems. V. Rao, G. Singhal, A. Kumar, and N. Navet. Battery model for embedded systems. In Proceedings of International Conference on VLSI DesignIn Proceedings of International Conference on VLSI Design , pages 105–110, January , pages 105–110, January 2005.2005.

[8] V. Rao, G. Singhal, and A. Kumar. Real Time Dynamic Voltage[8] V. Rao, G. Singhal, and A. Kumar. Real Time Dynamic Voltage Scaling for Scaling for Embedded Systems. Embedded Systems. InIn Proceedings of InternationalProceedings of International Conference on VLSI DesignConference on VLSI Design, , pages 650–653, Januarypages 650–653, January 2004.2004.

WDPRTS, Rhode Island Greece 25th April 2006 Venkat Rao – INRIA Lorraine /LORIA

Thank YouThank You

WDPRTS, Rhode Island Greece 25th April 2006 Venkat Rao – INRIA Lorraine /LORIA

AdvantagesAdvantages DisadvantagesDisadvantages

PDEPDE

(higher (higher forms of forms of KiBaM)KiBaM)

AccurateAccurate Slow, involves a Slow, involves a large number of large number of parametersparameters

CircuitCircuit Use Use capacitor capacitor and resistors and resistors to represent to represent batterybattery

Not accurate, Not accurate, elements change elements change value depending value depending conditionsconditions

StochasticStochasticRelatively Relatively accurate and accurate and fast.fast.

Still in the Still in the process of process of development.development.

Battery ModelsBattery Models

Still Too computationally

intensive for use at runtime

WDPRTS, Rhode Island Greece 25th April 2006 Venkat Rao – INRIA Lorraine /LORIA

Rate Capacity EffectRate Capacity Effect

Rate Capacity Effect

Total charge delivered by the battery goes down with the increase in load current.

Concentration of active species at interface falls rapidly with increasing load current.

Battery seems discharged when the concentration at interface becomes zero.

back

WDPRTS, Rhode Island Greece 25th April 2006 Venkat Rao – INRIA Lorraine /LORIA

Recovery EffectRecovery Effect

Recovery Effect

Battery recovers capacity if given idle slots in between discharges.

Diffusion process compensates for the low concentration near the electrode.

Battery can support further discharge.

Elapsed time of discharge

Cel

l V

olt

age Intermittent Discharge

Continuous discharge

back

WDPRTS, Rhode Island Greece 25th April 2006 Venkat Rao – INRIA Lorraine /LORIA

Simulation Results:Simulation Results:Effect of ready list on energy consumptionEffect of ready list on energy consumption

Energy consumption (normalized w.r.t optimal schedule) by various scheduling policies for different number of

tasks in a taskgraph

At Utilization 70% and actual

computation times varying from 20% to

70%

WDPRTS, Rhode Island Greece 25th April 2006 Venkat Rao – INRIA Lorraine /LORIA

Simulation Results:Simulation Results:Effect of priority function on energy Effect of priority function on energy

consumptionconsumption

Energy consumption (normalized w.r.t optimal schedule) by various scheduling policies for different number of

tasks in a taskgraph

At Utilization 70% and actual

computation times varying from 20% to 70%. Ready

list comprises of most

imminent.

WDPRTS, Rhode Island Greece 25th April 2006 Venkat Rao – INRIA Lorraine /LORIA

Kinetic Battery ModelKinetic Battery Model

Simplest PDE model to explain both recovery and rate capacity.Simplest PDE model to explain both recovery and rate capacity. Available and Bound charge wells Available and Bound charge wells Dynamic transfer of charges governed by a rate constant and Dynamic transfer of charges governed by a rate constant and

difference in heights.difference in heights.

WDPRTS, Rhode Island Greece 25th April 2006 Venkat Rao – INRIA Lorraine /LORIA

IntroductionIntroduction Battery BasicsBattery Basics

1.1. Rate Capacity Effect Rate Capacity Effect 2.2. Recovery EffectRecovery Effect

Related Work : Review of relevant Related Work : Review of relevant modelsmodels

Scheduling ProblemScheduling Problem Our Methodology.Our Methodology. Simulation and ResultsSimulation and Results ConclusionConclusion

top related