pinwheel scheduling for power-aware real-time systems

37
Pinwheel Scheduling for Power-Aware Real- Time Systems Gaurav Chitroda Komal Kasat Nalini Kumar

Upload: hansel

Post on 11-Jan-2016

31 views

Category:

Documents


2 download

DESCRIPTION

Pinwheel Scheduling for Power-Aware Real-Time Systems. Gaurav Chitroda Komal Kasat Nalini Kumar. OUTLINE. Motivation Introduction Pinwheel Transformation Methods of Power Reduction Simulations and Results Conclusion. Motivation. Energy consumption is critical - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Pinwheel Scheduling for Power-Aware Real-Time Systems

Pinwheel Scheduling for Power-Aware Real-Time Systems

Gaurav ChitrodaKomal Kasat

Nalini Kumar

Page 2: Pinwheel Scheduling for Power-Aware Real-Time Systems

OUTLINE•Motivation•Introduction•Pinwheel Transformation•Methods of Power Reduction•Simulations and Results•Conclusion

Page 3: Pinwheel Scheduling for Power-Aware Real-Time Systems

3

MotivationEnergy consumption is criticalDemand on performance and computation

constantly increase energy consumptionMaintaining high performance along with

increased battery life is a challengeUsing DVS and DFS to reduce Power

ConsumptionOnline vs Offline SchedulingPower-Aware Real -Time Scheduling

Page 4: Pinwheel Scheduling for Power-Aware Real-Time Systems

OUTLINE

•Motivation•Introduction•Pinwheel Transformation•Methods of Power Reduction•Simulations and Results•Conclusion

Page 5: Pinwheel Scheduling for Power-Aware Real-Time Systems

5

IntroductionDeadlines for tasks and Slack TimeDynamic Voltage Scaling(DVS)Dynamic Frequency Scaling(DFS)Distance Constrained Task Systems(DCTS)Rate Monotonic Scheduling(RM)Pinwheel AlgorithmBenefits

Page 6: Pinwheel Scheduling for Power-Aware Real-Time Systems

6

Slack Time Slack time of a job with deadline di at any time t such that t < di is (di –t)

Job 1 Job 2 Job 3 Job 4

deadline job1: d1 deadline job 2 : d2

Slack time (job1)

Slack time (job 2)

Scheduling interval at time t0Scheduling interval at time d1

Page 7: Pinwheel Scheduling for Power-Aware Real-Time Systems

7

DVS & DFS Powerdynamic = CL * NSW * V2

dd * fCL: Load Capacitance Vdd: supply voltage

NSW: avg no of ckt switches per clock cycle f: clock frequency

These techniques are applied meeting real time constraints

T1 T2 T3 T4 T5

T1 T4T3

0 t1 t2 t3 t4 t5 t6 time

frequency

T5T2T1 T3 T4

Page 8: Pinwheel Scheduling for Power-Aware Real-Time Systems

8

DCTS - Distance Constrained Task System

Distance between 2 consecutive execution of a task should be less than a predefined value

Example:

The distance of two consecutive jobs can be as large as 2Pi-ei or as small as ei

J ij

Period Pi

J ij+1 J ij+2

Period Pi

2Pi – ei ei

time

Page 9: Pinwheel Scheduling for Power-Aware Real-Time Systems

9

Rate Monotonic Scheduling Tasks are assigned Priority based on their Periods. Task with lowest period is assigned highest priority. Consider a system with Five Tasks with Distance Constraints

{9.2,10.6,10.7,21.4,23.4} respectively and their execution times are {1.5,2.0,3.4,1.4, 3.0}

T1

T2

T3

T4

T5

Page 10: Pinwheel Scheduling for Power-Aware Real-Time Systems

OUTLINE

•Motivation•Introduction•Pinwheel Transformation•Methods of Power Reduction•Simulations and Results•Conclusion

Page 11: Pinwheel Scheduling for Power-Aware Real-Time Systems

11

Pinwheel Transformation Distance-constrained specialization Technique to

transform all task distance constraints to Harmonic numbers.

Tasks can be scheduled as periodic tasks using the new distance constraint as their periods.

As the distance constraints are Harmonic numbers, the execution schedule has no jitter and meets the distance constraints.

The system predictability is increased and thus complexity of Power-Aware Real-time Scheduling can be reduced.

Page 12: Pinwheel Scheduling for Power-Aware Real-Time Systems

12

T1

T2

T3

T4

T5

T1

T2

T3

T4

T5

0 5.3 10.6 15.9

Rate Monotonic Scheduling without Pinwheel. Periods are {9.2, 10.6, 10.7, 21.4, 23.4}

After Pinwheel Scheduling. The Periods are {5.3, 10.6, 10.6, 21.2, 21.2}

Start of T1’s period. So T3 is halted

Start of T1’s period, so T5 halted

Start of T1’s period, so T5 halted

Start of T1’s period. So T3 is halted

T2’s period started, but T1 yet not finished so T2 is delayed.

Page 13: Pinwheel Scheduling for Power-Aware Real-Time Systems

13

Power-Aware Algorithm Using Pinwheel model Offline Scheduling- Apriori knowledge of realtime jobs

including periods,execution times,release times,etc. Online Vs Offline Scheduling Benefits obtained from Pinwheel model-

Tasks information can be known apriori Pinwheel schedule can be generated in Polynomial time and

space The rescheduling points within the hyperperiod can be

massively reduced.

Page 14: Pinwheel Scheduling for Power-Aware Real-Time Systems

14

Pinwheel Transformation Process Power- Aware real-time Scheduling using Pinwheel

model can be divided into two phases-1) Generate and store Pinwheel schedules. All task

periods are transformed to harmonic integers.2) Second Phase- Schedulers perform more precise

power-aware scheduling according to their policies based on timing information obtained from the pinwheel schedule. Then DVS and DFS is dynamically performed at every rescheduling point to reduce energy consumption.

Page 15: Pinwheel Scheduling for Power-Aware Real-Time Systems

OUTLINE

•Motivation•Introduction•Pinwheel Transformation•Methods of Power Reduction•Simulations and Results•Conclusion

Page 16: Pinwheel Scheduling for Power-Aware Real-Time Systems

16

Key Idea- To manage slack times in order to reduce energy dissipation.

Under the restriction that no task misses its deadline-1) We can lower the processor voltage and frequency to

reduce energy consumption.2) We can use a simple Heuristic to know slack times in

advance. This only partially solves the problem. Three methods used in the paper-3) Low Power Fixed Priority Scheduling(LPFPS)4) Greedy Method5) Linear Programming(LP method)

Methods of Power Reduction

Page 17: Pinwheel Scheduling for Power-Aware Real-Time Systems

17

Low Power Fixed Priority Scheduling

Schedules using RM when there is not more than one task in the ready queue.

DVS and DFS are then applied if possibleWhen there are no tasks in the ready

queue, the system enters Sleep mode

Page 18: Pinwheel Scheduling for Power-Aware Real-Time Systems

18

Example:

T1 T2

T1T2

T3 T5T4

T3 T4T5

Slack Time

T1 and T3 finish earlier then their WCETs, but only T2 and T 5 execute using lower processor frequency to make use of the slack times.T4 executes using the maximum frequency because it is not the only one task left in the ready queue.

T2 T5

time

time

freq

uenc

yfr

eque

ncy

RM Scheduling

LPFPS using pinwheel

Page 19: Pinwheel Scheduling for Power-Aware Real-Time Systems

19

Greedy MethodLPFPS extended to perform DVS & DFS at

every rescheduling pointNext ready job greedily uses up idle time

within its scheduling intervalProcessor frequency is lowered as much as

possibleReschedules at every rescheduling point to

determine processor voltage and frequencySome slack time may be wasted as

remainder not sufficient for adjustments

Page 20: Pinwheel Scheduling for Power-Aware Real-Time Systems

20

Greedy MethodExample:

T1 T2 T3

Slack time wasted

The first ready task gets scheduled to maximize slack time utilization

T1T2 T3T1

Pinwheel time

time

freq

uenc

yfr

eque

ncy

Greedy Method

Page 21: Pinwheel Scheduling for Power-Aware Real-Time Systems

21

LP MethodWe want to minimize the slack timeProcessor frequencies are not continuousProblem mapped to Integer Linear

Programming - ILP problem – NP CompleteHeuristic used is Linear Programming – LPLP is applied at every scheduling interval to utilize

maximum slack time

Page 22: Pinwheel Scheduling for Power-Aware Real-Time Systems

22

LP Method

For n jobs, with scheduling interval Tq: frequency [q1: minimum & qm: maximum]C: execution times [C1 to Cn ]

• Determine processor frequency of each job in the scheduling interval

• Ratio of lengthened task execution time when processor frequency reduced from qm to qi is given as X:

•Find n real numbers X1, X2…… Xn such that the summation is maximum

iC

iqmq

ijC *

n

iii XC

1

*

for I = 1,2,…..m

i

mi q

qX

Page 23: Pinwheel Scheduling for Power-Aware Real-Time Systems

23

LP Method - Constraints

for i =1,2,….n

for i =1,2,….n

for i =1,2,….n

for i =1,2,….n

n

iii TXC

1

iiii*

1

mi

i

*

tDXC

q

qX

1X(1)

(2)

(3)

(4)

•LP Method uses all slack times for energy saving•Obtains more energy reduction than Greedy Method

Page 24: Pinwheel Scheduling for Power-Aware Real-Time Systems

24

Adaptive WCET to AETOptimized energy consumption not

obtained using WCETUse a profiling tool

insert codes which issue rescheduling system call to update WCET

AET can be obtained from the updated WCET Further energy saving for applications which do not

use their WCET This approach maximizes system energy reduction

Page 25: Pinwheel Scheduling for Power-Aware Real-Time Systems

25

Issue with Pinwheel ModelNew periods may be shorter than the original

periodsJob execution too frequent leading to change in

behavior of the taskSome applications cannot accept thisExample: Video system A frame may be repeated every 22ms instead of

33ms resulting in fast forward effectSolution: Make task idle and use this as slack

time for energy saving

Page 26: Pinwheel Scheduling for Power-Aware Real-Time Systems

26

Page 27: Pinwheel Scheduling for Power-Aware Real-Time Systems

OUTLINE

•Motivation•Introduction•Pinwheel Transformation•Methods of Power Reduction•Simulations and Results•Conclusion

Page 28: Pinwheel Scheduling for Power-Aware Real-Time Systems

28

Simulation ResultsTransmeta

processors – TM55EL-667 and TM58EX-933 for practical results

System utilization of 10% to 70%

140000 test setsEach test set has 2 to

8 real-time tasks

Page 29: Pinwheel Scheduling for Power-Aware Real-Time Systems

29

RM scheduling energy consumption is taken as the base

As system utilization increases, system slack time decreases

As load increases, it becomes difficult to obtain energy savings

RESULTS

Page 30: Pinwheel Scheduling for Power-Aware Real-Time Systems

30

RESULTSLP methods give better energy savings

than greedy methodsAverage reduction of 37% to 56% at 70%

utilization More reduction on TM58EL-933 than on

TM58EX-667 More frequency steps available to adjust CPU

frequencies.

Page 31: Pinwheel Scheduling for Power-Aware Real-Time Systems

31

Scheduling Overheads

RM, LPFPS, ccRM and Greedy method – little time to schedule and constant overhead LP method – more time to schedule; and average overhead of 53us – large overhead is

unacceptable

Page 32: Pinwheel Scheduling for Power-Aware Real-Time Systems

32

Small hyperperiod – reduces the number of rescheduling points Overall overlap of LP method using pinwheel method is reduced

due to lesser number of scheduling points

Scheduling Overheads

Page 33: Pinwheel Scheduling for Power-Aware Real-Time Systems

33

Effect of Profiling Tool More energy can be saved according to task

execution at runtimeRescheduling when the codes inserted by the

profiling tool are executedParameter of interest – AET / WCET Bigger ratio, more saving – greater opportunity

for adjustment33% additional energy saving at 50% AET/WCET at

70% utilizationFor AET close to WCET, there is very little unused

time for online schedule adjustment

Page 34: Pinwheel Scheduling for Power-Aware Real-Time Systems

34

Average energy saving of 17.85%

Energy Reduction at RuntimeTM 58EL-667

TM58EX-993

Page 35: Pinwheel Scheduling for Power-Aware Real-Time Systems

OUTLINE

•Motivation•Introduction•Pinwheel Transformation•Methods of Power Reduction•Simulations and Results•Conclusion

Page 36: Pinwheel Scheduling for Power-Aware Real-Time Systems

36

Conclusion Harmonic nature of pinwheel model is beneficial for

deterministic task scheduling in power-aware real-time scheduling

Various techniques can be used to fully utilize whole system slack times

Power-aware scheduling with Pinwheel method achieves considerable energy savings with manageable scheduling overhead

Profiling tool provides runtime information for better scheduling

In summary : Pinwheel model is a systematic approach and a computationally feasible solution for full utilization of system slack times to minimize energy consumption.

Page 37: Pinwheel Scheduling for Power-Aware Real-Time Systems

37

QUESTIONS