preemption handling and scalability of feedback dvs-edf

23
Preemption Handling and Scalability of Feedback DVS-EDF Yifan Zhu , Frank Mueller [email protected] Center for Embedded Systems Research / Department of Computer Science North Carolina State University

Upload: hilel-harrison

Post on 31-Dec-2015

30 views

Category:

Documents


3 download

DESCRIPTION

Preemption Handling and Scalability of Feedback DVS-EDF. Yifan Zhu , Frank Mueller [email protected] Center for Embedded Systems Research / Department of Computer Science North Carolina State University. Background. Dynamic voltage scaling - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Preemption Handling and Scalability of Feedback DVS-EDF

Preemption Handling and Scalability of

Feedback DVS-EDF

Yifan Zhu , Frank [email protected]

Center for Embedded Systems Research /

Department of Computer ScienceNorth Carolina State University

Page 2: Preemption Handling and Scalability of Feedback DVS-EDF

9/22/2002 NC State University 2

Background

Dynamic voltage scalingReduce energy consumption by lowering the supply voltage and operating frequency

Energy consumption scales lineally with frequencyquadratically with voltage

E ~ f V²

Hard real-time systemActual exec. time Worst case exec. time (WCET)Most practical system: utilization<1

Page 3: Preemption Handling and Scalability of Feedback DVS-EDF

9/22/2002 NC State University 3

DVS-EDF

Original EDF:

DVS-EDF: , =scaling level

Greedily scale current task

Capitalize on early completion

1}{\},...,1{

1

kni i

i

k

k

P

C

P

C

1},...,1{

ni i

i

P

C

Page 4: Preemption Handling and Scalability of Feedback DVS-EDF

9/22/2002 NC State University 4

Slack Generation

Two opportunities for slack generation:1. Early completion of tasks

2. Idle slots

T1

c1j

WCET

slack

T1 T2 T3

Page 5: Preemption Handling and Scalability of Feedback DVS-EDF

9/22/2002 NC State University 5

Idle Slots --> Slack

Introducing idle task into the task set, to convert idle time slots into slack

We choose

so that there is at least one idle time slot lying between any actual task’s invocation

UP

C

idle

idle 1

minmin )1(, PUCPP idleidle

(actual exec. time=0)

Page 6: Preemption Handling and Scalability of Feedback DVS-EDF

9/22/2002 NC State University 6

Slack Passing

Slack generated by one task will usually not be exhausted when the task completes

Initial slack capable to be passed on = C1-c1j

T1 T2

t2 t4 t5 t8 t9

C1 (WCET)

c1j slack d1 d2

S=S+C1-c1j,

Note: it’s possible that

c1j > C1, as long as the

total slack is not over-

exploited

Page 7: Preemption Handling and Scalability of Feedback DVS-EDF

9/22/2002 NC State University 7

Deadline Restriction

Initial slack can’t be passed in full to the next task. Slack beyond the next task’s release time and deadline cannot be used.

Assume: T1’s deadline is d1, T2 releases at r2

T2 can use:all the slack part of the slack none of the slack

r2<t1 t1 r2<d1 d1 t2

T1 T2 T1 T2 T1 T2

d1 d1d1

t1 t1t1

r2r2r2

Page 8: Preemption Handling and Scalability of Feedback DVS-EDF

9/22/2002 NC State University 8

Adding Idle Slots

Total slack can be further increased if idle task exists between T1 and T2’s deadline

slack = slack + idle(d1…d2)

T1 T2

t2 t4 t5 t8 t9

C1 (WCET)

c1j slack d1 d2

idle

Page 9: Preemption Handling and Scalability of Feedback DVS-EDF

9/22/2002 NC State University 9

Preemption Handling

Preempted task relinquishes its remaining slack, passing it on to the next task

Two differences herePreempted task itself cannot generate any slack

Remaining exec. time of the preempted task must be reserved in advance

Page 10: Preemption Handling and Scalability of Feedback DVS-EDF

9/22/2002 NC State University 10

idle

idle

Forward Sweep Scheme

Remaining exec. time is reserved by stealing slack from the next task

Assume: = 3 slots

Forward sweep: zero slack for T2 and T3 (in the worst case, if P2>>P1, T2 is likely to get no slack always)

1Tleft

T1 preempted T2 T3

T1cont.

idle

idle

idle

idle

idle

d1d3d2t2t1

Page 11: Preemption Handling and Scalability of Feedback DVS-EDF

9/22/2002 NC State University 11

idle

idle

Backward Sweep SchemeRemaining exec. time is reserved as late as possible ( but no later than the preempted task’s deadline ).

Assume: = 3 slots

Backward sweep: 2 idle slots for T2, 1 idle slots for T3

More greedy than forward sweep scheme

1Tleft

T1 preempted T2 T3

T1cont.

idle

idle

idle

idle

idle

d1d3d2t2t1

Page 12: Preemption Handling and Scalability of Feedback DVS-EDF

9/22/2002 NC State University 12

Feedback Scheme

Split task k: Ck = Ca + Cb

The average actual exec. time of Ck over past is used to anticipate future Ca portions.

Ca Cb

100%

2,1

)2(

,2

1

11

1

ii

ciCaCa

WCETCa

iii

Ck

•the 1st instance of Ck:

•later instances:

Page 13: Preemption Handling and Scalability of Feedback DVS-EDF

9/22/2002 NC State University 13

Experiments

Parameters: 3-task sets and 10-tasks sets

Vary: utilization and cc/WCET

Compare

Look-ahead DVS [Pillai et al.]

Our feedback DVS

Optimal: ideal scaling, disregard deadline

All energy values are relative to Look-ahead DVS :

Look-ahead DVS : 0%

Ours: additional savings over Look-ahead DVS

Page 14: Preemption Handling and Scalability of Feedback DVS-EDF

9/22/2002 NC State University 14

Scalability ( lowest workload)

cc=25%WCET

0%

10%

20%

30%

40%

50%

60%

0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

Utilization

Pe

rce

nta

ge

Our DVS on 3-task set

Our DVS on 10-task set

Optimal of 3-task set

Optimal of 10-task set

Look-ahead DVS

Page 15: Preemption Handling and Scalability of Feedback DVS-EDF

9/22/2002 NC State University 15

Scalability ( medium workload)

cc=50% WCET

0%

5%

10%

15%

20%

25%

30%

35%

40%

45%

0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

Utilization

Pe

rce

nta

ge

Our DVS on 3-task set

Our DVS on 10-task set

Optimal of 3-task set

Optimal of 10-task set

Look ahead DVS

Page 16: Preemption Handling and Scalability of Feedback DVS-EDF

9/22/2002 NC State University 16

Scalability ( higher workload)

cc= 75% WCET

-5%

0%

5%

10%

15%

20%

25%

30%

35%

40%

45%

0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

Utilization

Pe

rce

nta

ge

Our DVS on 3-task set

Our DVS on 10-taks set

Optimal of 3-task set

Optimal of 10-task set

Look ahead DVS

Page 17: Preemption Handling and Scalability of Feedback DVS-EDF

9/22/2002 NC State University 17

Scalability ( maximum workload)

cc= 100% WCET

-10%

-5%

0%

5%

10%

15%

20%

25%

30%

35%

40%

0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

Utilization

Pe

rce

nta

ge

Our DVS on 3-task set

Our DVS on 10-task set

Optimal of 3-task setl

Optimal of 10-task set

Look ahead DVS

majorsaving

s

minorlosses

Page 18: Preemption Handling and Scalability of Feedback DVS-EDF

9/22/2002 NC State University 18

Feedback Effect

Varying actual exec. time of task set1. Actual exec. time (cc) always equals to 50% WCET

2. Actual exec. Time = sin(t), in [0.1WCET, 0.9 WCET]

t

WCET

50% cc

WCET

cc50%

t

Page 19: Preemption Handling and Scalability of Feedback DVS-EDF

9/22/2002 NC State University 19

Feedback Effect

Not much difference good! Feedback scheme compensates for fluctuations

200000

300000

400000

500000

600000

0,1 0,2 0,3 0,4 0,5 0,6 0,7 0,8 0,9 1

Utilization

En

erg

y

cc=50% WCET

cc = sin(t) in [0.1WCET, 0.9 WCET]

Page 20: Preemption Handling and Scalability of Feedback DVS-EDF

9/22/2002 NC State University 20

Conclusion

Feedback-EDF DVS for hard real-time systems

Slack generation and passing

Slots reservation at preemption points

Up to 37% additional energy savings over the best prior work

Scalability: 3-tasks and 10-tasks show savings.

Page 21: Preemption Handling and Scalability of Feedback DVS-EDF

9/22/2002 NC State University 21

Future Work

Time penalty for voltage changesCost depends on architecture (getting smaller)

Experiments with embedded device

Handling of dependent tasks

Page 22: Preemption Handling and Scalability of Feedback DVS-EDF

9/22/2002 NC State University 22

Related Work

Pillai et al. [SOSP’01]Assuming same scaling factor for all real-time tasks

Look ahead DVS

F. Gruian [ISLPED’01]Deriving dual-voltage schedule from the ideal case with stochastic information

D. Mosse et al. [RTSS’01]Dynamically exploiting early completion of tasks’ future executions

Page 23: Preemption Handling and Scalability of Feedback DVS-EDF

9/22/2002 NC State University 23

Slack Passing (Over-Scaling)

Over-scaling: actual exec. time > WCET

is feasible if the total slack is not exceeded as well

T1

T2

t2 t4 t5 d1 d2

C1 (WCET)

c1j

Slack=C1-c1j<0T2 can still be scaled without any deadline misses as long as S=S+C1-c1j >0