BoundingandShapingtheDemandof Mixed …user.it.uu.se/~ponek616/files/ECRTS12/ECRTS12-slides.pdf ·...

39
Bounding and Shaping the Demand of Mixed-Criticality Sporadic Tasks Pontus Ekberg & Wang Yi Uppsala University, Sweden ECRTS 2012

Transcript of BoundingandShapingtheDemandof Mixed …user.it.uu.se/~ponek616/files/ECRTS12/ECRTS12-slides.pdf ·...

Page 1: BoundingandShapingtheDemandof Mixed …user.it.uu.se/~ponek616/files/ECRTS12/ECRTS12-slides.pdf · Mixed-criticalitysporadictasks (Ci(lo) ⩽ Ci(hi)) Ci(lo): WCETatlow-criticality

Bounding and Shaping the Demand ofMixed-Criticality Sporadic Tasks

Pontus Ekberg & Wang Yi

Uppsala University, Sweden

ECRTS 2012

Page 2: BoundingandShapingtheDemandof Mixed …user.it.uu.se/~ponek616/files/ECRTS12/ECRTS12-slides.pdf · Mixed-criticalitysporadictasks (Ci(lo) ⩽ Ci(hi)) Ci(lo): WCETatlow-criticality

Mixed-criticality sporadic tasks

(Ci(lo) ⩽ Ci(hi))Ci(lo): WCET at low-criticalityCi(hi): WCET at high-criticality

Di: Relative deadlineTi: PeriodLi: Criticality (lo or hi)

Task τi

Pontus Ekberg Bounding and Shaping the Demand of Mixed-Criticality Sporadic Tasks 2

Page 3: BoundingandShapingtheDemandof Mixed …user.it.uu.se/~ponek616/files/ECRTS12/ECRTS12-slides.pdf · Mixed-criticalitysporadictasks (Ci(lo) ⩽ Ci(hi)) Ci(lo): WCETatlow-criticality

Mixed-criticality sporadic tasks

τ1 (L1 = lo):

τ2 (L2 = hi):

τ3 (L3 = hi):

Pontus Ekberg Bounding and Shaping the Demand of Mixed-Criticality Sporadic Tasks 3

Page 4: BoundingandShapingtheDemandof Mixed …user.it.uu.se/~ponek616/files/ECRTS12/ECRTS12-slides.pdf · Mixed-criticalitysporadictasks (Ci(lo) ⩽ Ci(hi)) Ci(lo): WCETatlow-criticality

Mixed-criticality sporadic tasks

τ1 (L1 = lo):

τ2 (L2 = hi):

τ3 (L3 = hi):

Pontus Ekberg Bounding and Shaping the Demand of Mixed-Criticality Sporadic Tasks 4

Page 5: BoundingandShapingtheDemandof Mixed …user.it.uu.se/~ponek616/files/ECRTS12/ECRTS12-slides.pdf · Mixed-criticalitysporadictasks (Ci(lo) ⩽ Ci(hi)) Ci(lo): WCETatlow-criticality

Mixed-criticality sporadic tasks

τ1 (L1 = lo):

τ2 (L2 = hi):

τ3 (L3 = hi):

Pontus Ekberg Bounding and Shaping the Demand of Mixed-Criticality Sporadic Tasks 5

Page 6: BoundingandShapingtheDemandof Mixed …user.it.uu.se/~ponek616/files/ECRTS12/ECRTS12-slides.pdf · Mixed-criticalitysporadictasks (Ci(lo) ⩽ Ci(hi)) Ci(lo): WCETatlow-criticality

Schedulability analysis

A task set τ is schedulable if

∀ℓ ⩾ 0 :∑τi∈τ

dbf(τi, ℓ) ⩽ sbf(ℓ).

Classic EDF analysis

Low-criticality mode High-criticality mode

Time

Pontus Ekberg Bounding and Shaping the Demand of Mixed-Criticality Sporadic Tasks 6

Page 7: BoundingandShapingtheDemandof Mixed …user.it.uu.se/~ponek616/files/ECRTS12/ECRTS12-slides.pdf · Mixed-criticalitysporadictasks (Ci(lo) ⩽ Ci(hi)) Ci(lo): WCETatlow-criticality

Schedulability analysis

A task set τ is schedulable if both A and B hold:

A : ∀ℓ ⩾ 0 :∑τi∈τ

dbflo(τi, ℓ) ⩽ sbflo(ℓ)

B : ∀ℓ ⩾ 0 :∑

τi∈hi(τ)

dbfhi(τi, ℓ) ⩽ sbfhi(ℓ)

Mixed-criticality EDF analysis

Low-criticality mode High-criticality mode

Time

Pontus Ekberg Bounding and Shaping the Demand of Mixed-Criticality Sporadic Tasks 7

Page 8: BoundingandShapingtheDemandof Mixed …user.it.uu.se/~ponek616/files/ECRTS12/ECRTS12-slides.pdf · Mixed-criticalitysporadictasks (Ci(lo) ⩽ Ci(hi)) Ci(lo): WCETatlow-criticality

Demand-bound functions

Half-finished jobs are carried over to high-criticality mode.

Low-criticality mode High-criticality mode

Time

Each τi behaves exactly like a standardsporadic task with WCET Ci(lo).

Use dbfs from Baruah et al., 1990!

Each τi behaves similar to a standardsporadic task with WCET Ci(hi).

Pontus Ekberg Bounding and Shaping the Demand of Mixed-Criticality Sporadic Tasks 8

Page 9: BoundingandShapingtheDemandof Mixed …user.it.uu.se/~ponek616/files/ECRTS12/ECRTS12-slides.pdf · Mixed-criticalitysporadictasks (Ci(lo) ⩽ Ci(hi)) Ci(lo): WCETatlow-criticality

Demand-bound functions

Half-finished jobs are carried over to high-criticality mode.

Low-criticality mode High-criticality mode

Time

Each τi behaves exactly like a standardsporadic task with WCET Ci(lo).

Use dbfs from Baruah et al., 1990!

Each τi behaves similar to a standardsporadic task with WCET Ci(hi).

Pontus Ekberg Bounding and Shaping the Demand of Mixed-Criticality Sporadic Tasks 9

Page 10: BoundingandShapingtheDemandof Mixed …user.it.uu.se/~ponek616/files/ECRTS12/ECRTS12-slides.pdf · Mixed-criticalitysporadictasks (Ci(lo) ⩽ Ci(hi)) Ci(lo): WCETatlow-criticality

Demand-bound functions

Half-finished jobs are carried over to high-criticality mode.

Low-criticality mode High-criticality mode

Time

Each τi behaves exactly like a standardsporadic task with WCET Ci(lo).

Use dbfs from Baruah et al., 1990!

Each τi behaves similar to a standardsporadic task with WCET Ci(hi).

Pontus Ekberg Bounding and Shaping the Demand of Mixed-Criticality Sporadic Tasks 10

Page 11: BoundingandShapingtheDemandof Mixed …user.it.uu.se/~ponek616/files/ECRTS12/ECRTS12-slides.pdf · Mixed-criticalitysporadictasks (Ci(lo) ⩽ Ci(hi)) Ci(lo): WCETatlow-criticality

Demand-bound functions

Half-finished jobs are carried over to high-criticality mode.

Low-criticality mode High-criticality mode

Time

Each τi behaves exactly like a standardsporadic task with WCET Ci(lo).

Use dbfs from Baruah et al., 1990!

Each τi behaves similar to a standardsporadic task with WCET Ci(hi).

Pontus Ekberg Bounding and Shaping the Demand of Mixed-Criticality Sporadic Tasks 11

Page 12: BoundingandShapingtheDemandof Mixed …user.it.uu.se/~ponek616/files/ECRTS12/ECRTS12-slides.pdf · Mixed-criticalitysporadictasks (Ci(lo) ⩽ Ci(hi)) Ci(lo): WCETatlow-criticality

Carry-over jobs

Half-finished jobs are carried over to high-criticality mode.

Low-criticality mode High-criticality mode

Time

To show A ∧ B, we show A ∧ (A → B).

Restricting to the interesting cases

Pontus Ekberg Bounding and Shaping the Demand of Mixed-Criticality Sporadic Tasks 12

Page 13: BoundingandShapingtheDemandof Mixed …user.it.uu.se/~ponek616/files/ECRTS12/ECRTS12-slides.pdf · Mixed-criticalitysporadictasks (Ci(lo) ⩽ Ci(hi)) Ci(lo): WCETatlow-criticality

Carry-over jobs

t t+ Di

Release of τi Absolute deadline

Switch to high-criticality mode

Remaining schedulingwindow Ci(hi)−Ci(lo)

… Time

Pontus Ekberg Bounding and Shaping the Demand of Mixed-Criticality Sporadic Tasks 13

Page 14: BoundingandShapingtheDemandof Mixed …user.it.uu.se/~ponek616/files/ECRTS12/ECRTS12-slides.pdf · Mixed-criticalitysporadictasks (Ci(lo) ⩽ Ci(hi)) Ci(lo): WCETatlow-criticality

Carry-over jobs

t t+ Di

Release of τi Absolute deadline

Switch to high-criticality mode

Remaining schedulingwindow

Ci(hi)−Ci(lo)

… Time

Pontus Ekberg Bounding and Shaping the Demand of Mixed-Criticality Sporadic Tasks 14

Page 15: BoundingandShapingtheDemandof Mixed …user.it.uu.se/~ponek616/files/ECRTS12/ECRTS12-slides.pdf · Mixed-criticalitysporadictasks (Ci(lo) ⩽ Ci(hi)) Ci(lo): WCETatlow-criticality

Carry-over jobs

t t+ Di

Release of τi Absolute deadline

Switch to high-criticality mode

Remaining schedulingwindow

Ci(hi)−Ci(lo)

… Time

Pontus Ekberg Bounding and Shaping the Demand of Mixed-Criticality Sporadic Tasks 15

Page 16: BoundingandShapingtheDemandof Mixed …user.it.uu.se/~ponek616/files/ECRTS12/ECRTS12-slides.pdf · Mixed-criticalitysporadictasks (Ci(lo) ⩽ Ci(hi)) Ci(lo): WCETatlow-criticality

Carry-over jobs

t t+ Di

Release of τi Absolute deadline

Switch to high-criticality mode

Remaining schedulingwindow Ci(hi)−Ci(lo)

… Time

Pontus Ekberg Bounding and Shaping the Demand of Mixed-Criticality Sporadic Tasks 16

Page 17: BoundingandShapingtheDemandof Mixed …user.it.uu.se/~ponek616/files/ECRTS12/ECRTS12-slides.pdf · Mixed-criticalitysporadictasks (Ci(lo) ⩽ Ci(hi)) Ci(lo): WCETatlow-criticality

Adjusting the demand of carry-over jobs

t t+ Di(lo) t+ Di(hi)

Release of τi

Deadlines in low- and high-criticality mode

… Time

… Time

Switch to high-criticality mode

… Time

Switch to high-criticality mode

Remaining scheduling window

Pontus Ekberg Bounding and Shaping the Demand of Mixed-Criticality Sporadic Tasks 17

Page 18: BoundingandShapingtheDemandof Mixed …user.it.uu.se/~ponek616/files/ECRTS12/ECRTS12-slides.pdf · Mixed-criticalitysporadictasks (Ci(lo) ⩽ Ci(hi)) Ci(lo): WCETatlow-criticality

Adjusting the demand of carry-over jobs

t t+ Di(lo) t+ Di(hi)

Release of τi

Deadlines in low- and high-criticality mode

… Time

… Time

Switch to high-criticality mode

… Time

Switch to high-criticality mode

Remaining scheduling window

Pontus Ekberg Bounding and Shaping the Demand of Mixed-Criticality Sporadic Tasks 18

Page 19: BoundingandShapingtheDemandof Mixed …user.it.uu.se/~ponek616/files/ECRTS12/ECRTS12-slides.pdf · Mixed-criticalitysporadictasks (Ci(lo) ⩽ Ci(hi)) Ci(lo): WCETatlow-criticality

Adjusting the demand of carry-over jobs

t t+ Di(lo) t+ Di(hi)

Release of τi

Deadlines in low- and high-criticality mode

… Time… Time

Switch to high-criticality mode

… Time

Switch to high-criticality mode

Remaining scheduling window

Pontus Ekberg Bounding and Shaping the Demand of Mixed-Criticality Sporadic Tasks 19

Page 20: BoundingandShapingtheDemandof Mixed …user.it.uu.se/~ponek616/files/ECRTS12/ECRTS12-slides.pdf · Mixed-criticalitysporadictasks (Ci(lo) ⩽ Ci(hi)) Ci(lo): WCETatlow-criticality

Adjusting the demand of carry-over jobs

t t+ Di(lo) t+ Di(hi)

Release of τi

Deadlines in low- and high-criticality mode

… Time… Time

Switch to high-criticality mode

… Time

Switch to high-criticality mode

Remaining scheduling window

Pontus Ekberg Bounding and Shaping the Demand of Mixed-Criticality Sporadic Tasks 20

Page 21: BoundingandShapingtheDemandof Mixed …user.it.uu.se/~ponek616/files/ECRTS12/ECRTS12-slides.pdf · Mixed-criticalitysporadictasks (Ci(lo) ⩽ Ci(hi)) Ci(lo): WCETatlow-criticality

Adjusting the demand of carry-over jobs

t t+ Di(lo) t+ Di(hi)

Release of τi

Deadlines in low- and high-criticality mode

… Time… Time

Switch to high-criticality mode

… Time

Switch to high-criticality mode

Remaining scheduling window

Pontus Ekberg Bounding and Shaping the Demand of Mixed-Criticality Sporadic Tasks 21

Page 22: BoundingandShapingtheDemandof Mixed …user.it.uu.se/~ponek616/files/ECRTS12/ECRTS12-slides.pdf · Mixed-criticalitysporadictasks (Ci(lo) ⩽ Ci(hi)) Ci(lo): WCETatlow-criticality

Demand-bound functions for high-criticality mode

0 5 10 15 20 25 30Time interval length (`)

0

5

10

15

20

25

30

Dem

and

dbfHI(τi, `)

Pontus Ekberg Bounding and Shaping the Demand of Mixed-Criticality Sporadic Tasks 22

Page 23: BoundingandShapingtheDemandof Mixed …user.it.uu.se/~ponek616/files/ECRTS12/ECRTS12-slides.pdf · Mixed-criticalitysporadictasks (Ci(lo) ⩽ Ci(hi)) Ci(lo): WCETatlow-criticality

Demand-bound functions for high-criticality mode

0 5 10 15 20 25 30Time interval length (`)

0

5

10

15

20

25

30

Dem

and

dbfHI(τi, `)

dbfLO(τi, `)

Pontus Ekberg Bounding and Shaping the Demand of Mixed-Criticality Sporadic Tasks 23

Page 24: BoundingandShapingtheDemandof Mixed …user.it.uu.se/~ponek616/files/ECRTS12/ECRTS12-slides.pdf · Mixed-criticalitysporadictasks (Ci(lo) ⩽ Ci(hi)) Ci(lo): WCETatlow-criticality

The effect of the low-criticality relative deadline

If Di(lo) is decreased by δ ∈ Z, then

dbflo(τi, ℓ) ; dbflo(τi, ℓ+ δ)

dbfhi(τi, ℓ) ; dbfhi(τi, ℓ− δ)

Shifting lemma

Pontus Ekberg Bounding and Shaping the Demand of Mixed-Criticality Sporadic Tasks 24

Page 25: BoundingandShapingtheDemandof Mixed …user.it.uu.se/~ponek616/files/ECRTS12/ECRTS12-slides.pdf · Mixed-criticalitysporadictasks (Ci(lo) ⩽ Ci(hi)) Ci(lo): WCETatlow-criticality

The effect of the low-criticality relative deadline

0 5 10 15 20 25 30Time interval length (`)

0

5

10

15

20

25

30

Dem

and

δδ

dbfHI(τi, `)

dbfLO(τi, `)

dbfHI(τi, `), Di(LO) decreased by δ

dbfLO(τi, `), Di(LO) decreased by δ

Pontus Ekberg Bounding and Shaping the Demand of Mixed-Criticality Sporadic Tasks 25

Page 26: BoundingandShapingtheDemandof Mixed …user.it.uu.se/~ponek616/files/ECRTS12/ECRTS12-slides.pdf · Mixed-criticalitysporadictasks (Ci(lo) ⩽ Ci(hi)) Ci(lo): WCETatlow-criticality

Shaping the demand of the task set

A task set τ is schedulable if both A and B hold:

A : ∀ℓ ⩾ 0 :∑τi∈τ

dbflo(τi, ℓ) ⩽ sbflo(ℓ)

B : ∀ℓ ⩾ 0 :∑

τi∈hi(τ)

dbfhi(τi, ℓ) ⩽ sbfhi(ℓ)

Mixed-criticality EDF analysis

Is there a valid assignment of Di(lo)s to each high-criticalitytask τi such that both A and B hold?

A constraint satisfaction problem

Pontus Ekberg Bounding and Shaping the Demand of Mixed-Criticality Sporadic Tasks 26

Page 27: BoundingandShapingtheDemandof Mixed …user.it.uu.se/~ponek616/files/ECRTS12/ECRTS12-slides.pdf · Mixed-criticalitysporadictasks (Ci(lo) ⩽ Ci(hi)) Ci(lo): WCETatlow-criticality

Shaping the demand of the task set

0 10 20 30 40 50 60 70 80 90 100Time interval length (`)

0

10

20

30

40

50

60

70

80

90

100

Dem

and

∑dbfHI∑dbfLO

Pontus Ekberg Bounding and Shaping the Demand of Mixed-Criticality Sporadic Tasks 27

Page 28: BoundingandShapingtheDemandof Mixed …user.it.uu.se/~ponek616/files/ECRTS12/ECRTS12-slides.pdf · Mixed-criticalitysporadictasks (Ci(lo) ⩽ Ci(hi)) Ci(lo): WCETatlow-criticality

Shaping the demand of the task set

0 10 20 30 40 50 60 70 80 90 100Time interval length (`)

0

10

20

30

40

50

60

70

80

90

100

Dem

and

∑dbfHI∑dbfLO

Pontus Ekberg Bounding and Shaping the Demand of Mixed-Criticality Sporadic Tasks 28

Page 29: BoundingandShapingtheDemandof Mixed …user.it.uu.se/~ponek616/files/ECRTS12/ECRTS12-slides.pdf · Mixed-criticalitysporadictasks (Ci(lo) ⩽ Ci(hi)) Ci(lo): WCETatlow-criticality

Shaping the demand of the task set

0 10 20 30 40 50 60 70 80 90 100Time interval length (`)

0

10

20

30

40

50

60

70

80

90

100

Dem

and

∑dbfHI∑dbfLO

Pontus Ekberg Bounding and Shaping the Demand of Mixed-Criticality Sporadic Tasks 29

Page 30: BoundingandShapingtheDemandof Mixed …user.it.uu.se/~ponek616/files/ECRTS12/ECRTS12-slides.pdf · Mixed-criticalitysporadictasks (Ci(lo) ⩽ Ci(hi)) Ci(lo): WCETatlow-criticality

Shaping the demand of the task set

0 10 20 30 40 50 60 70 80 90 100Time interval length (`)

0

10

20

30

40

50

60

70

80

90

100

Dem

and

∑dbfHI∑dbfLO

Pontus Ekberg Bounding and Shaping the Demand of Mixed-Criticality Sporadic Tasks 30

Page 31: BoundingandShapingtheDemandof Mixed …user.it.uu.se/~ponek616/files/ECRTS12/ECRTS12-slides.pdf · Mixed-criticalitysporadictasks (Ci(lo) ⩽ Ci(hi)) Ci(lo): WCETatlow-criticality

Shaping the demand of the task set

0 10 20 30 40 50 60 70 80 90 100Time interval length (`)

0

10

20

30

40

50

60

70

80

90

100

Dem

and

∑dbfHI∑dbfLO

Pontus Ekberg Bounding and Shaping the Demand of Mixed-Criticality Sporadic Tasks 31

Page 32: BoundingandShapingtheDemandof Mixed …user.it.uu.se/~ponek616/files/ECRTS12/ECRTS12-slides.pdf · Mixed-criticalitysporadictasks (Ci(lo) ⩽ Ci(hi)) Ci(lo): WCETatlow-criticality

Shaping the demand of the task set

0 10 20 30 40 50 60 70 80 90 100Time interval length (`)

0

10

20

30

40

50

60

70

80

90

100

Dem

and

∑dbfHI∑dbfLO

Pontus Ekberg Bounding and Shaping the Demand of Mixed-Criticality Sporadic Tasks 32

Page 33: BoundingandShapingtheDemandof Mixed …user.it.uu.se/~ponek616/files/ECRTS12/ECRTS12-slides.pdf · Mixed-criticalitysporadictasks (Ci(lo) ⩽ Ci(hi)) Ci(lo): WCETatlow-criticality

Shaping the demand of the task set

0 10 20 30 40 50 60 70 80 90 100Time interval length (`)

0

10

20

30

40

50

60

70

80

90

100

Dem

and

∑dbfHI∑dbfLO

Pontus Ekberg Bounding and Shaping the Demand of Mixed-Criticality Sporadic Tasks 33

Page 34: BoundingandShapingtheDemandof Mixed …user.it.uu.se/~ponek616/files/ECRTS12/ECRTS12-slides.pdf · Mixed-criticalitysporadictasks (Ci(lo) ⩽ Ci(hi)) Ci(lo): WCETatlow-criticality

Shaping the demand of the task set

0 10 20 30 40 50 60 70 80 90 100Time interval length (`)

0

10

20

30

40

50

60

70

80

90

100

Dem

and

∑dbfHI∑dbfLO

Pontus Ekberg Bounding and Shaping the Demand of Mixed-Criticality Sporadic Tasks 34

Page 35: BoundingandShapingtheDemandof Mixed …user.it.uu.se/~ponek616/files/ECRTS12/ECRTS12-slides.pdf · Mixed-criticalitysporadictasks (Ci(lo) ⩽ Ci(hi)) Ci(lo): WCETatlow-criticality

Evaluation

0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0Average utilization

0

10

20

30

40

50

60

70

80

90

100Accep

tanc

eratio(%

)

OurOCBP-prioAMC-maxVestalEDF-VDOCBP-loadNaive

Pontus Ekberg Bounding and Shaping the Demand of Mixed-Criticality Sporadic Tasks 35

Page 36: BoundingandShapingtheDemandof Mixed …user.it.uu.se/~ponek616/files/ECRTS12/ECRTS12-slides.pdf · Mixed-criticalitysporadictasks (Ci(lo) ⩽ Ci(hi)) Ci(lo): WCETatlow-criticality

Evaluation

0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0Probability of high-criticality

0

10

20

30

40

50

60

70

80

90

100Weigh

tedacceptan

ceratio(%

)

OurOCBP-prioAMC-maxVestalEDF-VDOCBP-loadNaive

Pontus Ekberg Bounding and Shaping the Demand of Mixed-Criticality Sporadic Tasks 36

Page 37: BoundingandShapingtheDemandof Mixed …user.it.uu.se/~ponek616/files/ECRTS12/ECRTS12-slides.pdf · Mixed-criticalitysporadictasks (Ci(lo) ⩽ Ci(hi)) Ci(lo): WCETatlow-criticality

Evaluation

1 3 5 7 9 11 13 15 17 19Maximum ratio of high- to low-criticality WCET

0

10

20

30

40

50

60

70

80

90

100Weigh

tedacceptan

ceratio(%

)

OurOCBP-prioAMC-maxVestalEDF-VDOCBP-loadNaive

Pontus Ekberg Bounding and Shaping the Demand of Mixed-Criticality Sporadic Tasks 37

Page 38: BoundingandShapingtheDemandof Mixed …user.it.uu.se/~ponek616/files/ECRTS12/ECRTS12-slides.pdf · Mixed-criticalitysporadictasks (Ci(lo) ⩽ Ci(hi)) Ci(lo): WCETatlow-criticality

Conclusions

1 Demand-bound functions are useful also for mixed-criticality systems.

2 The particulars of mixed-criticality demand-bound functions allowus to easily shape the demand to the supply of the platform.

3 Experiments indicate that this approach performs well.

Pontus Ekberg Bounding and Shaping the Demand of Mixed-Criticality Sporadic Tasks 38

Page 39: BoundingandShapingtheDemandof Mixed …user.it.uu.se/~ponek616/files/ECRTS12/ECRTS12-slides.pdf · Mixed-criticalitysporadictasks (Ci(lo) ⩽ Ci(hi)) Ci(lo): WCETatlow-criticality

Questions?

Pontus Ekberg Bounding and Shaping the Demand of Mixed-Criticality Sporadic Tasks 39