Real-Time Workload Models with E cient Analysis · The Digraph Real-Time (DRT) Task Model Adaptive...

Preview:

Citation preview

Real-Time Workload Models with Efficient AnalysisAdvanced Course, 3 Lectures, September 2014

Martin Stigge

Uppsala University, Sweden

Fahrplan

1 DRT Tasks in the Model HierarchyLiu and Layland and Sporadic TasksFrames and BranchingThe Digraph Real-Time (DRT) Task ModelAdaptive Variable-Rate (AVR) Tasks

2 Feasibility Analysis of DRTFeasibility TheoremDemand PairsTest TerminationEvaluation

3 Static Priority Schedulability Analysis of DRTResponse-Time AnalysisRequest FunctionsRefinement AlgorithmEvaluation

Martin Stigge Workload Models + Analysis 2

Fahrplan

1 DRT Tasks in the Model HierarchyLiu and Layland and Sporadic TasksFrames and BranchingThe Digraph Real-Time (DRT) Task ModelAdaptive Variable-Rate (AVR) Tasks

2 Feasibility Analysis of DRTFeasibility TheoremDemand PairsTest TerminationEvaluation

3 Static Priority Schedulability Analysis of DRTResponse-Time AnalysisRequest FunctionsRefinement AlgorithmEvaluation

Martin Stigge Workload Models + Analysis 2

Problem Overview

Workload Model

Task A

Task B

Task C

DRT

High priority

A1

A2

A3

A4

Medium priority

B1

B2

B3

Low priorityC

Scheduler Model

EDF/Static Prio/...

Task At

Task Bt

Feasible? Schedulable? Response times?

Our Setting:• DRT tasks

• Static Priorities

• Precise Test

Martin Stigge Workload Models + Analysis 3

The Liu and Layland (L&L) Task Model(Liu and Layland, 1973)

• Tasks are periodic• Job WCET e• Period p (implicit deadline)

� ;

(e, p)e e

tp p

...

• Advantages: Well-known model; efficient schedulability tests

• Disadvantage: Very limited expressiveness

Martin Stigge Workload Models + Analysis 4

A Hierarchy of Models

Liu & Layland(e, d = p)

efficient

Sch

edu

lab

ility

An

alys

is

difficult

low

Exp

ress

iven

ess

high

Martin Stigge Workload Models + Analysis 5

The Sporadic Task Model(Mok, 1983)

• Deadlines 6= periods; releases sporadic

• Each tasks defined by:• Job WCET e• Relative deadline d• Minimum inter-release delay p

� ;

(e, d , p)e e

t6 p 6 p

d d...

Martin Stigge Workload Models + Analysis 6

The General Multiframe (GMF) Task Model

• Behavior is not always periodic

Frame 0 Frame 1 Frame 2 Frame 3 Frame 0

t

• Task is split into frames, each with own• Execution time e(j)

• Inter-release separation p(j)

• Deadline d (j) for the job

Martin Stigge Workload Models + Analysis 7

The General Multiframe (GMF) Task Model

• Behavior is not always periodic

Frame 0 Frame 1 Frame 2 Frame 3 Frame 0

t

• Task is split into frames, each with own• Execution time e(j)

• Inter-release separation p(j)

• Deadline d (j) for the job

Martin Stigge Workload Models + Analysis 7

The General Multiframe (GMF) Task Model (cont.)(Baruah et al., 1999)

• Tasks cycle through job types• Vector for WCET (e(1), . . . , e(n))• Vector for deadlines (d (1), . . . , d (n))• Vector for minimum inter-release delays (p(1), . . . , p(n))

J1

J2

J3

J4

J5

p(1)p(2)

p(3)

p(4)p(5)

;e(1) e(2)

t

6 p(1) 6 p(2)

d (1) d (2)

...

Martin Stigge Workload Models + Analysis 8

A Hierarchy of Models

Liu & Layland(e, d = p)

sporadic(e, d , p)

multiframe(ei , d = p)

generalized multiframe (GMF)(ei , di , pi )

efficient

Sch

edu

lab

ility

An

alys

is

difficult

low

Exp

ress

iven

ess

high

Martin Stigge Workload Models + Analysis 9

The Non-Cyclic GMF Task Model(Moyo et al., 2010)

• Frame order unknown a priori

• Syntax similar to GMF:• Vector for WCET (e(1), . . . , e(n))• Vector for deadlines (d (1), . . . , d (n))• Vector for minimum inter-release delays (p(1), . . . , p(n))

J1

J2

J3

J4

J5

;e(1) e(2)

t

6 p(1) 6 p(2)

d (1) d (2)

...

Martin Stigge Workload Models + Analysis 10

The Recurring Branching (RB) Task Model(Baruah, 1998)

• Introduces branching structures

• Tree for tasks• Vertices J: jobs to be released (with WCET and deadline)• Edges (Ji , Jj): minimum inter-release delays p(Ji , Jj)• General period parameter P

J1

J2

J3

J4

J5

J6

Period P = 57

Martin Stigge Workload Models + Analysis 11

The Recurring Branching (RB) Task Model(Baruah, 1998)

• Introduces branching structures

• Tree for tasks• Vertices J: jobs to be released (with WCET and deadline)• Edges (Ji , Jj): minimum inter-release delays p(Ji , Jj)• General period parameter P

J1

J2

J3

J4

J5

J6

Period P = 57

Martin Stigge Workload Models + Analysis 11

The Recurring Real-Time (RRT) Task Model(Baruah, 1998)

• Compact Branching representation

• Directed acyclic graph (DAG) for tasks• Vertices J: jobs to be released (with WCET and deadline)• Edges (Ji , Jj): minimum inter-release delays p(Ji , Jj)• General period parameter P

J1

J2

J3

J4

J5

Period P = 57

Martin Stigge Workload Models + Analysis 12

A Hierarchy of Models

Liu & Layland(e, d = p)

sporadic(e, d , p)

multiframe(ei , d = p)

generalized multiframe (GMF)(ei , di , pi )

recurring branching (RB)(tree, p)

recurring RT (RRT)(DAG, p)

non-cyclic GMF(order arbitrary)

non-cyclic RRT(DAG, pi )

efficient

Sch

edu

lab

ility

An

alys

is

difficult

low

Exp

ress

iven

ess

high

Martin Stigge Workload Models + Analysis 13

Restrictions of RRT

• Tasks are still recurrent

• Always revisit source J1

• No cycles allowed!

J1

J2

J3

J4

J5

J6

• Consequences:

• No local loops• Not compositional

(for modes etc.)

Martin Stigge Workload Models + Analysis 14

Restrictions of RRT

• Tasks are still recurrent

• Always revisit source J1

• No cycles allowed!

J1

J2

J3

J4

J5

J6

• Consequences:

• No local loops• Not compositional

(for modes etc.)

Martin Stigge Workload Models + Analysis 14

Restrictions of RRT

• Tasks are still recurrent

• Always revisit source J1

• No cycles allowed!

J1

J2

J3

J4

J5

J6

• Consequences:

• No local loops• Not compositional

(for modes etc.)

Martin Stigge Workload Models + Analysis 14

The Digraph Real-Time (DRT) Task Model(S. et al., 2011)

• Generalizes periodic, sporadic, GMF, RRT, . . .

• Directed graph for each task• Vertices v : jobs to be released (with WCET and deadline)• Edges (u, v): minimum inter-release delays p(u, v)

v1〈2, 5〉

v2

〈1, 8〉v3 〈3, 8〉

v4 〈5, 10〉

v5

〈1, 5〉

10

15

20

20

20

11

10

Martin Stigge Workload Models + Analysis 15

DRT: Semantics

v1〈2, 5〉

v2

〈1, 8〉v3 〈3, 8〉

v4 〈5, 10〉

v5

〈1, 5〉

10

15

20

20

20

11

10

Path π = (v4)Path π = (v4, v2)Path π = (v4, v2, v3)

0 10 20 28

20

35 43

15

5

10

1

8

3

8...

t

Martin Stigge Workload Models + Analysis 16

DRT: Semantics

v1〈2, 5〉

v2

〈1, 8〉v3 〈3, 8〉

v4 〈5, 10〉

v5

〈1, 5〉

10

15

20

20

20

11

10

Path π = (v4)

Path π = (v4, v2)Path π = (v4, v2, v3)

0 10

20 28

20

35 43

15

5

10

1

8

3

8...

t

Martin Stigge Workload Models + Analysis 16

DRT: Semantics

v1〈2, 5〉

v2

〈1, 8〉v3 〈3, 8〉

v4 〈5, 10〉

v5

〈1, 5〉

10

15

20

20

20

11

10

Path π = (v4)

Path π = (v4, v2)

Path π = (v4, v2, v3)

0 10 20 28

20

35 43

15

5

10

1

8

3

8...

t

Martin Stigge Workload Models + Analysis 16

DRT: Semantics

v1〈2, 5〉

v2

〈1, 8〉v3 〈3, 8〉

v4 〈5, 10〉

v5

〈1, 5〉

10

15

20

20

20

11

10

Path π = (v4)Path π = (v4, v2)

Path π = (v4, v2, v3)

0 10 20 28

20

35 43

15

5

10

1

8

3

8...

t

Martin Stigge Workload Models + Analysis 16

A Hierarchy of Models

Liu & Layland(e, d = p)

sporadic(e, d , p)

multiframe(ei , d = p)

generalized multiframe (GMF)(ei , di , pi )

recurring branching (RB)(tree, p)

recurring RT (RRT)(DAG, p)

non-cyclic GMF(order arbitrary)

non-cyclic RRT(DAG, pi )

Digraph (DRT)(arbitrary graph)

efficient

Sch

edu

lab

ility

An

alys

is

difficult

low

Exp

ress

iven

ess

high

Martin Stigge Workload Models + Analysis 17

A Hierarchy of Models

Liu & Layland(e, d = p)

sporadic(e, d , p)

multiframe(ei , d = p)

generalized multiframe (GMF)(ei , di , pi )

recurring branching (RB)(tree, p)

recurring RT (RRT)(DAG, p)

non-cyclic GMF(order arbitrary)

non-cyclic RRT(DAG, pi )

Digraph (DRT)(arbitrary graph)

efficient

Sch

edu

lab

ility

An

alys

is

difficult

low

Exp

ress

iven

ess

high

Strongly (co)NP-hard

Pseudo-Polynomial

Martin Stigge Workload Models + Analysis 17

Extended DRT (EDRT)

• Extends DRT with global delay constraints

• Directed graph for each task• Vertices v : jobs to be released (with WCET and deadline)• Edges (u, v): minimum inter-release delays p(u, v)• k global constraints (u, v , γ)

v1

v2

v3

v4

v5

52

23

72

2

9

6

Theorem (S. et al., 2011)

For k-EDRT task systems with bounded utilization, feasibility is

1 decidable in pseudo-polynomial time if k is constant, and

2 strongly coNP-hard in general.

Martin Stigge Workload Models + Analysis 18

Extended DRT (EDRT)

• Extends DRT with global delay constraints

• Directed graph for each task• Vertices v : jobs to be released (with WCET and deadline)• Edges (u, v): minimum inter-release delays p(u, v)• k global constraints (u, v , γ)

v1

v2

v3

v4

v5

52

23

72

2

9

6

Theorem (S. et al., 2011)

For k-EDRT task systems with bounded utilization, feasibility is

1 decidable in pseudo-polynomial time if k is constant, and

2 strongly coNP-hard in general.

Martin Stigge Workload Models + Analysis 18

A Hierarchy of Models

Liu & Layland(e, d = p)

sporadic(e, d , p)

multiframe(ei , d = p)

generalized multiframe (GMF)(ei , di , pi )

recurring branching (RB)(tree, p)

recurring RT (RRT)(DAG, p)

non-cyclic GMF(order arbitrary)

non-cyclic RRT(DAG, pi )

Digraph (DRT)(arbitrary graph)

k-EDRT(k constraints)

Extended DRT (EDRT)(constraints)

efficient

Sch

edu

lab

ility

An

alys

is

difficult

low

Exp

ress

iven

ess

high

Strongly (co)NP-hard

Pseudo-Polynomial

Martin Stigge Workload Models + Analysis 19

DRT Examples

v

〈e, d〉

p

Sporadic Task

v

〈e, p〉

p

Sporadic Task(implicit deadline)

u

〈e1, d1〉

v

〈e2, p2〉

p1 p2

p1

p2

Sporadic Taskwith 2 modes

v1

v2

v3

v4

v5

GMF Task

v1

v2

v3 v4

v5

Branching Task

Martin Stigge Workload Models + Analysis 20

DRT Examples

v

〈e, d〉

p

Sporadic Task

v

〈e, p〉

p

Sporadic Task(implicit deadline)

u

〈e1, d1〉

v

〈e2, p2〉

p1 p2

p1

p2

Sporadic Taskwith 2 modes

v1

v2

v3

v4

v5

GMF Task

v1

v2

v3 v4

v5

Branching Task

Martin Stigge Workload Models + Analysis 20

DRT Examples

v

〈e, d〉

p

Sporadic Task

v

〈e, p〉

p

Sporadic Task(implicit deadline)

u

〈e1, d1〉

v

〈e2, p2〉

p1 p2

p1

p2

Sporadic Taskwith 2 modes

v1

v2

v3

v4

v5

GMF Task

v1

v2

v3 v4

v5

Branching Task

Martin Stigge Workload Models + Analysis 20

DRT Examples

v

〈e, d〉

p

Sporadic Task

v

〈e, p〉

p

Sporadic Task(implicit deadline)

u

〈e1, d1〉

v

〈e2, p2〉

p1 p2

p1

p2

Sporadic Taskwith 2 modes

v1

v2

v3

v4

v5

GMF Task

v1

v2

v3 v4

v5

Branching Task

Martin Stigge Workload Models + Analysis 20

DRT Examples

v

〈e, d〉

p

Sporadic Task

v

〈e, p〉

p

Sporadic Task(implicit deadline)

u

〈e1, d1〉

v

〈e2, p2〉

p1 p2

p1

p2

Sporadic Taskwith 2 modes

v1

v2

v3

v4

v5

GMF Task

v1

v2

v3 v4

v5

Branching Task

Martin Stigge Workload Models + Analysis 20

Adaptive Variable-Rate (AVR) Tasks

• Rate-Adaptive Tasks (Buttazzo et al., DATE 2014)

• Variable Rate-dependent Behaviour (VRB) (Davis et al., RTAS 2014)

• Adaptive Variable-Rate (AVR) Tasks (Biondi et al., ECRTS 2014)

• . . .

(Biondi, ECRTS 2014)

Martin Stigge Workload Models + Analysis 21

AVR Tasks: Execution Modes

(Biondi, ECRTS 2014)

Martin Stigge Workload Models + Analysis 22

AVR Business

(This morning in Pisa)

Martin Stigge Workload Models + Analysis 23

Fahrplan

1 DRT Tasks in the Model HierarchyLiu and Layland and Sporadic TasksFrames and BranchingThe Digraph Real-Time (DRT) Task ModelAdaptive Variable-Rate (AVR) Tasks

2 Feasibility Analysis of DRTFeasibility TheoremDemand PairsTest TerminationEvaluation

3 Static Priority Schedulability Analysis of DRTResponse-Time AnalysisRequest FunctionsRefinement AlgorithmEvaluation

Martin Stigge Workload Models + Analysis 24

Fahrplan

1 DRT Tasks in the Model HierarchyLiu and Layland and Sporadic TasksFrames and BranchingThe Digraph Real-Time (DRT) Task ModelAdaptive Variable-Rate (AVR) Tasks

2 Feasibility Analysis of DRTFeasibility TheoremDemand PairsTest TerminationEvaluation

3 Static Priority Schedulability Analysis of DRTResponse-Time AnalysisRequest FunctionsRefinement AlgorithmEvaluation

Martin Stigge Workload Models + Analysis 24

Feasibility Theorem

Theorem

For a task set τ , the following three properties are equivalent.

1 Task set τ is feasible.

2 Task set τ is EDF schedulable.

3 The following condition holds: ∀t > 0 :∑

T∈τ dbfT (t) 6 t

What is dbfT (t)? How to compute it?

Martin Stigge Workload Models + Analysis 25

Feasibility Theorem

Theorem

For a task set τ , the following three properties are equivalent.

1 Task set τ is feasible.

2 Task set τ is EDF schedulable.

3 The following condition holds: ∀t > 0 :∑

T∈τ dbfT (t) 6 t

What is dbfT (t)? How to compute it?

Martin Stigge Workload Models + Analysis 25

Demand-Bound Functions

dbfT (t): Maximal demand in any window of size t

0 10 20 28 35 43

5 1 3...

t

43

Demand: 5 + 1 + 3 = 9

Martin Stigge Workload Models + Analysis 26

Feasibility Test

Theorem (Feasibility Theorem)

For a task set τ , the following three properties are equivalent.

1 Task set τ is feasible.

2 Task set τ is EDF schedulable.

3 The following condition holds: ∀t > 0 :∑

T∈τ dbfT (t) 6 t∑dbfT (t)

t

1 How to calculate dbfT (t)?

2 How to check existence of violating t?

Martin Stigge Workload Models + Analysis 27

Feasibility Test

Theorem (Feasibility Theorem)

For a task set τ , the following three properties are equivalent.

1 Task set τ is feasible.

2 Task set τ is EDF schedulable.

3 The following condition holds: ∀t > 0 :∑

T∈τ dbfT (t) 6 t∑dbfT (t)

t

t

1 How to calculate dbfT (t)?

2 How to check existence of violating t?

Martin Stigge Workload Models + Analysis 27

Feasibility Test

Theorem (Feasibility Theorem)

For a task set τ , the following three properties are equivalent.

1 Task set τ is feasible.

2 Task set τ is EDF schedulable.

3 The following condition holds: ∀t > 0 :∑

T∈τ dbfT (t) 6 t∑dbfT (t)

t

t

1 How to calculate dbfT (t)?

2 How to check existence of violating t?

Martin Stigge Workload Models + Analysis 27

Feasibility Test

Theorem (Feasibility Theorem)

For a task set τ , the following three properties are equivalent.

1 Task set τ is feasible.

2 Task set τ is EDF schedulable.

3 The following condition holds: ∀t > 0 :∑

T∈τ dbfT (t) 6 t∑dbfT (t)

t

t

1 How to calculate dbfT (t)?

2 How to check existence of violating t?

Martin Stigge Workload Models + Analysis 27

dbf for Sporadic Tasks

Sporadic task T = (e, d , p)∑dbfT (t)

te

d p

dbfT (t) = max

{0,

⌊t − d

p+ 1

⌋· e}

Martin Stigge Workload Models + Analysis 28

dbf for Sporadic Tasks

Sporadic task T = (e, d , p)∑dbfT (t)

te

d p

dbfT (t) = max

{0,

⌊t − d

p+ 1

⌋· e}

Martin Stigge Workload Models + Analysis 28

dbf for DRT: From G (T ) to dbfT

v1〈2, 5〉

v2

〈1, 8〉 v3 〈3, 8〉

v4 〈5, 10〉

v5

〈1, 5〉

10

15

20

20

20

11

10

Path Abstraction: Demand Pair

0 10 20 30 40 50 600369

12

dbfT (t)

t

〈9, 43〉

Martin Stigge Workload Models + Analysis 29

dbf for DRT: From G (T ) to dbfT

v1〈2, 5〉

v2

〈1, 8〉 v3 〈3, 8〉

v4 〈5, 10〉

v5

〈1, 5〉

10

15

20

20

20

11

10

Path Abstraction: Demand Pair

0 10 20 30 40 50 600369

12

dbfT (t)

t

〈9, 43〉

Martin Stigge Workload Models + Analysis 29

dbf for DRT: From G (T ) to dbfT

v1〈2, 5〉

v2

〈1, 8〉 v3 〈3, 8〉

v4 〈5, 10〉

v5

〈1, 5〉

10

15

20

20

20

11

10

Path Abstraction: Demand Pair

0 10 20 30 40 50 600369

12

dbfT (t)

t

〈9, 43〉

Martin Stigge Workload Models + Analysis 29

dbf for DRT: From G (T ) to dbfT

v1〈2, 5〉

v2

〈1, 8〉 v3 〈3, 8〉

v4 〈5, 10〉

v5

〈1, 5〉

10

15

20

20

20

11

10

Path Abstraction: Demand Pair

0 10 20 30 40 50 600369

12

dbfT (t)

t

〈9, 43〉

Martin Stigge Workload Models + Analysis 29

dbf for DRT: From G (T ) to dbfT

v1〈2, 5〉

v2

〈1, 8〉 v3 〈3, 8〉

v4 〈5, 10〉

v5

〈1, 5〉

10

15

20

20

20

11

10

Path Abstraction: Demand Pair

0 10 20 30 40 50 600369

12

dbfT (t)

t

〈9, 43〉

Martin Stigge Workload Models + Analysis 29

Demand Pairs

Formally:

• Given path π = (π0, . . . , πl)

• Execution demand: e(π) :=∑l

i=0 e(πi )

• Deadline: d(π) :=∑l−1

i=0 p(πi , πi+1) + d(πl)

• 〈e(π), d(π)〉 is a demand pair for π

dbfT (t) = max {e | 〈e, d〉 demand pair with d 6 t}

How to compute all demand pairs?

• Enumerate paths: Too expensive! (Exponential..)

• Better: Iteration using abstraction

Martin Stigge Workload Models + Analysis 30

Demand Pairs

Formally:

• Given path π = (π0, . . . , πl)

• Execution demand: e(π) :=∑l

i=0 e(πi )

• Deadline: d(π) :=∑l−1

i=0 p(πi , πi+1) + d(πl)

• 〈e(π), d(π)〉 is a demand pair for π

dbfT (t) = max {e | 〈e, d〉 demand pair with d 6 t}

How to compute all demand pairs?

• Enumerate paths: Too expensive! (Exponential..)

• Better: Iteration using abstraction

Martin Stigge Workload Models + Analysis 30

Demand Triples• Idea: Start with 0-paths (one vertex), extend stepwise• We need: Abstraction which

1 allows to extend paths,2 contains demand pair information,3 without visiting/storing all paths

• Idea: Demand triples• Execution demand e(π)• Deadline d(π)• Last vertex πl

• Demand triple 〈e(π), d(π), πl〉 is another abstraction!

v1〈2, 5〉

v2

〈1, 8〉v3 〈3, 8〉

v4 〈5, 10〉

v5

〈1, 5〉

10

15

20

20

20

11

10

Path (v4)

; 〈5, 10, v4〉

Path (v4, v2)

; 〈6, 28, v2〉

Path (v4, v2, v3)

; 〈9, 43, v3〉

Martin Stigge Workload Models + Analysis 31

Demand Triples• Idea: Start with 0-paths (one vertex), extend stepwise• We need: Abstraction which

1 allows to extend paths,2 contains demand pair information,3 without visiting/storing all paths

• Idea: Demand triples• Execution demand e(π)• Deadline d(π)• Last vertex πl

• Demand triple 〈e(π), d(π), πl〉 is another abstraction!

v1〈2, 5〉

v2

〈1, 8〉v3 〈3, 8〉

v4 〈5, 10〉

v5

〈1, 5〉

10

15

20

20

20

11

10

Path (v4)

; 〈5, 10, v4〉

Path (v4, v2)

; 〈6, 28, v2〉

Path (v4, v2, v3)

; 〈9, 43, v3〉

Martin Stigge Workload Models + Analysis 31

Demand Triples• Idea: Start with 0-paths (one vertex), extend stepwise• We need: Abstraction which

1 allows to extend paths,2 contains demand pair information,3 without visiting/storing all paths

• Idea: Demand triples• Execution demand e(π)• Deadline d(π)• Last vertex πl

• Demand triple 〈e(π), d(π), πl〉 is another abstraction!

v1〈2, 5〉

v2

〈1, 8〉v3 〈3, 8〉

v4 〈5, 10〉

v5

〈1, 5〉

10

15

20

20

20

11

10

Path (v4)

; 〈5, 10, v4〉

Path (v4, v2)

; 〈6, 28, v2〉

Path (v4, v2, v3)

; 〈9, 43, v3〉

Martin Stigge Workload Models + Analysis 31

Demand Triples• Idea: Start with 0-paths (one vertex), extend stepwise• We need: Abstraction which

1 allows to extend paths,2 contains demand pair information,3 without visiting/storing all paths

• Idea: Demand triples• Execution demand e(π)• Deadline d(π)• Last vertex πl

• Demand triple 〈e(π), d(π), πl〉 is another abstraction!

v1〈2, 5〉

v2

〈1, 8〉v3 〈3, 8〉

v4 〈5, 10〉

v5

〈1, 5〉

10

15

20

20

20

11

10

Path (v4)

; 〈5, 10, v4〉

Path (v4, v2)

; 〈6, 28, v2〉

Path (v4, v2, v3)

; 〈9, 43, v3〉

Martin Stigge Workload Models + Analysis 31

Iterative Procedure

• Create all demand triples up to some D:

1 Start with all 0-paths, i.e., 〈e(v), d(v), v〉 for all vertices v

2 Pick some stored demand triple 〈e, d , u〉3 Create new demand triple:

• Choose successor vertex v of u• e′ = e + e(v)• d ′ = d − d(u) + p(u, v) + d(v)• 〈e′, d ′, v〉 is new demand triple!

4 Store 〈e′, d ′, v〉 if• not stored yet, and• d ′ 6 D

5 Repeat from 2 until no change

• Efficient procedure!• Note: Actual paths never stored• Optimizations: Discard non-critical triples along the way

• Exercise: What’s dbfτi (26) for graph on previous slide?

Martin Stigge Workload Models + Analysis 32

Example

0 10 20 30 40 50 60 700

3

6

9

12

dbfT (t)

t

v1〈2, 5〉

v2

〈1, 8〉 v3 〈3, 8〉

v4 〈5, 10〉

v5

〈1, 5〉

10

15

20

20

20

11

10

D

Optimization: Discard dominated triples

(e, d , v) < (e ′, d ′, v) ⇐⇒ e > e ′ ∧ d 6 d ′

Martin Stigge Workload Models + Analysis 33

Example

0 10 20 30 40 50 60 700

3

6

9

12

dbfT (t)

t

v1〈2, 5〉

v2

〈1, 8〉 v3 〈3, 8〉

v4 〈5, 10〉

v5

〈1, 5〉

10

15

20

20

20

11

10

D

Optimization: Discard dominated triples

(e, d , v) < (e ′, d ′, v) ⇐⇒ e > e ′ ∧ d 6 d ′

Martin Stigge Workload Models + Analysis 33

Example

0 10 20 30 40 50 60 700

3

6

9

12

dbfT (t)

t

v1〈2, 5〉

v2

〈1, 8〉 v3 〈3, 8〉

v4 〈5, 10〉

v5

〈1, 5〉

10

15

20

20

20

11

10

D

Optimization: Discard dominated triples

(e, d , v) < (e ′, d ′, v) ⇐⇒ e > e ′ ∧ d 6 d ′

Martin Stigge Workload Models + Analysis 33

Example

0 10 20 30 40 50 60 700

3

6

9

12

dbfT (t)

t

v1〈2, 5〉

v2

〈1, 8〉 v3 〈3, 8〉

v4 〈5, 10〉

v5

〈1, 5〉

10

15

20

20

20

11

10

〈6, 30, v4〉〈6, 20, v4〉

D

Optimization: Discard dominated triples

(e, d , v) < (e ′, d ′, v) ⇐⇒ e > e ′ ∧ d 6 d ′

Martin Stigge Workload Models + Analysis 33

Example

0 10 20 30 40 50 60 700

3

6

9

12

dbfT (t)

t

v1〈2, 5〉

v2

〈1, 8〉 v3 〈3, 8〉

v4 〈5, 10〉

v5

〈1, 5〉

10

15

20

20

20

11

10

〈6, 30, v4〉〈6, 20, v4〉

D

Optimization: Discard dominated triples

(e, d , v) < (e ′, d ′, v) ⇐⇒ e > e ′ ∧ d 6 d ′

Martin Stigge Workload Models + Analysis 33

Example

0 10 20 30 40 50 60 700

3

6

9

12

dbfT (t)

t

v1〈2, 5〉

v2

〈1, 8〉 v3 〈3, 8〉

v4 〈5, 10〉

v5

〈1, 5〉

10

15

20

20

20

11

10

D

Optimization: Discard dominated triples

(e, d , v) < (e ′, d ′, v) ⇐⇒ e > e ′ ∧ d 6 d ′

Martin Stigge Workload Models + Analysis 33

Example

0 10 20 30 40 50 60 700

3

6

9

12

dbfT (t)

t

v1〈2, 5〉

v2

〈1, 8〉 v3 〈3, 8〉

v4 〈5, 10〉

v5

〈1, 5〉

10

15

20

20

20

11

10

D

Optimization: Discard dominated triples

(e, d , v) < (e ′, d ′, v) ⇐⇒ e > e ′ ∧ d 6 d ′

Martin Stigge Workload Models + Analysis 33

Example

0 10 20 30 40 50 60 700

3

6

9

12

dbfT (t)

t

v1〈2, 5〉

v2

〈1, 8〉 v3 〈3, 8〉

v4 〈5, 10〉

v5

〈1, 5〉

10

15

20

20

20

11

10

D

Optimization: Discard dominated triples

(e, d , v) < (e ′, d ′, v) ⇐⇒ e > e ′ ∧ d 6 d ′

Martin Stigge Workload Models + Analysis 33

Example

0 10 20 30 40 50 60 700

3

6

9

12

dbfT (t)

t

v1〈2, 5〉

v2

〈1, 8〉 v3 〈3, 8〉

v4 〈5, 10〉

v5

〈1, 5〉

10

15

20

20

20

11

10

D

Optimization: Discard dominated triples

(e, d , v) < (e ′, d ′, v) ⇐⇒ e > e ′ ∧ d 6 d ′

Martin Stigge Workload Models + Analysis 33

Example

0 10 20 30 40 50 60 700

3

6

9

12

dbfT (t)

t

v1〈2, 5〉

v2

〈1, 8〉 v3 〈3, 8〉

v4 〈5, 10〉

v5

〈1, 5〉

10

15

20

20

20

11

10

D

Optimization: Discard dominated triples

(e, d , v) < (e ′, d ′, v) ⇐⇒ e > e ′ ∧ d 6 d ′

Martin Stigge Workload Models + Analysis 33

Example

0 10 20 30 40 50 60 700

3

6

9

12

dbfT (t)

t

v1〈2, 5〉

v2

〈1, 8〉 v3 〈3, 8〉

v4 〈5, 10〉

v5

〈1, 5〉

10

15

20

20

20

11

10

D

Optimization: Discard dominated triples

(e, d , v) < (e ′, d ′, v) ⇐⇒ e > e ′ ∧ d 6 d ′

Martin Stigge Workload Models + Analysis 33

Example

0 10 20 30 40 50 60 700

3

6

9

12

dbfT (t)

t

v1〈2, 5〉

v2

〈1, 8〉 v3 〈3, 8〉

v4 〈5, 10〉

v5

〈1, 5〉

10

15

20

20

20

11

10

D

Optimization: Discard dominated triples

(e, d , v) < (e ′, d ′, v) ⇐⇒ e > e ′ ∧ d 6 d ′

Martin Stigge Workload Models + Analysis 33

Feasibility Test Revisited

Theorem (Feasibility Theorem)

For a task set τ , the following three properties are equivalent.

1 Task set τ is feasible.

2 Task set τ is EDF schedulable.

3 The following condition holds: ∀t > 0 :∑

T∈τ dbfT (t) 6 t∑dbfT (t)

t

t

1 How to calculate dbfT (t)?

2 How to check existence of violating t?

Martin Stigge Workload Models + Analysis 34

Feasibility Test Revisited

Theorem (Feasibility Theorem)

For a task set τ , the following three properties are equivalent.

1 Task set τ is feasible.

2 Task set τ is EDF schedulable.

3 The following condition holds: ∀t > 0 :∑

T∈τ dbfT (t) 6 t∑dbfT (t)

t

t

D

1 How to calculate dbfT (t)?

2 How to check existence of violating t?

Martin Stigge Workload Models + Analysis 34

Calculating the Bound

∑dbfT (t)

t

dbf(t)

t

D

Linear bou

nd for dbf(t)

• Linear bound for dbf(t)• Slope: Less than 1

• Intersection with t gives bound D

• Check only up to D

J1

J2

J3 J4

J5

J6

J7

J8

“Most dense” cycle

dbf(t) 6 t · U(τ) + esum

Martin Stigge Workload Models + Analysis 35

Calculating the Bound

∑dbfT (t)

t

dbf(t)

t

D

Linear bou

nd for dbf(t)

• Linear bound for dbf(t)• Slope: Less than 1

• Intersection with t gives bound D

• Check only up to D

J1

J2

J3 J4

J5

J6

J7

J8

“Most dense” cycle

dbf(t) 6 t · U(τ) + esum

Martin Stigge Workload Models + Analysis 35

Calculating the Bound

∑dbfT (t)

t

dbf(t)

t

D

Linear bou

nd for dbf(t)

• Linear bound for dbf(t)• Slope: Less than 1

• Intersection with t gives bound D

• Check only up to D

J1

J2

J3 J4

J5

J6

J7

J8

“Most dense” cycle

dbf(t) 6 t · U(τ) + esum

Martin Stigge Workload Models + Analysis 35

Complexity Result

Theorem (S. et al., 2011)

For DRT task systems τ with a utilization bounded by any c < 1,feasibility can be decided in pseudo-polynomial time.

Pseudo-polynomial time = Tractable/efficient

Martin Stigge Workload Models + Analysis 36

Evaluation: Runtime vs. Utilization

0% 20% 40% 60% 80% 100%Task Set Utilization

0.0

0.2

0.4

0.6

0.8

1.0

1.2

1.4

Ana

lysi

sR

un-T

ime

(sec

onds

)EDF

Setting:

• Randomly generated task sets

• 1-30 tasks, 5-10 vertices per task, branching degree 1-3, . . .

Martin Stigge Workload Models + Analysis 37

Fahrplan

1 DRT Tasks in the Model HierarchyLiu and Layland and Sporadic TasksFrames and BranchingThe Digraph Real-Time (DRT) Task ModelAdaptive Variable-Rate (AVR) Tasks

2 Feasibility Analysis of DRTFeasibility TheoremDemand PairsTest TerminationEvaluation

3 Static Priority Schedulability Analysis of DRTResponse-Time AnalysisRequest FunctionsRefinement AlgorithmEvaluation

Martin Stigge Workload Models + Analysis 38

Fahrplan

1 DRT Tasks in the Model HierarchyLiu and Layland and Sporadic TasksFrames and BranchingThe Digraph Real-Time (DRT) Task ModelAdaptive Variable-Rate (AVR) Tasks

2 Feasibility Analysis of DRTFeasibility TheoremDemand PairsTest TerminationEvaluation

3 Static Priority Schedulability Analysis of DRTResponse-Time AnalysisRequest FunctionsRefinement AlgorithmEvaluation

Martin Stigge Workload Models + Analysis 38

Complexity of Schedulability Tests

• Pseudo-polynomial schedulability tests possible?

EDF SP

L&L YesGMF YesDRT Yes

EDRT No

• ∗ = Takada & Sakamura, 1997

• Flawed!

• Replaced by:

Theorem (S. et al., 2012)

For GMF task systems, the schedulability problem for static priorityschedulers is strongly coNP-hard.

Martin Stigge Workload Models + Analysis 39

Complexity of Schedulability Tests

• Pseudo-polynomial schedulability tests possible?

EDF SP

L&L Yes YesGMF Yes Yes∗

DRT Yes ?EDRT No ?

• ∗ = Takada & Sakamura, 1997

• Flawed!

• Replaced by:

Theorem (S. et al., 2012)

For GMF task systems, the schedulability problem for static priorityschedulers is strongly coNP-hard.

Martin Stigge Workload Models + Analysis 39

Complexity of Schedulability Tests

• Pseudo-polynomial schedulability tests possible?

EDF SP

L&L Yes YesGMF Yes Yes∗No!DRT Yes No

EDRT No No

• ∗ = Takada & Sakamura, 1997

• Flawed!

• Replaced by:

Theorem (S. et al., 2012)

For GMF task systems, the schedulability problem for static priorityschedulers is strongly coNP-hard.

Martin Stigge Workload Models + Analysis 39

Hardness Result: Proof Sketch

3-PARTITION instance I :

m bins 3m items

Possible to (exactly) fit all items? (strongly NP-hard)

Reduction to GMF schedulability:

One GMF task

for each item

Packing possible ⇐⇒ Busy interval

t

Thus: τ(I ) unsched. ⇐⇒ I ∈ 3-PARTITION

Martin Stigge Workload Models + Analysis 40

Hardness Result: Proof Sketch

3-PARTITION instance I :

m bins 3m items

Possible to (exactly) fit all items? (strongly NP-hard)

Reduction to GMF schedulability:

One GMF task

for each item

Packing possible ⇐⇒ Busy interval

t

Thus: τ(I ) unsched. ⇐⇒ I ∈ 3-PARTITION

Martin Stigge Workload Models + Analysis 40

Model Hierarchy Revisited

coNP-hard

p.p.

L&L

sporadicMF

GMF

RB

RRT

ncGMF

ncRRT

DRT

k-EDRT

EDRT

EDF SP

coNP-hard

p.p.

L&L

sporadicMF

GMF

RB

RRT

ncGMF

ncRRT

DRT

k-EDRT

EDRT

Martin Stigge Workload Models + Analysis 41

Response-Time Analysis (RTA)

Use RTA for SP Schedulability Analysis.

Response time

Standard RTA for static priorities + periodic/sporadic tasks:

Rj = Cj +∑

i∈hp(j)

⌈Rj

Ti

⌉Ci

Martin Stigge Workload Models + Analysis 42

Problem: Path Combinations

v1

v2

v3

v4

v5

u1

u2

u3

Response time

v1

v2

v3

v4

v5

u1

u2

u3

Response time

Combinatorial Explosion!

Martin Stigge Workload Models + Analysis 43

Problem: Path Combinations

v1

v2

v3

v4

v5

u1

u2

u3

Response time

v1

v2

v3

v4

v5

u1

u2

u3

Response time

Combinatorial Explosion!

Martin Stigge Workload Models + Analysis 43

Intuition: No Task-Local Worst Cases

Task Thigh:v1〈2, 5〉 v2 〈6, 10〉

5

10

Which path is worse: (v1, v2) or (v2, v1)?

It depends! T1: u〈2, 7〉 versus T2: w〈4, 10〉

v1 v2

Thigh:

v2 v1

Thigh:

T1:

0 2 4 6 8 10 12

T1:

0 2 4 6 8 10 12

T2:

0 2 4 6 8 10 12

T2:

0 2 4 6 8 10 12

Martin Stigge Workload Models + Analysis 44

Intuition: No Task-Local Worst Cases

Task Thigh:v1〈2, 5〉 v2 〈6, 10〉

5

10

Which path is worse: (v1, v2) or (v2, v1)?

It depends! T1: u〈2, 7〉 versus T2: w〈4, 10〉

v1 v2

Thigh:

v2 v1

Thigh:

T1:

0 2 4 6 8 10 12

T1:

0 2 4 6 8 10 12

T2:

0 2 4 6 8 10 12

T2:

0 2 4 6 8 10 12

Martin Stigge Workload Models + Analysis 44

Intuition: No Task-Local Worst Cases

Task Thigh:v1〈2, 5〉 v2 〈6, 10〉

5

10

Which path is worse: (v1, v2) or (v2, v1)?

It depends! T1: u〈2, 7〉 versus T2: w〈4, 10〉

v1 v2

Thigh:

v2 v1

Thigh:

T1:

0 2 4 6 8 10 12

T1:

0 2 4 6 8 10 12

T2:

0 2 4 6 8 10 12

T2:

0 2 4 6 8 10 12

Martin Stigge Workload Models + Analysis 44

Intuition: No Task-Local Worst Cases

Task Thigh:v1〈2, 5〉 v2 〈6, 10〉

5

10

Which path is worse: (v1, v2) or (v2, v1)?

It depends! T1: u〈2, 7〉 versus T2: w〈4, 10〉

v1 v2

Thigh:

v2 v1

Thigh:

T1:

0 2 4 6 8 10 12

T1:

0 2 4 6 8 10 12

T2:

0 2 4 6 8 10 12

T2:

0 2 4 6 8 10 12

Martin Stigge Workload Models + Analysis 44

Request Functions

v1〈2, 5〉

v2

〈1, 8〉 v3 〈3, 8〉

v4 〈5, 10〉

v5

〈1, 5〉

10

15

20

20

20

11

10

rf (t)

t0 5 10 15 20 25 30 35 40

02468

10 rf (v4,v2,v3)

rf π(t) := max{e(π′) | π′ is prefix of π and p(π′) < t

}Martin Stigge Workload Models + Analysis 45

Request Functions (cont.)

Useful for deriving response time:

RSP(v , r̄f ) = min

{t > 0 | e(v) +

∑T ′>T

rf (T ′)(t) 6 t

}RSP(v) = max

r̄f ∈RF (τ)RSP(v , r̄f )

Combinatorial Explosion?!

Martin Stigge Workload Models + Analysis 46

Request Functions (cont.)

Useful for deriving response time:

RSP(v , r̄f ) = min

{t > 0 | e(v) +

∑T ′>T

rf (T ′)(t) 6 t

}RSP(v) = max

r̄f ∈RF (τ)RSP(v , r̄f )

Combinatorial Explosion?!

Martin Stigge Workload Models + Analysis 46

Abstract Request Functions

v1〈2, 5〉

v2

〈1, 8〉 v3 〈3, 8〉

v4 〈5, 10〉

v5

〈1, 5〉

10

15

20

20

20

11

10

rf (t)

t0 5 10 15 20 25 30 35 40

02468

10 rf (v4,v2,v3)

rf (v5,v4,v2)

arf

Martin Stigge Workload Models + Analysis 47

Abstract Request Functions

v1〈2, 5〉

v2

〈1, 8〉 v3 〈3, 8〉

v4 〈5, 10〉

v5

〈1, 5〉

10

15

20

20

20

11

10

rf (t)

t0 5 10 15 20 25 30 35 40

02468

10 rf (v4,v2,v3)

rf (v5,v4,v2)

arf

Martin Stigge Workload Models + Analysis 47

Abstract Request Functions

v1〈2, 5〉

v2

〈1, 8〉 v3 〈3, 8〉

v4 〈5, 10〉

v5

〈1, 5〉

10

15

20

20

20

11

10

rf (t)

t0 5 10 15 20 25 30 35 40

02468

10 rf (v4,v2,v3)

rf (v5,v4,v2)

arf

Martin Stigge Workload Models + Analysis 47

Abstraction Tree

rf 1 rf 2

rf 3 rf 4

rf 5

Define an abstraction tree per task:

• Leaves are concrete rf

• Each node: maximum function of child nodes

• Root is maximum of all rf

Allows stepwise refinement!

Martin Stigge Workload Models + Analysis 48

Abstraction Tree

rf 1 rf 2

rf 3 rf 4

rf 5

Define an abstraction tree per task:

• Leaves are concrete rf

• Each node: maximum function of child nodes

• Root is maximum of all rf

Allows stepwise refinement!

Martin Stigge Workload Models + Analysis 48

Abstraction Tree

rf 1 rf 2

rf 3 rf 4

rf 5

Define an abstraction tree per task:

• Leaves are concrete rf

• Each node: maximum function of child nodes

• Root is maximum of all rf

Allows stepwise refinement!

Martin Stigge Workload Models + Analysis 48

Abstraction Tree

rf 1 rf 2

rf 3 rf 4

rf 5

Define an abstraction tree per task:

• Leaves are concrete rf

• Each node: maximum function of child nodes

• Root is maximum of all rf

Allows stepwise refinement!

Martin Stigge Workload Models + Analysis 48

Abstraction Tree

rf 1 rf 2

rf 3 rf 4

rf 5

Define an abstraction tree per task:

• Leaves are concrete rf

• Each node: maximum function of child nodes

• Root is maximum of all rf

Allows stepwise refinement!

Martin Stigge Workload Models + Analysis 48

Abstraction Tree

rf 1 rf 2

rf 3 rf 4

rf 5

Define an abstraction tree per task:

• Leaves are concrete rf

• Each node: maximum function of child nodes

• Root is maximum of all rf

Allows stepwise refinement!

Martin Stigge Workload Models + Analysis 48

Refinement Algorithm

r̄f = (rf (T1), rf (T2), rf (T3))Tuple:

RSP(v , r̄f ) = 23Response time:

r̄f 1 = (rf (T1), rf (T2), rf (T3))

r̄f 2 = (rf ′(T1), rf (T2), rf (T3))

r̄f 3 = (rf ′′(T1), rf (T2), rf (T3))

Step:

→ 18

→ 21

r̄f 2 = (rf (T1), rf (T2), rf (T3))

r̄f 4 = (rf (T1), rf ′(T2), rf (T3))

r̄f 5 = (rf (T1), rf ′′(T2), rf (T3))

→ 20

→ 17

Initialization:• Most abstract functions

Each iteration:

• Replace functions along abstraction trees

Termination:

• All functions are concreteOR:

• Estimate is already safeIn T1:

rf ′ rf ′′

rfIn T2:

rf ′ rf ′′

rf

Store

(23, r̄f 1)

(21, r̄f 2)

(18, r̄f 3)

(21, r̄f 2)

(18, r̄f 3)

(21, r̄f 2)

(20, r̄f 4)

(18, r̄f 3)

(17, r̄f 5)

(20, r̄f 4)

(18, r̄f 3)

(17, r̄f 5)

...

Using: RSP(v , r̄f ) = min{t > 0 | e(v) +

∑T ′>T rf (T ′)(t) 6 t

}

Martin Stigge Workload Models + Analysis 49

Refinement Algorithm

r̄f = (rf (T1), rf (T2), rf (T3))Tuple:

RSP(v , r̄f ) = 23Response time:

r̄f 1 = (rf (T1), rf (T2), rf (T3))

r̄f 2 = (rf ′(T1), rf (T2), rf (T3))

r̄f 3 = (rf ′′(T1), rf (T2), rf (T3))

Step:

→ 18

→ 21

r̄f 2 = (rf (T1), rf (T2), rf (T3))

r̄f 4 = (rf (T1), rf ′(T2), rf (T3))

r̄f 5 = (rf (T1), rf ′′(T2), rf (T3))

→ 20

→ 17

Initialization:• Most abstract functions

Each iteration:

• Replace functions along abstraction trees

Termination:

• All functions are concreteOR:

• Estimate is already safeIn T1:

rf ′ rf ′′

rfIn T2:

rf ′ rf ′′

rf

Store

(23, r̄f 1)

(21, r̄f 2)

(18, r̄f 3)

(21, r̄f 2)

(18, r̄f 3)

(21, r̄f 2)

(20, r̄f 4)

(18, r̄f 3)

(17, r̄f 5)

(20, r̄f 4)

(18, r̄f 3)

(17, r̄f 5)

...

Using: RSP(v , r̄f ) = min{t > 0 | e(v) +

∑T ′>T rf (T ′)(t) 6 t

}

Martin Stigge Workload Models + Analysis 49

Refinement Algorithm

r̄f = (rf (T1), rf (T2), rf (T3))Tuple:

RSP(v , r̄f ) = 23Response time:

r̄f 1 = (rf (T1), rf (T2), rf (T3))

r̄f 2 = (rf ′(T1), rf (T2), rf (T3))

r̄f 3 = (rf ′′(T1), rf (T2), rf (T3))

Step:

→ 18

→ 21

r̄f 2 = (rf (T1), rf (T2), rf (T3))

r̄f 4 = (rf (T1), rf ′(T2), rf (T3))

r̄f 5 = (rf (T1), rf ′′(T2), rf (T3))

→ 20

→ 17

Initialization:• Most abstract functions

Each iteration:

• Replace functions along abstraction trees

Termination:

• All functions are concreteOR:

• Estimate is already safeIn T1:

rf ′ rf ′′

rfIn T2:

rf ′ rf ′′

rf

Store

(23, r̄f 1)

(21, r̄f 2)

(18, r̄f 3)

(21, r̄f 2)

(18, r̄f 3)

(21, r̄f 2)

(20, r̄f 4)

(18, r̄f 3)

(17, r̄f 5)

(20, r̄f 4)

(18, r̄f 3)

(17, r̄f 5)

...

Using: RSP(v , r̄f ) = min{t > 0 | e(v) +

∑T ′>T rf (T ′)(t) 6 t

}

Martin Stigge Workload Models + Analysis 49

Refinement Algorithm

r̄f = (rf (T1), rf (T2), rf (T3))Tuple:

RSP(v , r̄f ) = 23Response time:

r̄f 1 = (rf (T1), rf (T2), rf (T3))

r̄f 2 = (rf ′(T1), rf (T2), rf (T3))

r̄f 3 = (rf ′′(T1), rf (T2), rf (T3))

Step:

→ 18

→ 21

r̄f 2 = (rf (T1), rf (T2), rf (T3))

r̄f 4 = (rf (T1), rf ′(T2), rf (T3))

r̄f 5 = (rf (T1), rf ′′(T2), rf (T3))

→ 20

→ 17

Initialization:• Most abstract functions

Each iteration:

• Replace functions along abstraction trees

Termination:

• All functions are concreteOR:

• Estimate is already safe

In T1:

rf ′ rf ′′

rf

In T2:

rf ′ rf ′′

rf

Store

(23, r̄f 1)

(21, r̄f 2)

(18, r̄f 3)

(21, r̄f 2)

(18, r̄f 3)

(21, r̄f 2)

(20, r̄f 4)

(18, r̄f 3)

(17, r̄f 5)

(20, r̄f 4)

(18, r̄f 3)

(17, r̄f 5)

...

Using: RSP(v , r̄f ) = min{t > 0 | e(v) +

∑T ′>T rf (T ′)(t) 6 t

}

Martin Stigge Workload Models + Analysis 49

Refinement Algorithm

r̄f = (rf (T1), rf (T2), rf (T3))Tuple:

RSP(v , r̄f ) = 23Response time:

r̄f 1 = (rf (T1), rf (T2), rf (T3))

r̄f 2 = (rf ′(T1), rf (T2), rf (T3))

r̄f 3 = (rf ′′(T1), rf (T2), rf (T3))

Step:

→ 18

→ 21

r̄f 2 = (rf (T1), rf (T2), rf (T3))

r̄f 4 = (rf (T1), rf ′(T2), rf (T3))

r̄f 5 = (rf (T1), rf ′′(T2), rf (T3))

→ 20

→ 17

Initialization:• Most abstract functions

Each iteration:

• Replace functions along abstraction trees

Termination:

• All functions are concreteOR:

• Estimate is already safe

In T1:

rf ′ rf ′′

rf

In T2:

rf ′ rf ′′

rf

Store

(23, r̄f 1)

(21, r̄f 2)

(18, r̄f 3)

(21, r̄f 2)

(18, r̄f 3)

(21, r̄f 2)

(20, r̄f 4)

(18, r̄f 3)

(17, r̄f 5)

(20, r̄f 4)

(18, r̄f 3)

(17, r̄f 5)

...

Using: RSP(v , r̄f ) = min{t > 0 | e(v) +

∑T ′>T rf (T ′)(t) 6 t

}

Martin Stigge Workload Models + Analysis 49

Refinement Algorithm

r̄f = (rf (T1), rf (T2), rf (T3))Tuple:

RSP(v , r̄f ) = 23Response time:

r̄f 1 = (rf (T1), rf (T2), rf (T3))

r̄f 2 = (rf ′(T1), rf (T2), rf (T3))

r̄f 3 = (rf ′′(T1), rf (T2), rf (T3))

Step:

→ 18

→ 21

r̄f 2 = (rf (T1), rf (T2), rf (T3))

r̄f 4 = (rf (T1), rf ′(T2), rf (T3))

r̄f 5 = (rf (T1), rf ′′(T2), rf (T3))

→ 20

→ 17

Initialization:• Most abstract functions

Each iteration:

• Replace functions along abstraction trees

Termination:

• All functions are concreteOR:

• Estimate is already safe

In T1:

rf ′ rf ′′

rf

In T2:

rf ′ rf ′′

rf

Store

(23, r̄f 1)

(21, r̄f 2)

(18, r̄f 3)

(21, r̄f 2)

(18, r̄f 3)

(21, r̄f 2)

(20, r̄f 4)

(18, r̄f 3)

(17, r̄f 5)

(20, r̄f 4)

(18, r̄f 3)

(17, r̄f 5)

...

Using: RSP(v , r̄f ) = min{t > 0 | e(v) +

∑T ′>T rf (T ′)(t) 6 t

}

Martin Stigge Workload Models + Analysis 49

Refinement Algorithm

r̄f = (rf (T1), rf (T2), rf (T3))Tuple:

RSP(v , r̄f ) = 23Response time:

r̄f 1 = (rf (T1), rf (T2), rf (T3))

r̄f 2 = (rf ′(T1), rf (T2), rf (T3))

r̄f 3 = (rf ′′(T1), rf (T2), rf (T3))

Step:

→ 18

→ 21

r̄f 2 = (rf (T1), rf (T2), rf (T3))

r̄f 4 = (rf (T1), rf ′(T2), rf (T3))

r̄f 5 = (rf (T1), rf ′′(T2), rf (T3))

→ 20

→ 17

Initialization:• Most abstract functions

Each iteration:

• Replace functions along abstraction trees

Termination:

• All functions are concreteOR:

• Estimate is already safeIn T1:

rf ′ rf ′′

rfIn T2:

rf ′ rf ′′

rf

Store

(23, r̄f 1)

(21, r̄f 2)

(18, r̄f 3)

(21, r̄f 2)

(18, r̄f 3)

(21, r̄f 2)

(20, r̄f 4)

(18, r̄f 3)

(17, r̄f 5)

(20, r̄f 4)

(18, r̄f 3)

(17, r̄f 5)

...

Using: RSP(v , r̄f ) = min{t > 0 | e(v) +

∑T ′>T rf (T ′)(t) 6 t

}

Martin Stigge Workload Models + Analysis 49

Refinement Algorithm

r̄f = (rf (T1), rf (T2), rf (T3))Tuple:

RSP(v , r̄f ) = 23Response time:

r̄f 1 = (rf (T1), rf (T2), rf (T3))

r̄f 2 = (rf ′(T1), rf (T2), rf (T3))

r̄f 3 = (rf ′′(T1), rf (T2), rf (T3))

Step:

→ 18

→ 21

r̄f 2 = (rf (T1), rf (T2), rf (T3))

r̄f 4 = (rf (T1), rf ′(T2), rf (T3))

r̄f 5 = (rf (T1), rf ′′(T2), rf (T3))

→ 20

→ 17

Initialization:• Most abstract functions

Each iteration:

• Replace functions along abstraction trees

Termination:

• All functions are concreteOR:

• Estimate is already safeIn T1:

rf ′ rf ′′

rfIn T2:

rf ′ rf ′′

rf

Store

(23, r̄f 1)

(21, r̄f 2)

(18, r̄f 3)

(21, r̄f 2)

(18, r̄f 3)

(21, r̄f 2)

(20, r̄f 4)

(18, r̄f 3)

(17, r̄f 5)

(20, r̄f 4)

(18, r̄f 3)

(17, r̄f 5)

...

Using: RSP(v , r̄f ) = min{t > 0 | e(v) +

∑T ′>T rf (T ′)(t) 6 t

}

Martin Stigge Workload Models + Analysis 49

Refinement Algorithm

r̄f = (rf (T1), rf (T2), rf (T3))Tuple:

RSP(v , r̄f ) = 23Response time:

r̄f 1 = (rf (T1), rf (T2), rf (T3))

r̄f 2 = (rf ′(T1), rf (T2), rf (T3))

r̄f 3 = (rf ′′(T1), rf (T2), rf (T3))

Step:

→ 18

→ 21

r̄f 2 = (rf (T1), rf (T2), rf (T3))

r̄f 4 = (rf (T1), rf ′(T2), rf (T3))

r̄f 5 = (rf (T1), rf ′′(T2), rf (T3))

→ 20

→ 17

Initialization:• Most abstract functions

Each iteration:

• Replace functions along abstraction trees

Termination:

• All functions are concreteOR:

• Estimate is already safeIn T1:

rf ′ rf ′′

rf

In T2:

rf ′ rf ′′

rf

Store

(23, r̄f 1)

(21, r̄f 2)

(18, r̄f 3)

(21, r̄f 2)

(18, r̄f 3)

(21, r̄f 2)

(20, r̄f 4)

(18, r̄f 3)

(17, r̄f 5)

(20, r̄f 4)

(18, r̄f 3)

(17, r̄f 5)

...

Using: RSP(v , r̄f ) = min{t > 0 | e(v) +

∑T ′>T rf (T ′)(t) 6 t

}

Martin Stigge Workload Models + Analysis 49

Refinement Algorithm

r̄f = (rf (T1), rf (T2), rf (T3))Tuple:

RSP(v , r̄f ) = 23Response time:

r̄f 1 = (rf (T1), rf (T2), rf (T3))

r̄f 2 = (rf ′(T1), rf (T2), rf (T3))

r̄f 3 = (rf ′′(T1), rf (T2), rf (T3))

Step:

→ 18

→ 21

r̄f 2 = (rf (T1), rf (T2), rf (T3))

r̄f 4 = (rf (T1), rf ′(T2), rf (T3))

r̄f 5 = (rf (T1), rf ′′(T2), rf (T3))

→ 20

→ 17

Initialization:• Most abstract functions

Each iteration:

• Replace functions along abstraction trees

Termination:

• All functions are concreteOR:

• Estimate is already safeIn T1:

rf ′ rf ′′

rf

In T2:

rf ′ rf ′′

rf

Store

(23, r̄f 1)

(21, r̄f 2)

(18, r̄f 3)

(21, r̄f 2)

(18, r̄f 3)

(21, r̄f 2)

(20, r̄f 4)

(18, r̄f 3)

(17, r̄f 5)

(20, r̄f 4)

(18, r̄f 3)

(17, r̄f 5)

...

Using: RSP(v , r̄f ) = min{t > 0 | e(v) +

∑T ′>T rf (T ′)(t) 6 t

}

Martin Stigge Workload Models + Analysis 49

Refinement Algorithm

r̄f = (rf (T1), rf (T2), rf (T3))Tuple:

RSP(v , r̄f ) = 23Response time:

r̄f 1 = (rf (T1), rf (T2), rf (T3))

r̄f 2 = (rf ′(T1), rf (T2), rf (T3))

r̄f 3 = (rf ′′(T1), rf (T2), rf (T3))

Step:

→ 18

→ 21

r̄f 2 = (rf (T1), rf (T2), rf (T3))

r̄f 4 = (rf (T1), rf ′(T2), rf (T3))

r̄f 5 = (rf (T1), rf ′′(T2), rf (T3))

→ 20

→ 17

Initialization:• Most abstract functions

Each iteration:

• Replace functions along abstraction trees

Termination:

• All functions are concreteOR:

• Estimate is already safeIn T1:

rf ′ rf ′′

rf

In T2:

rf ′ rf ′′

rf

Store

(23, r̄f 1)

(21, r̄f 2)

(18, r̄f 3)

(21, r̄f 2)

(18, r̄f 3)

(21, r̄f 2)

(20, r̄f 4)

(18, r̄f 3)

(17, r̄f 5)

(20, r̄f 4)

(18, r̄f 3)

(17, r̄f 5)

...

Using: RSP(v , r̄f ) = min{t > 0 | e(v) +

∑T ′>T rf (T ′)(t) 6 t

}

Martin Stigge Workload Models + Analysis 49

Refinement Algorithm

r̄f = (rf (T1), rf (T2), rf (T3))Tuple:

RSP(v , r̄f ) = 23Response time:

r̄f 1 = (rf (T1), rf (T2), rf (T3))

r̄f 2 = (rf ′(T1), rf (T2), rf (T3))

r̄f 3 = (rf ′′(T1), rf (T2), rf (T3))

Step:

→ 18

→ 21

r̄f 2 = (rf (T1), rf (T2), rf (T3))

r̄f 4 = (rf (T1), rf ′(T2), rf (T3))

r̄f 5 = (rf (T1), rf ′′(T2), rf (T3))

→ 20

→ 17

Initialization:• Most abstract functions

Each iteration:

• Replace functions along abstraction trees

Termination:

• All functions are concreteOR:

• Estimate is already safeIn T1:

rf ′ rf ′′

rfIn T2:

rf ′ rf ′′

rf

Store

(23, r̄f 1)

(21, r̄f 2)

(18, r̄f 3)

(21, r̄f 2)

(18, r̄f 3)

(21, r̄f 2)

(20, r̄f 4)

(18, r̄f 3)

(17, r̄f 5)

(20, r̄f 4)

(18, r̄f 3)

(17, r̄f 5)

...

Using: RSP(v , r̄f ) = min{t > 0 | e(v) +

∑T ′>T rf (T ′)(t) 6 t

}

Martin Stigge Workload Models + Analysis 49

Refinement Algorithm

r̄f = (rf (T1), rf (T2), rf (T3))Tuple:

RSP(v , r̄f ) = 23Response time:

r̄f 1 = (rf (T1), rf (T2), rf (T3))

r̄f 2 = (rf ′(T1), rf (T2), rf (T3))

r̄f 3 = (rf ′′(T1), rf (T2), rf (T3))

Step:

→ 18

→ 21

r̄f 2 = (rf (T1), rf (T2), rf (T3))

r̄f 4 = (rf (T1), rf ′(T2), rf (T3))

r̄f 5 = (rf (T1), rf ′′(T2), rf (T3))

→ 20

→ 17

Initialization:• Most abstract functions

Each iteration:

• Replace functions along abstraction trees

Termination:

• All functions are concreteOR:

• Estimate is already safe

In T1:

rf ′ rf ′′

rfIn T2:

rf ′ rf ′′

rf

Store

(23, r̄f 1)

(21, r̄f 2)

(18, r̄f 3)

(21, r̄f 2)

(18, r̄f 3)

(21, r̄f 2)

(20, r̄f 4)

(18, r̄f 3)

(17, r̄f 5)

(20, r̄f 4)

(18, r̄f 3)

(17, r̄f 5)

...

Using: RSP(v , r̄f ) = min{t > 0 | e(v) +

∑T ′>T rf (T ′)(t) 6 t

}

Martin Stigge Workload Models + Analysis 49

Refinement Algorithm

r̄f = (rf (T1), rf (T2), rf (T3))Tuple:

RSP(v , r̄f ) = 23Response time:

r̄f 1 = (rf (T1), rf (T2), rf (T3))

r̄f 2 = (rf ′(T1), rf (T2), rf (T3))

r̄f 3 = (rf ′′(T1), rf (T2), rf (T3))

Step:

→ 18

→ 21

r̄f 2 = (rf (T1), rf (T2), rf (T3))

r̄f 4 = (rf (T1), rf ′(T2), rf (T3))

r̄f 5 = (rf (T1), rf ′′(T2), rf (T3))

→ 20

→ 17

Initialization:• Most abstract functions

Each iteration:

• Replace functions along abstraction trees

Termination:

• All functions are concreteOR:

• Estimate is already safe

In T1:

rf ′ rf ′′

rfIn T2:

rf ′ rf ′′

rf

Store

(23, r̄f 1)

(21, r̄f 2)

(18, r̄f 3)

(21, r̄f 2)

(18, r̄f 3)

(21, r̄f 2)

(20, r̄f 4)

(18, r̄f 3)

(17, r̄f 5)

(20, r̄f 4)

(18, r̄f 3)

(17, r̄f 5)

...

Using: RSP(v , r̄f ) = min{t > 0 | e(v) +

∑T ′>T rf (T ′)(t) 6 t

}

Martin Stigge Workload Models + Analysis 49

Evaluation: Run-time Scaling

0% 20% 40% 60% 80% 100%Task Set Utilization

0.0

0.2

0.4

0.6

0.8

1.0

1.2

1.4A

naly

sis

Run

-Tim

e(s

econ

ds)

EDFSP

1-30 tasks with 5-10 vertices each, branching degree 1-3

Martin Stigge Workload Models + Analysis 50

Evaluation: Precision Improvement

0% 20% 40% 60% 80% 100%Fraction of improved RT estimates

5%

10%

15%

20%A

vera

geim

prov

emen

t Type AType B

Type A: lower parameter varianceType B: higher parameter variance

Martin Stigge Workload Models + Analysis 51

Generality

• Exact solution for NP-hard problem• Efficient method• Iterative refinement

• General!• Apply to any combinatorial problem• ... with monotonic abstraction lattice

rf 1 rf 2 rf 5

rf 3 rf 4

Martin Stigge Workload Models + Analysis 52

Fahrplan

1 DRT Tasks in the Model HierarchyLiu and Layland and Sporadic TasksFrames and BranchingThe Digraph Real-Time (DRT) Task ModelAdaptive Variable-Rate (AVR) Tasks

2 Feasibility Analysis of DRTFeasibility TheoremDemand PairsTest TerminationEvaluation

3 Static Priority Schedulability Analysis of DRTResponse-Time AnalysisRequest FunctionsRefinement AlgorithmEvaluation

Martin Stigge Workload Models + Analysis 53

Summary

coNP-hard

p.p.

L&L

sporadicMF

GMF

RB

RRT

ncGMF

ncRRT

EDF SP

coNP-hard

p.p.

L&L

sporadicMF

GMF

RB

RRT

ncGMF

ncRRT

DRT

k-EDRT

EDRT

Martin Stigge Workload Models + Analysis 54

Summary

coNP-hard

p.p.

L&L

sporadicMF

GMF

RB

RRT

ncGMF

ncRRT

DRT

k-EDRT

EDRT

EDF SP

coNP-hard

p.p.

L&L

sporadicMF

GMF

RB

RRT

ncGMF

ncRRT

DRT

k-EDRT

EDRT

Martin Stigge Workload Models + Analysis 54

Summary

coNP-hard

p.p.

L&L

sporadicMF

GMF

RB

RRT

ncGMF

ncRRT

DRT

k-EDRT

EDRT

EDF

SP

coNP-hard

p.p.

L&L

sporadicMF

GMF

RB

RRT

ncGMF

ncRRT

DRT

k-EDRT

EDRT

Martin Stigge Workload Models + Analysis 54

Summary

coNP-hard

p.p.

L&L

sporadicMF

GMF

RB

RRT

ncGMF

ncRRT

DRT

k-EDRT

EDRT

EDF SP

coNP-hard

p.p.

L&L

sporadicMF

GMF

RB

RRT

ncGMF

ncRRT

DRT

k-EDRT

EDRT

Martin Stigge Workload Models + Analysis 54

Summary

coNP-hard

p.p.

L&L

sporadicMF

GMF

RB

RRT

ncGMF

ncRRT

DRT

k-EDRT

EDRT

EDF SP

coNP-hard

p.p.

L&L

sporadicMF

GMF

RB

RRT

ncGMF

ncRRT

DRT

k-EDRT

EDRT

Martin Stigge Workload Models + Analysis 54

Q & A

Thanks!

Martin Stigge Workload Models + Analysis 55

Backup Slides Coming Up . . .

Martin Stigge Workload Models + Analysis 56

Path Abstractions: SP + EDF

Martin Stigge Workload Models + Analysis 57

Path Abstractions: Static Priorities

v1〈2, 5〉

v2

〈1, 8〉 v3 〈3, 8〉

v4 〈5, 10〉

v5

〈1, 5〉

10

15

20

20

20

11

10

rf (t)

t0 5 10 15 20 25 30 35 40

02468

10 rf (v4,v2,v3)

rf π(t) := max{e(π′) | π′ is prefix of π and p(π′) < t

}Martin Stigge Workload Models + Analysis 58

Path Abstractions: EDF

T2

v

t ′

T1

v

t

wf π(t, t ′) := max{e(π′) | π′ is prefix of π,

p(π′) < t and d(π′) 6 t ′}.

Martin Stigge Workload Models + Analysis 59

Path Abstractions: EDF

T2

v

t ′

T1

v

t

wf π(t, t ′) := max{e(π′) | π′ is prefix of π,

p(π′) < t and d(π′) 6 t ′}.

Martin Stigge Workload Models + Analysis 59

Recommended