Refinement-based Exact Response-Time Analysis Martin Stigge Uppsala University, Sweden Joint work with Nan Guan and Wang Yi
Response-Time Analysis Response time • Useful for • Schedulability analysis • Jitters in larger systems • . . . • Standard RTA for static priorities + periodic/sporadic tasks � R j � � R j = C j + C i T i i ∈ hp ( j ) Martin Stigge Refinement-based Response-Time Analysis 2
Not everything is periodic! Martin Stigge Refinement-based Response-Time Analysis 3
The Digraph Real-Time (DRT) Task Model (S. et al., RTAS 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 v 3 � 3 , 8 � 15 � 1 , 8 � v 2 20 10 v 4 � 5 , 10 � 20 v 1 � 2 , 5 � 10 20 v 5 � 1 , 5 � Martin Stigge Refinement-based Response-Time Analysis 4
DRT: Semantics 11 v 3 � 3 , 8 � � 1 , 8 � 15 v 2 20 10 v 4 � 5 , 10 � 20 v 1 � 2 , 5 � 10 20 v 5 � 1 , 5 � Martin Stigge Refinement-based Response-Time Analysis 5
DRT: Semantics 11 v 3 � 3 , 8 � � 1 , 8 � 15 v 2 20 10 v 4 � 5 , 10 � 20 v 1 � 2 , 5 � 10 20 v 5 � 1 , 5 � Path π = ( v 4 ) 10 5 t 0 10 Martin Stigge Refinement-based Response-Time Analysis 5
DRT: Semantics 11 v 3 � 3 , 8 � � 1 , 8 � 15 v 2 20 10 v 4 � 5 , 10 � 20 v 1 � 2 , 5 � 10 20 v 5 � 1 , 5 � Path π = ( v 4 , v 2 ) 10 8 5 1 t 0 10 20 28 20 Martin Stigge Refinement-based Response-Time Analysis 5
DRT: Semantics 11 v 3 � 3 , 8 � � 1 , 8 � 15 v 2 20 10 v 4 � 5 , 10 � 20 v 1 � 2 , 5 � 10 20 v 5 � 1 , 5 � Path π = ( v 4 , v 2 , v 3 ) 10 8 8 ... 5 1 3 t 0 10 20 28 37 45 20 � 15 Martin Stigge Refinement-based Response-Time Analysis 5
Response-Time Analysis for DRT Martin Stigge Refinement-based Response-Time Analysis 6
Problem: Path Combinations u 3 u 3 v 3 v 3 v 2 u 1 v 2 u 1 v 4 v 4 v 1 v 1 v 5 u 2 v 5 u 2 ↓ ↓ Response time Response time Martin Stigge Refinement-based Response-Time Analysis 7
Problem: Path Combinations u 3 u 3 v 3 v 3 v 2 u 1 v 2 u 1 v 4 v 4 v 1 v 1 v 5 u 2 v 5 u 2 ↓ ↓ Response time Response time Combinatorial Explosion! Martin Stigge Refinement-based Response-Time Analysis 7
Fahrplan Martin Stigge Refinement-based Response-Time Analysis 8
Fahrplan Martin Stigge Refinement-based Response-Time Analysis 8
Step 1: From Paths to Functions Martin Stigge Refinement-based Response-Time Analysis 9
Step 1: From Paths to Functions 11 v 3 � 3 , 8 � � 1 , 8 � 15 v 2 20 10 v 4 � 5 , 10 � 20 v 1 � 2 , 5 � 10 20 v 5 � 1 , 5 � rf ( t ) 10 rf ( v 4 , v 2 , v 3 ) 8 6 4 2 t 0 0 5 10 15 20 25 30 35 40 Martin Stigge Refinement-based Response-Time Analysis 10
Request Functions Useful for deriving response time: � � R SP ( v , ¯ � rf ( T ′ ) ( t ) � t rf ) = min t � 0 | e ( v ) + T ′ > T rf ∈ RF ( τ ) R SP ( v , ¯ R SP ( v ) = max rf ) ¯ Martin Stigge Refinement-based Response-Time Analysis 11
Request Functions Useful for deriving response time: � � R SP ( v , ¯ � rf ( T ′ ) ( t ) � t rf ) = min t � 0 | e ( v ) + T ′ > T rf ∈ RF ( τ ) R SP ( v , ¯ R SP ( v ) = max rf ) ¯ Combinatorial Explosion?! Martin Stigge Refinement-based Response-Time Analysis 11
Step 2: Abstraction Trees Martin Stigge Refinement-based Response-Time Analysis 12
Abstract Request Functions 11 v 3 � 3 , 8 � � 1 , 8 � 15 v 2 20 10 v 4 � 5 , 10 � 20 v 1 � 2 , 5 � 10 20 v 5 � 1 , 5 � rf ( t ) 10 rf ( v 4 , v 2 , v 3 ) 8 6 4 2 t 0 0 5 10 15 20 25 30 35 40 Martin Stigge Refinement-based Response-Time Analysis 13
Abstract Request Functions 11 v 3 � 3 , 8 � � 1 , 8 � 15 v 2 20 10 v 4 � 5 , 10 � 20 v 1 � 2 , 5 � 10 20 v 5 � 1 , 5 � rf ( t ) 10 rf ( v 4 , v 2 , v 3 ) 8 6 rf ( v 5 , v 4 , v 2 ) 4 2 t 0 0 5 10 15 20 25 30 35 40 Martin Stigge Refinement-based Response-Time Analysis 13
Abstract Request Functions 11 v 3 � 3 , 8 � � 1 , 8 � 15 v 2 20 10 v 4 � 5 , 10 � 20 v 1 � 2 , 5 � 10 20 v 5 � 1 , 5 � rf ( t ) 10 rf ( v 4 , v 2 , v 3 ) arf 8 6 rf ( v 5 , v 4 , v 2 ) 4 2 t 0 0 5 10 15 20 25 30 35 40 Martin Stigge Refinement-based Response-Time Analysis 13
Abstraction Tree rf 1 rf 2 rf 5 rf 3 rf 4 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 Refinement-based Response-Time Analysis 14
Abstraction Tree rf 1 rf 2 rf 5 rf 3 rf 4 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 Refinement-based Response-Time Analysis 14
Abstraction Tree rf 1 rf 2 rf 5 rf 3 rf 4 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 Refinement-based Response-Time Analysis 14
Abstraction Tree rf 1 rf 2 rf 5 rf 3 rf 4 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 Refinement-based Response-Time Analysis 14
Abstraction Tree rf 1 rf 2 rf 5 rf 3 rf 4 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 Refinement-based Response-Time Analysis 14
Abstraction Tree rf 1 rf 2 rf 5 rf 3 rf 4 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 Refinement-based Response-Time Analysis 14
Step 3: Refinement Algorithm Martin Stigge Refinement-based Response-Time Analysis 15
Step 3: Refinement Algorithm Store rf = ( rf ( T 1 ) , rf ( T 2 ) , rf ( T 3 ) ) ¯ Tuple: Martin Stigge Refinement-based Response-Time Analysis 16
Step 3: Refinement Algorithm Store (23 , ¯ rf 1 ) rf = ( rf ( T 1 ) , rf ( T 2 ) , rf ( T 3 ) ) ¯ Tuple: ↓ R SP ( v , ¯ Response time: rf ) = 23 � � Using: R SP ( v , ¯ T ′ > T rf ( T ′ ) ( t ) � t t � 0 | e ( v ) + � rf ) = min Martin Stigge Refinement-based Response-Time Analysis 16
Step 3: Refinement Algorithm Store (23 , ¯ rf 1 ) Martin Stigge Refinement-based Response-Time Analysis 16
Step 3: Refinement Algorithm Store Step: (23 , ¯ rf 1 ) 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 ) ) rf In T 1 : rf ′ rf ′′ Martin Stigge Refinement-based Response-Time Analysis 16
Step 3: Refinement Algorithm Store Step: (23 , ¯ rf 1 ) rf 1 = ( rf ( T 1 ) , rf ( T 2 ) , rf ( T 3 ) ) ¯ ↓ rf 2 = ( rf ′ ( T 1 ) , rf ( T 2 ) , rf ( T 3 ) ) ¯ → 18 ¯ rf 3 = ( rf ′′ ( T 1 ) , rf ( T 2 ) , rf ( T 3 ) ) → 21 rf In T 1 : rf ′ rf ′′ Martin Stigge Refinement-based Response-Time Analysis 16
Step 3: Refinement Algorithm Store Step: (23 , ¯ rf 1 ) rf 1 = ( rf ( T 1 ) , rf ( T 2 ) , rf ( T 3 ) ) ¯ (21 , ¯ rf 2 ) ↓ (18 , ¯ rf 3 ) rf 2 = ( rf ′ ( T 1 ) , rf ( T 2 ) , rf ( T 3 ) ) ¯ → 18 ¯ rf 3 = ( rf ′′ ( T 1 ) , rf ( T 2 ) , rf ( T 3 ) ) → 21 rf In T 1 : rf ′ rf ′′ Martin Stigge Refinement-based Response-Time Analysis 16
Step 3: Refinement Algorithm Store (21 , ¯ rf 2 ) (18 , ¯ rf 3 ) Martin Stigge Refinement-based Response-Time Analysis 16
Step 3: Refinement Algorithm Store Step: (21 , ¯ rf 2 ) rf 2 = ( rf ( T 1 ) , rf ( T 2 ) , rf ( T 3 ) ) ¯ (18 , ¯ rf 3 ) Martin Stigge Refinement-based Response-Time Analysis 16
Step 3: Refinement Algorithm Store Step: (21 , ¯ rf 2 ) rf 2 = ( rf ( T 1 ) , rf ( T 2 ) , rf ( T 3 ) ) ¯ (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 ) ) rf In T 2 : rf ′ rf ′′ Martin Stigge Refinement-based Response-Time Analysis 16
Step 3: Refinement Algorithm Store Step: (21 , ¯ rf 2 ) rf 2 = ( rf ( T 1 ) , rf ( T 2 ) , rf ( T 3 ) ) ¯ (18 , ¯ rf 3 ) ↓ rf 4 = ( rf ( T 1 ) , rf ′ ( T 2 ) , rf ( T 3 ) ) ¯ → 20 ¯ rf 5 = ( rf ( T 1 ) , rf ′′ ( T 2 ) , rf ( T 3 ) ) → 17 rf In T 2 : rf ′ rf ′′ Martin Stigge Refinement-based Response-Time Analysis 16
Step 3: Refinement Algorithm Store Step: (21 , ¯ rf 2 ) rf 2 = ( rf ( T 1 ) , rf ( T 2 ) , rf ( T 3 ) ) ¯ (20 , ¯ rf 4 ) ↓ (18 , ¯ rf 3 ) rf 4 = ( rf ( T 1 ) , rf ′ ( T 2 ) , rf ( T 3 ) ) ¯ → 20 (17 , ¯ rf 5 ) ¯ rf 5 = ( rf ( T 1 ) , rf ′′ ( T 2 ) , rf ( T 3 ) ) → 17 rf In T 2 : rf ′ rf ′′ Martin Stigge Refinement-based Response-Time Analysis 16
Step 3: Refinement Algorithm Store (20 , ¯ rf 4 ) (18 , ¯ rf 3 ) (17 , ¯ rf 5 ) . . . Martin Stigge Refinement-based Response-Time Analysis 16
Recommend
More recommend