Probabilistic Preemption Control using Frequency Scaling for Sporadic Real-time Tasks Abhilash...

22
Probabilistic Preemption Control using Frequency Scaling for Sporadic Real- time Tasks Abhilash Thekkilakattil , Radu Dobrin and Sasikumar Punnekkat

Transcript of Probabilistic Preemption Control using Frequency Scaling for Sporadic Real-time Tasks Abhilash...

Page 1: Probabilistic Preemption Control using Frequency Scaling for Sporadic Real-time Tasks Abhilash Thekkilakattil, Radu Dobrin and Sasikumar Punnekkat.

Probabilistic Preemption Control using Frequency Scaling for Sporadic Real-time Tasks

Abhilash Thekkilakattil, Radu Dobrin and Sasikumar Punnekkat

Page 2: Probabilistic Preemption Control using Frequency Scaling for Sporadic Real-time Tasks Abhilash Thekkilakattil, Radu Dobrin and Sasikumar Punnekkat.

Real-time Systems

2

web images

Page 3: Probabilistic Preemption Control using Frequency Scaling for Sporadic Real-time Tasks Abhilash Thekkilakattil, Radu Dobrin and Sasikumar Punnekkat.

3

Real-time tasks

Mapping of Events to Real-time Tasks

web images

Page 4: Probabilistic Preemption Control using Frequency Scaling for Sporadic Real-time Tasks Abhilash Thekkilakattil, Radu Dobrin and Sasikumar Punnekkat.

Sporadic Real-time Tasks

4

job1 job2

Worst Case Execution Time

Min. inter-arrival time (Period)

Release time

Relative deadline

task

rel

ease

pro

bab

ility

0.05

0.060.07

0.16

0.25

0.17

0.09

0.07 0.07

0 1 2 3 4 5 6 7 8

time

Probabilistic task arrivals

Task worst case execution timescales with processor frequency

Page 5: Probabilistic Preemption Control using Frequency Scaling for Sporadic Real-time Tasks Abhilash Thekkilakattil, Radu Dobrin and Sasikumar Punnekkat.

Real-time Scheduling

Guarantee task completions before their deadline

5

Non-preemptive Scheduling

Low runtime overhead Increased blocking times

Preemptive Scheduling

Ability to achieve high utilization Preemption costs

high priority

low priority

preemption cost

blocking

high priority

low priority

Page 6: Probabilistic Preemption Control using Frequency Scaling for Sporadic Real-time Tasks Abhilash Thekkilakattil, Radu Dobrin and Sasikumar Punnekkat.

6

Common Preemption Related Costs

Scheduler related cost

– Overhead involved in saving and retrieving the context of the preempted task

Cache related preemption delays– Overhead involved in reloading cache lines– Vary with the point of preemption– Increased bus contention

Pipeline related cost– Clear the pipeline upon preemption– Refill the pipeline upon resumption

Page 7: Probabilistic Preemption Control using Frequency Scaling for Sporadic Real-time Tasks Abhilash Thekkilakattil, Radu Dobrin and Sasikumar Punnekkat.

Frequency Scaling in Real-time Systems

7

CPU frequency:

Task takes less time to execute at higher frequencies changes the schedule behavior requires higher voltages

P: Power consumptionC: Effective capacitanceV: Applied voltageF: CPU frequency

Processor power consumption:

min max

CPU frequencyCPU frequencyCPU frequencyCPU frequencyCPU frequencyCPU frequency CPU frequency

Page 8: Probabilistic Preemption Control using Frequency Scaling for Sporadic Real-time Tasks Abhilash Thekkilakattil, Radu Dobrin and Sasikumar Punnekkat.

What?

8

We examine the use of CPU frequency scaling to control preemption behavior in sporadic real-time

task systems with probabilistic task releases.

Page 9: Probabilistic Preemption Control using Frequency Scaling for Sporadic Real-time Tasks Abhilash Thekkilakattil, Radu Dobrin and Sasikumar Punnekkat.

Related work

9

Need for preemption elimination recognized

Ramamritham-94, Burns-95, Ramaprasad-06

RM- more preemptionsthan EDF

Buttazzo-05

Attribute re-assignment for FPS for preemption control Dobrin-04

Preemption aware scheduling algorithmsYang-09, Woonseok -04

Preemption thresholdSchedulingLamie-97, Saksena-00, Wang-99

Context switches and cache related preemption delaysLee-98 , Schneider-00, Katcher-93

DVS: energy conservation-increase in preemptions

Pillai-01,Aydin-04, Bini-09, Marinoni-07

Limited preemption schedulingBaruah-05, Bertogna -10

Page 10: Probabilistic Preemption Control using Frequency Scaling for Sporadic Real-time Tasks Abhilash Thekkilakattil, Radu Dobrin and Sasikumar Punnekkat.

Methodology Overview

10

Offline phase Online phaseinputs

Page 11: Probabilistic Preemption Control using Frequency Scaling for Sporadic Real-time Tasks Abhilash Thekkilakattil, Radu Dobrin and Sasikumar Punnekkat.

Offline Phase

Derive permitted relaxation to inter-arrival times

Minimum inter-arrival times: worst case scenario• Determines task set schedulability

Relax the release times of jobs: using probabilities• Most probable release time after the minimum inter-arrival

time has elapsed

• Apply this relaxation at runtime for preemption control

• Permits for trade-offs

11

Page 12: Probabilistic Preemption Control using Frequency Scaling for Sporadic Real-time Tasks Abhilash Thekkilakattil, Radu Dobrin and Sasikumar Punnekkat.

Online Phase

Online preemption control algorithm:

• At runtime, find the earliest probable time instant of preemption

• Speed-up the busy period to avoid preemption

• Speed-up to maximum speed if preemption cannot be avoided- To keep the simplicity of the online algorithm

12

Page 13: Probabilistic Preemption Control using Frequency Scaling for Sporadic Real-time Tasks Abhilash Thekkilakattil, Radu Dobrin and Sasikumar Punnekkat.

13

Example

13

Task Computation time

Inter-arrival time

A 1 5

B 3 7

C 3 20

5 10

5 10

5 10

A

B

C

Original Fixed Priority Schedule

Page 14: Probabilistic Preemption Control using Frequency Scaling for Sporadic Real-time Tasks Abhilash Thekkilakattil, Radu Dobrin and Sasikumar Punnekkat.

Offline Phase

14

Task Computation time

Time period

Relaxation to min. inter-arrival times for threshold

probability=0.20

Relaxation to min. inter-arrival times for threshold

probability=0.24

A 1 5 1 3

B 3 7 1 3

C 3 20 1 3

0 1 2 3 4 5 6 7 8 9 10

0.04

0.08

0.24

0.20

0.020.040.04

0.080.080.1

0.08

(time)

Tas

k re

leas

e pr

obab

ility

Page 15: Probabilistic Preemption Control using Frequency Scaling for Sporadic Real-time Tasks Abhilash Thekkilakattil, Radu Dobrin and Sasikumar Punnekkat.

Online Phase

15

Task Computation time

Inter-arrival time

Relaxation

A 1 5 1

B 3 7 1

C 3 20 1

5 10

5 10

5 10

A

B

C

C=1+3+3 = 7t=6 (since we use release time probabilities)

Speed=7/6

We speed-up to max. speed: simplicity

earliest possible preemption point earliest possible preemption point

C=3 t=1Speed=3/1

Page 16: Probabilistic Preemption Control using Frequency Scaling for Sporadic Real-time Tasks Abhilash Thekkilakattil, Radu Dobrin and Sasikumar Punnekkat.

Evaluation

16

Processor Speed0 1 2 3 4 5

Power consumption per clock cycle

(mW)0 20 50 50 200 500

No. of task sets 1400

No. of tasks per task set

3-15

Algorithm used UUniFast*

LCM ≤ 2000

Threshold probabilities

0.20 and 0.24

* E. Bini and G. C. Buttazzo, “Measuring the performance of schedulability tests,” Real-Time Systems, 2005.

0 1 2 3 4 5 6 7 8 9 10

0.04

0.08

0.24

0.20

0.020.040.04

0.080.080.1

0.08

(time)

Tas

k re

leas

e pr

obab

ility

Page 17: Probabilistic Preemption Control using Frequency Scaling for Sporadic Real-time Tasks Abhilash Thekkilakattil, Radu Dobrin and Sasikumar Punnekkat.

Average Number of Preemptions

17probability=0 probability=0.20 probability=0.24

Page 18: Probabilistic Preemption Control using Frequency Scaling for Sporadic Real-time Tasks Abhilash Thekkilakattil, Radu Dobrin and Sasikumar Punnekkat.

Average Power Consumption

18probability=0 probability=0.20 probability=0.24

Page 19: Probabilistic Preemption Control using Frequency Scaling for Sporadic Real-time Tasks Abhilash Thekkilakattil, Radu Dobrin and Sasikumar Punnekkat.

No. of preemptions vs Energy

19

probability=0 probability=0.20 probability=0.24

probability=0 probability=0.20 probability=0.24

Page 20: Probabilistic Preemption Control using Frequency Scaling for Sporadic Real-time Tasks Abhilash Thekkilakattil, Radu Dobrin and Sasikumar Punnekkat.

Conclusions

Manipulate energy usage to control preemptive behavior in

real-time schedules Trade-offs : energy vs. number of preemption Simplicity of the runtime algorithm: O(n) complexity Combined offline-online method: possibility to use more

complex offline methods

Effective: significant preemption reduction shown in simulations Limitations: increased energy consumption

20

Page 21: Probabilistic Preemption Control using Frequency Scaling for Sporadic Real-time Tasks Abhilash Thekkilakattil, Radu Dobrin and Sasikumar Punnekkat.

Future work

Resource augmentation for preemption control Processor speed-up for limited preemption scheduling (floating

non-preemptive region scheduling) Bounds on the speed-up required to guarantee a required

preemption behavior

Contracts for preemption control using CPU frequency scaling

Contract definition and negotiation in Component Based Real-time Systems

21

Page 22: Probabilistic Preemption Control using Frequency Scaling for Sporadic Real-time Tasks Abhilash Thekkilakattil, Radu Dobrin and Sasikumar Punnekkat.

Thank you !

22

Questions ?