Real-Time Workload Models with Efficient Analysis Advanced Course, 3 Lectures, September 2014 Martin Stigge Uppsala University, Sweden
Fahrplan 1 DRT Tasks in the Model Hierarchy Liu and Layland and Sporadic Tasks Frames and Branching The Digraph Real-Time (DRT) Task Model Adaptive Variable-Rate (AVR) Tasks 2 Feasibility Analysis of DRT Feasibility Theorem Demand Pairs Test Termination Evaluation 3 Static Priority Schedulability Analysis of DRT Response-Time Analysis Request Functions Refinement Algorithm Evaluation Martin Stigge Workload Models + Analysis 2
Fahrplan 1 DRT Tasks in the Model Hierarchy Liu and Layland and Sporadic Tasks Frames and Branching The Digraph Real-Time (DRT) Task Model Adaptive Variable-Rate (AVR) Tasks 2 Feasibility Analysis of DRT Feasibility Theorem Demand Pairs Test Termination Evaluation 3 Static Priority Schedulability Analysis of DRT Response-Time Analysis Request Functions Refinement Algorithm Evaluation Martin Stigge Workload Models + Analysis 2
Problem Overview Workload Model Scheduler Model Task A Task B EDF/Static Prio/... Task C Task A Task B t t Feasible? Schedulable? Response times? 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 p e p... t Advantages: Well-known model; efficient schedulability tests Disadvantage: Very limited expressiveness Martin Stigge Workload Models + Analysis 4
A Hierarchy of Models difficult high Schedulability Analysis Expressiveness efficient Liu & Layland (e, d = p) low Martin Stigge Workload Models + Analysis 5
The Sporadic Task Model (Mok, 1983) Deadlines periods; releases sporadic Each tasks defined by: Job WCET e Relative deadline d Minimum inter-release delay p (e, d, p) e d p e d p... t 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 Task is split into frames, each with own Execution time e (j) Inter-release separation p (j) Deadline d (j) for the job t 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 Task is split into frames, each with own Execution time e (j) Inter-release separation p (j) Deadline d (j) for the job t 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) ) p (2) J 3 J 2 p (1) p (3) J 1 J 4 J 5 p (5) p (4) d (1) d (2) e (1) e (2)... t p (1) p (2) Martin Stigge Workload Models + Analysis 8
A Hierarchy of Models difficult high Schedulability Analysis generalized multiframe (GMF) (e i, d i, p i ) Expressiveness efficient multiframe (e i, d = p) Liu & Layland (e, d = p) sporadic (e, d, p) low Martin Stigge Workload Models + Analysis 9
The Non-Cyclic GMF Task Model (Moyo et al., 20) 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) ) J 2 J 3 J 1 J 4 J 5 d (1) d (2) e (1) e (2)... t p (1) p (2) Martin Stigge Workload Models + Analysis
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 (J i, J j ): minimum inter-release delays p(j i, J j ) General period parameter P J 3 J 5 J 1 J 6 Period P = 57 J 2 J 4 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 (J i, J j ): minimum inter-release delays p(j i, J j ) General period parameter P J 3 J 5 J 1 J 6 Period P = 57 J 2 J 4 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 (J i, J j ): minimum inter-release delays p(j i, J j ) General period parameter P J 3 J 5 J 1 Period P = 57 J 2 J 4 Martin Stigge Workload Models + Analysis 12
A Hierarchy of Models difficult high Schedulability Analysis efficient recurring RT (RRT) (DAG, p) recurring branching (RB) (tree, p) generalized multiframe (GMF) (e i, d i, p i ) multiframe (e i, d = p) Liu & Layland (e, d = p) non-cyclic RRT (DAG, p i ) non-cyclic GMF (order arbitrary) sporadic (e, d, p) Expressiveness low Martin Stigge Workload Models + Analysis 13
Restrictions of RRT Tasks are still recurrent J 3 J 5 Always revisit source J 1 No cycles allowed! J 1 J 2 J 6 J 4 Consequences: No local loops Not compositional (for modes etc.) Martin Stigge Workload Models + Analysis 14
Restrictions of RRT Tasks are still recurrent J 3 J 5 Always revisit source J 1 No cycles allowed! J 1 J 2 J 6 J 4 Consequences: No local loops Not compositional (for modes etc.) Martin Stigge Workload Models + Analysis 14
Restrictions of RRT Tasks are still recurrent J 3 J 5 Always revisit source J 1 No cycles allowed! J 1 J 2 J 6 J 4 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) 11 1, 8 15 v 3 3, 8 2, 5 v 1 v 2 20 20 v 4 5, 20 v 5 1, 5 Martin Stigge Workload Models + Analysis 15
DRT: Semantics 11 1, 8 15 v 3 3, 8 2, 5 v 1 v 2 20 20 v 4 5, 20 v 5 1, 5 Martin Stigge Workload Models + Analysis 16
DRT: Semantics 11 1, 8 15 v 3 3, 8 2, 5 v 1 v 2 20 20 v 4 5, 20 v 5 Path π = (v 4 ) 1, 5 5 0 t Martin Stigge Workload Models + Analysis 16
DRT: Semantics 11 1, 8 15 v 3 3, 8 2, 5 v 1 v 2 20 20 v 4 5, 20 v 5 Path π = (v 4, v 2 ) 1, 5 8 5 1 0 20 28 t 20 Martin Stigge Workload Models + Analysis 16
DRT: Semantics 11 1, 8 15 v 3 3, 8 2, 5 v 1 v 2 20 20 v 4 5, 20 v 5 Path π = (v 4, v 2, v 3 ) 1, 5 8 5 1 0 20 28 3 8 35 43... t 20 15 Martin Stigge Workload Models + Analysis 16
A Hierarchy of Models difficult high Schedulability Analysis efficient recurring RT (RRT) (DAG, p) recurring branching (RB) (tree, p) generalized multiframe (GMF) (e i, d i, p i ) multiframe (e i, d = p) Liu & Layland (e, d = p) Digraph (DRT) (arbitrary graph) non-cyclic RRT (DAG, p i ) non-cyclic GMF (order arbitrary) sporadic (e, d, p) Expressiveness low Martin Stigge Workload Models + Analysis 17
A Hierarchy of Models difficult Schedulability Analysis efficient Strongly (co)np-hard Pseudo-Polynomial recurring RT (RRT) (DAG, p) recurring branching (RB) (tree, p) generalized multiframe (GMF) (e i, d i, p i ) multiframe (e i, d = p) Liu & Layland (e, d = p) Digraph (DRT) (arbitrary graph) non-cyclic RRT (DAG, p i ) non-cyclic GMF (order arbitrary) sporadic (e, d, p) high Expressiveness low 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, γ) 2 v 3 5 v 2 v 1 3 2 6 2 v 5 7 v 4 2 9 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, γ) 2 v 3 5 v 2 v 1 3 2 6 2 v 5 7 v 4 2 9 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 difficult Schedulability Analysis efficient Strongly (co)np-hard Pseudo-Polynomial recurring RT (RRT) (DAG, p) recurring branching (RB) (tree, p) generalized multiframe (GMF) (e i, d i, p i ) multiframe (e i, d = p) Liu & Layland (e, d = p) Extended DRT (EDRT) (constraints) k-edrt (k constraints) Digraph (DRT) (arbitrary graph) non-cyclic RRT (DAG, p i ) non-cyclic GMF (order arbitrary) sporadic (e, d, p) high Expressiveness low Martin Stigge Workload Models + Analysis 19
DRT Examples e, d v p Sporadic Task Martin Stigge Workload Models + Analysis 20
DRT Examples e, d v p Sporadic Task e, p v p Sporadic Task (implicit deadline) Martin Stigge Workload Models + Analysis 20
DRT Examples e, d v p Sporadic Task e, p v p Sporadic Task (implicit deadline) e 1, d 1 p 1 e 2, p 2 p 1 u v p 2 p 2 Sporadic Task with 2 modes Martin Stigge Workload Models + Analysis 20
v 4 v 5 DRT Examples e, d v p Sporadic Task e, p v p Sporadic Task (implicit deadline) e 1, d 1 p 1 e 2, p 2 p 1 u v p 2 p 2 Sporadic Task with 2 modes v 3 v 2 v 1 GMF Task Martin Stigge Workload Models + Analysis 20
DRT Examples e, d v p Sporadic Task e, p v p Sporadic Task (implicit deadline) e 1, d 1 p 1 e 2, p 2 p 1 u v p 2 p 2 Sporadic Task with 2 modes v 3 v 2 v 1 v 1 v 2 v 5 v 4 v 5 GMF Task v 3 v 4 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 Hierarchy Liu and Layland and Sporadic Tasks Frames and Branching The Digraph Real-Time (DRT) Task Model Adaptive Variable-Rate (AVR) Tasks 2 Feasibility Analysis of DRT Feasibility Theorem Demand Pairs Test Termination Evaluation 3 Static Priority Schedulability Analysis of DRT Response-Time Analysis Request Functions Refinement Algorithm Evaluation Martin Stigge Workload Models + Analysis 24
Fahrplan 1 DRT Tasks in the Model Hierarchy Liu and Layland and Sporadic Tasks Frames and Branching The Digraph Real-Time (DRT) Task Model Adaptive Variable-Rate (AVR) Tasks 2 Feasibility Analysis of DRT Feasibility Theorem Demand Pairs Test Termination Evaluation 3 Static Priority Schedulability Analysis of DRT Response-Time Analysis Request Functions Refinement Algorithm Evaluation 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 τ dbf T (t) t 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 τ dbf T (t) t What is dbf T (t)? How to compute it? Martin Stigge Workload Models + Analysis 25
Demand-Bound Functions dbf T (t): Maximal demand in any window of size t 5 1 3 0 20 28 35 43... 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 τ dbf T (t) t dbft (t) 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 τ dbf T (t) t dbft (t) t 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 τ dbf T (t) t dbft (t) t 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 τ dbf T (t) t dbft (t) t 1 How to calculate dbf T (t)? 2 How to check existence of violating t? t Martin Stigge Workload Models + Analysis 27
dbf for Sporadic Tasks dbft (t) Sporadic task T = (e, d, p) e d p t Martin Stigge Workload Models + Analysis 28
dbf for Sporadic Tasks dbft (t) Sporadic task T = (e, d, p) e d p t { t d dbf T (t) = max 0, p } + 1 e Martin Stigge Workload Models + Analysis 28
dbf for DRT: From G(T ) to dbf T 11 1, 8 15 v 3 3, 8 2, 5 v 1 v 2 20 20 v 4 5, 20 v 5 1, 5 dbf T (t) 12 9 6 3 0 0 20 30 40 50 60 Martin Stigge Workload Models + Analysis 29 t
dbf for DRT: From G(T ) to dbf T 11 1, 8 15 v 3 3, 8 2, 5 v 1 v 2 20 20 v 4 5, 20 v 5 1, 5 dbf T (t) 12 9 6 3 0 9, 43 0 20 30 40 50 60 Martin Stigge Workload Models + Analysis 29 t
dbf for DRT: From G(T ) to dbf T 11 1, 8 15 v 3 3, 8 2, 5 v 1 v 2 20 20 v 4 5, 20 v 5 1, 5 Path Abstraction: Demand Pair dbf T (t) 12 9 6 3 0 9, 43 0 20 30 40 50 60 Martin Stigge Workload Models + Analysis 29 t
dbf for DRT: From G(T ) to dbf T 11 1, 8 15 v 3 3, 8 2, 5 v 1 v 2 20 20 v 4 5, 20 v 5 1, 5 Path Abstraction: Demand Pair dbf T (t) 12 9 6 3 0 9, 43 0 20 30 40 50 60 Martin Stigge Workload Models + Analysis 29 t
dbf for DRT: From G(T ) to dbf T 11 1, 8 15 v 3 3, 8 2, 5 v 1 v 2 20 20 v 4 5, 20 v 5 1, 5 Path Abstraction: Demand Pair dbf T (t) 12 9 6 3 0 9, 43 0 20 30 40 50 60 Martin Stigge Workload Models + Analysis 29 t
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 π dbf T (t) = max {e e, d demand pair with d 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 π dbf T (t) = max {e e, d demand pair with d 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! 11 1, 8 15 v 3 3, 8 2, 5 v 1 v 2 20 20 v 4 5, 20 v 5 1, 5 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! 2, 5 v 1 11 1, 8 v 2 15 20 20 v 3 3, 8 v 4 5, Path (v 4 ) 5,, v 4 20 v 5 1, 5 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! 2, 5 v 1 11 1, 8 v 2 15 20 20 v 3 3, 8 v 4 5, Path (v 4 ) 5,, v 4 Path (v 4, v 2 ) 6, 28, v 2 20 v 5 1, 5 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! 2, 5 v 1 11 1, 8 v 2 20 15 20 20 v 5 v 3 3, 8 v 4 5, Path (v 4 ) 5,, v 4 Path (v 4, v 2 ) 6, 28, v 2 Path (v 4, v 2, v 3 ) 9, 43, v 3 1, 5 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 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 dbf T (t) 11 1, 8 15 v 3 3, 8 v 2 20 2, 5 v 1 20 v 4 5, 20 v 5 1, 5 12 9 6 3 0 t 0 20 30 40 50 60 D 70 Martin Stigge Workload Models + Analysis 33
Example dbf T (t) 11 1, 8 15 v 3 3, 8 v 2 20 2, 5 v 1 20 v 4 5, 20 v 5 1, 5 12 9 6 3 0 t 0 20 30 40 50 60 D 70 Martin Stigge Workload Models + Analysis 33
Example dbf T (t) 11 1, 8 15 v 3 3, 8 v 2 20 2, 5 v 1 20 v 4 5, 20 v 5 1, 5 12 9 6 3 0 t 0 20 30 40 50 60 D 70 Martin Stigge Workload Models + Analysis 33
Example dbf T (t) 12 9 6, 20, v 4 6 6, 30, v 4 11 1, 8 15 v 3 3, 8 v 2 20 2, 5 v 1 20 v 4 5, 20 v 5 1, 5 3 0 t 0 20 30 40 50 60 D 70 Martin Stigge Workload Models + Analysis 33
Example dbf T (t) 12 9 6, 20, v 4 6 6, 30, v 4 11 1, 8 15 v 3 3, 8 v 2 20 2, 5 v 1 20 v 4 5, 20 v 5 1, 5 3 0 t 0 20 30 40 50 60 D 70 Optimization: Discard dominated triples (e, d, v) (e, d, v) e e d d Martin Stigge Workload Models + Analysis 33
Example dbf T (t) 11 1, 8 15 v 3 3, 8 v 2 20 2, 5 v 1 20 v 4 5, 20 v 5 1, 5 12 9 6 3 0 t 0 20 30 40 50 60 D 70 Optimization: Discard dominated triples (e, d, v) (e, d, v) e e d d Martin Stigge Workload Models + Analysis 33
Example dbf T (t) 11 1, 8 15 v 3 3, 8 v 2 20 2, 5 v 1 20 v 4 5, 20 v 5 1, 5 12 9 6 3 0 t 0 20 30 40 50 60 D 70 Optimization: Discard dominated triples (e, d, v) (e, d, v) e e d d Martin Stigge Workload Models + Analysis 33
Example dbf T (t) 11 1, 8 15 v 3 3, 8 v 2 20 2, 5 v 1 20 v 4 5, 20 v 5 1, 5 12 9 6 3 0 t 0 20 30 40 50 60 D 70 Optimization: Discard dominated triples (e, d, v) (e, d, v) e e d d Martin Stigge Workload Models + Analysis 33
Example dbf T (t) 11 1, 8 15 v 3 3, 8 v 2 20 2, 5 v 1 20 v 4 5, 20 v 5 1, 5 12 9 6 3 0 t 0 20 30 40 50 60 D 70 Optimization: Discard dominated triples (e, d, v) (e, d, v) e e d d Martin Stigge Workload Models + Analysis 33
Example dbf T (t) 11 1, 8 15 v 3 3, 8 v 2 20 2, 5 v 1 20 v 4 5, 20 v 5 1, 5 12 9 6 3 0 t 0 20 30 40 50 60 D 70 Optimization: Discard dominated triples (e, d, v) (e, d, v) e e d d Martin Stigge Workload Models + Analysis 33
Example dbf T (t) 11 1, 8 15 v 3 3, 8 v 2 20 2, 5 v 1 20 v 4 5, 20 v 5 1, 5 12 9 6 3 0 t 0 20 30 40 50 60 D 70 Optimization: Discard dominated triples (e, d, v) (e, d, v) e e d d Martin Stigge Workload Models + Analysis 33
Example dbf T (t) 11 1, 8 15 v 3 3, 8 v 2 20 2, 5 v 1 20 v 4 5, 20 v 5 1, 5 12 9 6 3 0 t 0 20 30 40 50 60 D 70 Optimization: Discard dominated triples (e, d, v) (e, d, v) e e d 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 τ dbf T (t) t dbft (t) t 1 How to calculate dbf T (t)? 2 How to check existence of violating t? 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 τ dbf T (t) t dbft (t) t D t Martin Stigge Workload Models + Analysis 34
Calculating the Bound dbft (t) Most dense cycle Linear bound for dbf(t) dbf(t) J 2 J 3 J4 J 5 J 6 t J 1 J 8 J 7 Linear bound for dbf(t) Slope: Less than 1 Intersection with t gives bound D Check only up to D dbf(t) t U(τ) + e sum Martin Stigge Workload Models + Analysis 35
Calculating the Bound dbft (t) Most dense cycle Linear bound for dbf(t) dbf(t) J 2 J 3 J4 J 5 J 6 t J 1 J 8 J 7 Linear bound for dbf(t) Slope: Less than 1 Intersection with t gives bound D Check only up to D dbf(t) t U(τ) + e sum Martin Stigge Workload Models + Analysis 35
Calculating the Bound dbft (t) t Most dense cycle Linear bound for dbf(t) dbf(t) J 2 J 3 J4 J 5 J 6 D t J 1 J 8 J 7 Linear bound for dbf(t) Slope: Less than 1 Intersection with t gives bound D Check only up to D dbf(t) t U(τ) + e sum 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 Analysis Run-Time (seconds) 1.4 1.2 1.0 0.8 0.6 0.4 0.2 EDF 0.0 0% 20% 40% 60% 80% 0% Task Set Utilization Setting: Randomly generated task sets 1-30 tasks, 5- vertices per task, branching degree 1-3,... Martin Stigge Workload Models + Analysis 37
Fahrplan 1 DRT Tasks in the Model Hierarchy Liu and Layland and Sporadic Tasks Frames and Branching The Digraph Real-Time (DRT) Task Model Adaptive Variable-Rate (AVR) Tasks 2 Feasibility Analysis of DRT Feasibility Theorem Demand Pairs Test Termination Evaluation 3 Static Priority Schedulability Analysis of DRT Response-Time Analysis Request Functions Refinement Algorithm Evaluation Martin Stigge Workload Models + Analysis 38
Fahrplan 1 DRT Tasks in the Model Hierarchy Liu and Layland and Sporadic Tasks Frames and Branching The Digraph Real-Time (DRT) Task Model Adaptive Variable-Rate (AVR) Tasks 2 Feasibility Analysis of DRT Feasibility Theorem Demand Pairs Test Termination Evaluation 3 Static Priority Schedulability Analysis of DRT Response-Time Analysis Request Functions Refinement Algorithm Evaluation Martin Stigge Workload Models + Analysis 38
Complexity of Schedulability Tests Pseudo-polynomial schedulability tests possible? EDF SP L&L Yes GMF Yes DRT Yes EDRT No Martin Stigge Workload Models + Analysis 39
Complexity of Schedulability Tests Pseudo-polynomial schedulability tests possible? = Takada & Sakamura, 1997 EDF SP L&L Yes Yes GMF Yes Yes DRT Yes? EDRT No? Martin Stigge Workload Models + Analysis 39
Complexity of Schedulability Tests Pseudo-polynomial schedulability tests possible? = Takada & Sakamura, 1997 Flawed! Replaced by: Theorem (S. et al., 2012) EDF SP L&L Yes Yes GMF Yes Yes No! DRT Yes No EDRT No No For GMF task systems, the schedulability problem for static priority schedulers 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: Packing possible Busy interval t One GMF task for each item 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: Packing possible Busy interval t One GMF task for each item Thus: τ(i ) unsched. I 3-PARTITION Martin Stigge Workload Models + Analysis 40
Model Hierarchy Revisited conphard EDRT EDRT RRT k-edrt DRT ncrrt RRT k-edrt DRT ncrrt conphard p.p. RB GMF ncgmf RB GMF ncgmf MF sporadic MF sporadic p.p. L&L L&L EDF SP 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: R j = C j + Rj C i i hp(j) T i Martin Stigge Workload Models + Analysis 42
Problem: Path Combinations u3 u3 v3 v3 v2 u1 v2 u1 v1 v4 v1 v4 v5 u2 v5 u2 Response time Response time Martin Stigge Workload Models + Analysis 43
Problem: Path Combinations u3 u3 v3 v3 v2 u1 v2 u1 v1 v4 v1 v4 v5 u2 v5 u2 Response time Response time Combinatorial Explosion! Martin Stigge Workload Models + Analysis 43
Intuition: No Task-Local Worst Cases Task T high : 5 2, 5 v 1 v 2 6, Which path is worse: (v 1, v 2 ) or (v 2, v 1 )? Martin Stigge Workload Models + Analysis 44
Intuition: No Task-Local Worst Cases Task T high : 5 2, 5 v 1 v 2 6, Which path is worse: (v 1, v 2 ) or (v 2, v 1 )? It depends! T 1 : 2, 7 u versus T 2 : 4, w Martin Stigge Workload Models + Analysis 44
Intuition: No Task-Local Worst Cases Task T high : 5 2, 5 v 1 v 2 6, Which path is worse: (v 1, v 2 ) or (v 2, v 1 )? It depends! T 1 : 2, 7 u versus T 2 : 4, w v 1 v 2 v 2 v 1 T high : T high : T 1 : T 1 : 0 2 4 6 8 12 0 2 4 6 8 12 Martin Stigge Workload Models + Analysis 44
Intuition: No Task-Local Worst Cases Task T high : 5 2, 5 v 1 v 2 6, Which path is worse: (v 1, v 2 ) or (v 2, v 1 )? It depends! T 1 : 2, 7 u versus T 2 : 4, w v 1 v 2 v 2 v 1 T high : T high : T 2 : T 2 : 0 2 4 6 8 12 0 2 4 6 8 12 Martin Stigge Workload Models + Analysis 44
Request Functions 11 1, 8 15 v 3 3, 8 2, 5 v 1 v 2 20 20 v 4 5, 20 v 5 1, 5 rf (t) rf 8 (v4,v 2,v 3 ) 6 4 2 0 t 0 5 15 20 25 30 35 40 rf π (t) := max { e(π ) π is prefix of π and p(π ) < t } Martin Stigge Workload Models + Analysis 45
Request Functions (cont.) Useful for deriving response time: { R SP (v, rf ) = min R SP (v) = max rf RF (τ) t 0 e(v) + R SP (v, rf ) T >T rf (T ) (t) t } Martin Stigge Workload Models + Analysis 46
Request Functions (cont.) Useful for deriving response time: { R SP (v, rf ) = min R SP (v) = max rf RF (τ) t 0 e(v) + R SP (v, rf ) T >T rf (T ) (t) t } Combinatorial Explosion?! Martin Stigge Workload Models + Analysis 46
Abstract Request Functions 11 1, 8 15 v 3 3, 8 2, 5 v 1 v 2 20 20 v 4 5, 20 v 5 1, 5 rf (t) rf 8 (v4,v 2,v 3 ) 6 4 2 0 t 0 5 15 20 25 30 35 40 Martin Stigge Workload Models + Analysis 47
Abstract Request Functions 11 1, 8 15 v 3 3, 8 2, 5 v 1 v 2 20 20 v 4 5, 20 v 5 1, 5 rf (t) 8 rf (v4,v 2,v 3 ) 6 4 rf (v5,v 4,v 2 ) 2 0 t 0 5 15 20 25 30 35 40 Martin Stigge Workload Models + Analysis 47
Abstract Request Functions 11 1, 8 15 v 3 3, 8 2, 5 v 1 v 2 20 20 v 4 5, 20 v 5 1, 5 rf (t) 8 arf rf (v4,v 2,v 3 ) 6 4 rf (v5,v 4,v 2 ) 2 0 t 0 5 15 20 25 30 35 40 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 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 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 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 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 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 Store Tuple: rf = (rf (T 1), rf (T 2), rf (T 3) ) Martin Stigge Workload Models + Analysis 49
Refinement Algorithm Tuple: rf = (rf (T 1), rf (T 2), rf (T 3) ) Store (23, rf 1 ) Response time: R SP (v, rf ) = 23 Using: R SP (v, rf { ) = min t 0 e(v) + T >T rf (T ) } (t) t Martin Stigge Workload Models + Analysis 49
Refinement Algorithm Store (23, rf 1 ) Martin Stigge Workload Models + Analysis 49
Refinement Algorithm Step: rf 1 = (rf (T 1), rf (T 2), rf (T 3) ) Store (23, rf 1 ) rf 2 = (rf (T 1), rf (T 2), rf (T 3) ) rf 3 = (rf (T 1), rf (T 2), rf (T 3) ) In T 1 : rf rf rf Martin Stigge Workload Models + Analysis 49
Refinement Algorithm Step: rf 1 = (rf (T 1), rf (T 2), rf (T 3) ) Store (23, rf 1 ) rf 2 = (rf (T 1), rf (T 2), rf (T 3) ) rf 3 = (rf (T 1), rf (T 2), rf (T 3) ) 18 21 In T 1 : rf rf rf Martin Stigge Workload Models + Analysis 49
Refinement Algorithm Step: rf 1 = (rf (T 1), rf (T 2), rf (T 3) ) rf 2 = (rf (T 1), rf (T 2), rf (T 3) ) rf 3 = (rf (T 1), rf (T 2), rf (T 3) ) 18 21 Store (23, rf 1 ) (21, rf 2 ) (18, rf 3 ) In T 1 : rf rf rf Martin Stigge Workload Models + Analysis 49
Refinement Algorithm Store (21, rf 2 ) (18, rf 3 ) Martin Stigge Workload Models + Analysis 49
Refinement Algorithm Step: rf 2 = (rf (T 1), rf (T 2), rf (T 3) ) Store (21, rf 2 ) (18, rf 3 ) Martin Stigge Workload Models + Analysis 49
Refinement Algorithm Step: rf 2 = (rf (T 1), rf (T 2), rf (T 3) ) Store (21, rf 2 ) (18, rf 3 ) rf 4 = (rf (T 1), rf (T 2), rf (T 3) ) rf 5 = (rf (T 1), rf (T 2), rf (T 3) ) In T 2 : rf rf rf Martin Stigge Workload Models + Analysis 49
Refinement Algorithm Step: rf 2 = (rf (T 1), rf (T 2), rf (T 3) ) Store (21, rf 2 ) (18, rf 3 ) rf 4 = (rf (T 1), rf (T 2), rf (T 3) ) rf 5 = (rf (T 1), rf (T 2), rf (T 3) ) 20 17 In T 2 : rf rf rf Martin Stigge Workload Models + Analysis 49
Refinement Algorithm Step: rf 2 = (rf (T 1), rf (T 2), rf (T 3) ) rf 4 = (rf (T 1), rf (T 2), rf (T 3) ) rf 5 = (rf (T 1), rf (T 2), rf (T 3) ) 20 17 Store (21, rf 2 ) (20, rf 4 ) (18, rf 3 ) (17, rf 5 ) In T 2 : rf rf rf Martin Stigge Workload Models + Analysis 49
Refinement Algorithm Store (20, rf 4 ) (18, rf 3 ) (17, rf 5 ). Martin Stigge Workload Models + Analysis 49
Refinement Algorithm Initialization: Most abstract functions Each iteration: Replace functions along abstraction trees Termination: All functions are concrete OR: Estimate is already safe Store (20, rf 4 ) (18, rf 3 ) (17, rf 5 ). Martin Stigge Workload Models + Analysis 49
Refinement Algorithm Initialization: Most abstract functions Each iteration: Replace functions along abstraction trees Termination: All functions are concrete OR: Estimate is already safe Store (20, rf 4 ) (18, rf 3 ) (17, rf 5 ). Martin Stigge Workload Models + Analysis 49
Evaluation: Run-time Scaling Analysis Run-Time (seconds) 1.4 1.2 1.0 0.8 0.6 0.4 0.2 EDF SP 0.0 0% 20% 40% 60% 80% 0% Task Set Utilization 1-30 tasks with 5- vertices each, branching degree 1-3 Martin Stigge Workload Models + Analysis 50
Evaluation: Precision Improvement Average improvement 20% 15% % 5% Type A Type B 0% 20% 40% 60% 80% 0% Fraction of improved RT estimates Type A: lower parameter variance Type 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 Hierarchy Liu and Layland and Sporadic Tasks Frames and Branching The Digraph Real-Time (DRT) Task Model Adaptive Variable-Rate (AVR) Tasks 2 Feasibility Analysis of DRT Feasibility Theorem Demand Pairs Test Termination Evaluation 3 Static Priority Schedulability Analysis of DRT Response-Time Analysis Request Functions Refinement Algorithm Evaluation Martin Stigge Workload Models + Analysis 53
Summary RRT RB GMF MF ncrrt ncgmf sporadic L&L Martin Stigge Workload Models + Analysis 54
Summary EDRT k-edrt RRT RB GMF MF DRT ncrrt ncgmf sporadic L&L Martin Stigge Workload Models + Analysis 54
Summary conphard EDRT k-edrt p.p. RRT RB GMF MF DRT ncrrt ncgmf sporadic L&L EDF Martin Stigge Workload Models + Analysis 54
Summary conphard EDRT EDRT RRT k-edrt DRT ncrrt RRT k-edrt DRT ncrrt conphard p.p. RB GMF ncgmf RB GMF ncgmf MF sporadic MF sporadic p.p. L&L L&L EDF SP Martin Stigge Workload Models + Analysis 54
Summary conphard EDRT EDRT RRT k-edrt DRT ncrrt RRT k-edrt DRT ncrrt conphard p.p. RB GMF ncgmf RB GMF ncgmf MF sporadic MF sporadic p.p. L&L L&L EDF SP 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 11 1, 8 15 v 3 3, 8 2, 5 v 1 v 2 20 20 v 4 5, 20 v 5 1, 5 rf (t) rf 8 (v4,v 2,v 3 ) 6 4 2 0 t 0 5 15 20 25 30 35 40 rf π (t) := max { e(π ) π is prefix of π and p(π ) < t } Martin Stigge Workload Models + Analysis 58
Path Abstractions: EDF T 1 v T 2 v Martin Stigge Workload Models + Analysis 59
Path Abstractions: EDF T 1 v t T 2 v t wf π (t, t ) := max{e(π ) π is prefix of π, p(π ) < t and d(π ) t }. Martin Stigge Workload Models + Analysis 59