280 likes | 453 Views
Arrival Curves for Real-Time Calculus : the Causality Problem and its Solutions. - Matthieu Moy and Karine Altisen. Vasvi Kakkad School of Information Technologies University of Sydney. Outline. Real Time Calculus Arrival Curves Causality Problem Computing Causality Closure Algorithm
E N D
Arrival Curves for Real-Time Calculus : the Causality Problem and its Solutions - Matthieu Moy and Karine Altisen Vasvi Kakkad School of Information Technologies University of Sydney
Outline • Real Time Calculus • Arrival Curves • Causality Problem • Computing Causality Closure • Algorithm • Conclusion
Real Time Calculus • Modeling & Analysis Techniques for Real time systems • Computational • Analytical • Computational Approach • Simulation, testing and verification • Very precise result • Only for one simulation and one instance of system • Analytical Approach • Based on mathematical equations • Gives strict worst case execution times • Fast • Only for theoretical cases Real Time Calculus
Real Time Calculus • RTC – Framework to model and analyse heterogeneous system • Models timing property of event streams with curves – Arrival Curves • Component – works with input streams and gives output stream as a function of input stream • Can not handle the notion of state in System modeling Real Time Calculus
Arrival Curves • Arrival Curves – • Function of relative time that constraints the no of events that can occur in an interval of time • For Sliding Window ∆ & Arrival Curves (u, l) • l (∆) lower bounds and u(∆) upper bounds on no of events Arrival Curves
Arrival Curves - Notations • R+ - Set of non-negative Reals • - R+ U {+ ∞} • N – Set of Naturals • - N U {+ ∞} • T – Time – R+ or N • - Event Count - R+ or N • - Event Count - or Arrival Curves
Arrival Curve – Formal Definition • Pair of functions (u, l) in F X Ffinite, s.t. l ≤ u • (u, l) is satisfiable if cumulative curve R satisfies it - R ╞ (u, l) Arrival Curves
Arrival Curves - Functions • Wide-sense increasing function f : T • For f, g : T Arrival Curves
Arrival Curves – Sub/Super Additivity & Sub/Super Additive Closure • Sub additive function f – • For all s, t T. f(t + s) ≥ f(t) + f(s) • Sub additive Closure of f – • Super additive function f – • For all s, t T. f(t + s) ≤ f(t) + f(s) • Super additive Closure of f – Arrival Curves
Implicit Constraints on Arrival Curves • Some Constraints cause problems – • E.g. Deadlock with Generator of Events • Spurious counter-example with Formal verification • Two types • Unreachable Regions – region between curves and sub/super additive closure • Forbidden Regions Arrival Curves
Causality Problem • Causal – • Pair of curves for which beginning of execution never prevents continuation • Having no forbidden regions • Causality Problem • Curve having forbidden regions • Paper describes – algorithm to transform pair of arrival curves to equivalent causal representation Causality Problem
Causal Arrival Curves Pair of Arrival Curves (u, l) is causal iff “any cumulative curve R satisfies (u, l) up to T can be extended indefinitely into a cumulative curve R’ that also satisfies (u, l).” Causality Problem
Causality Characterisation • Forbidden region – area between u and u l & area between l and l u Causality Problem
Example # events αu 8 7 αlSA Curve 6 5 αl Causality Problem 4 Forbidden 3 2 1 0 0 1 2 3 4 5 6 7 8 9 10 time
Computing Causality Curve • C Operator – removes forbidden region from pair of curves. • Removing forbidden regions on l will introduce new ones on u and vice-versa. • Remove it until fix-point Computing Causality Curve
C Operator Computing Causality Curve For arrival curve (αu, αl),
Discrete Finite Curve • Restriction of infinite curves on a finite interval • (u |T, l |T) – restriction of (u, l) to [0,T] : • SA-SA on an interval Discrete Finite Curve
Algorithm A A0 Repeat A SA-SA-closure(A) /* not mandatory, speeds up convergence and ensures SA-SA */ A’ A A C(A) Until A ≠┴AC or A’ = A Algorithm & Example
Example Example
Example – contd.. Example
Example – contd.. Example
Example – contd.. Example
Conclusion • RTC – framework to analyse heterogeneous systems • Arrival Curves - (u, l) : Time no of Events • Causal Curve and Causality Problem • C operator – Remove forbidden region Causal curve • Algorithm to Compute Causality Closure for finite, discrete graph