A RRIVAL C URVES FOR R EAL -T IME C ALCULUS : THE C AUSALITY P ROBLEM AND ITS S OLUTIONS - Matthieu Moy and Karine Altisen Vasvi Kakkad School of Information Technologies University of Sydney
O UTLINE Real Time Calculus Arrival Curves Causality Problem Computing Causality Closure Algorithm Conclusion 2
R EAL T IME C ALCULUS 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 3 Real Time Calculus
R EAL T IME C ALCULUS 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 4 Real Time Calculus
A RRIVAL C URVES 5
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 6 Arrival Curves
A RRIVAL C URVES - N OTATIONS 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 7 Arrival Curves
A RRIVAL C URVE – F ORMAL D EFINITION Pair of functions ( u, l ) in F X F finite, s.t. l ≤ u ( u, l ) is satisfiable if cumulative curve R satisfies it - R ╞ ( u, l ) 8 Arrival Curves
A RRIVAL C URVES - F UNCTIONS Wide-sense increasing function f : T For f, g : T 9 Arrival Curves
A RRIVAL C URVES – S UB /S UPER A DDITIVITY & S UB /S UPER A DDITIVE C LOSURE 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 – 10 Arrival Curves
I MPLICIT C ONSTRAINTS ON A RRIVAL C URVES 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 11 Arrival Curves
C AUSALITY P ROBLEM 12
C AUSALITY P ROBLEM 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 13 Causality Problem
C AUSAL A RRIVAL C URVES 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 ).” 14 Causality Problem
C AUSALITY C HARACTERISATION Forbidden region – area between u and u l & area between l and l u 15 Causality Problem
E XAMPLE # events αuαu αlαl α l SA Curve time Forbidden 16 Causality Problem
C OMPUTING C AUSALITY C URVE 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 17 Computing Causality Curve
C O PERATOR For arrival curve ( α u, α l ), 18 Computing Causality Curve
D ISCRETE F INITE C URVE Restriction of infinite curves on a finite interval ( u | T, l | T ) – restriction of ( u, l ) to [0,T] : SA-SA on an interval 19 Discrete Finite Curve
A LGORITHM & E XAMPLE 20
A LGORITHM 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 21 Algorithm & Example
E XAMPLE 22 Example
E XAMPLE – CONTD.. 23 Example
E XAMPLE – CONTD.. 24 Example
E XAMPLE – CONTD.. 25 Example
C ONCLUSION 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 26
T HANK Y OU...