SLIDE 1
Tasks for Actors Frank S. de Boer Main Problem Modeling and - - PowerPoint PPT Presentation
Tasks for Actors Frank S. de Boer Main Problem Modeling and - - PowerPoint PPT Presentation
Tasks for Actors Frank S. de Boer Main Problem Modeling and analysis of real-time distributed software systems Main Approach Executable modeling language for concurrent objects Main Research Context EU STREP Project Credo (FP6) on Modeling
SLIDE 2
SLIDE 3
Main Approach
Executable modeling language for concurrent objects
SLIDE 4
Main Research Context
EU STREP Project Credo (FP6) on Modeling and analysis of evolutionary structures in distributed services Coordinator: F.S. de Boer (CWI) Start date: 1-9-2006 End date: 1-9-2009 Main partners (involved in this work)
◮ Einar Broch Johnsen (UIO) ◮ Wang Yi (UU) ◮ Mahdi Jaghouri (CWI)
SLIDE 5
Concurrent Objects
Model:
◮ Objects represent dedicated processors (in distributed systems) ◮ Objects interact via asynchronous message passing ◮ Objects create processes for handling each incoming message ◮ Objects synchronize their processes
Analysis:
◮ Formal semantics ◮ Maude implementation
◮ Simulation ◮ Testing ◮ Model-Checking
Main challenge: Behavioral interfaces for modeling and analysis of real-time scheduling policies for concurrent objects
SLIDE 6
Actors
No
◮ inter-object (return) ◮ intra-object (suspended processes)
synchronization
SLIDE 7
Technical Overview
◮ Timed Automata ◮ Task Automata ◮ Actors ◮ Tasks for Actors ◮ Conclusion
SLIDE 8
Timed Automata
Clocks Real-valued States Delay:
◮ Invariant
Transitions Instantaneous actions:
◮ Enabling condition ◮ Reset
SLIDE 9
Semantics Timed Automata
Configuration s, c
◮ s: a state of the automaton ◮ c: clock assignment
Transitions: Delay s, c →δ s, c + δ provided c + δ | = I Instantaneous Action s, c →a s′, c[X := 0] provided c | = e Timed Traces (δ1, a1), . . . , (δn, an), . . .
SLIDE 10
Analysis
Model-checking: Reduction to finite state-space
SLIDE 11
Task Automata
Extension of timed automata with dynamic task generation.
◮ Tasks are associated with states and specified by
◮ worst and best execution times ◮ deadlines
◮ Tasks are scheduled by queuing
(e.g., shortest deadline first)
SLIDE 12
Operational semantics
Configuration s, c, q
◮ s: a state of the automaton ◮ c: clock assignment ◮ q: task queue (T, w, b, d)
◮ w: worst case execution time ◮ b: best case execution time ◮ d: deadline
SLIDE 13
Task Generation
Given a transition s
a
→ s′ with L(s′) = T(w, b, d) we have s, c, (T1, w1, b1, d1), . . . , (Tn, wn, bn, dn)
a
→ s′, c′, (T1, w1, b1, d1), . . . , (T, w, b, d), . . . , (Tn, wn, bn, dn)
SLIDE 14
Delay
s, c, (T1, w1, b1, d1), . . . , (Tn, wn, bn, dn)
δ
→ s, c′, (T1, w′
1, b′ 1, d′ 1), . . . , (Tn, wn, bn, d′ n)
where
◮ w′ 1 = w1 − δ ◮ b′ 1 = b1 − δ ◮ d′ i = di − δ ◮ c′ = c + δ
Termination condition: b1 ≤ 0.
SLIDE 15
Schedulability Analysis
Schedulability analysis = Reachability analysis
SLIDE 16
Results
Note: Upperbound of the queue = Σidi/wi
◮ Non-preemptive scheduling is decidable ◮ Scheduling is decidable for fixed execution times ◮ Schedulability in general is undecidable
SLIDE 17
Actors
Semantics of message handlers m = S: Internal Action S, q τ → S′, q Output m; S, q m → S, q Input Enabledness S, q m → S, q · m Message Handling nil, m · q τ → Sm, q Interleaving A τ → A′ . . . , A, . . . → . . . , A′, . . . Communication A m → A′, B m → B′ . . . , A, B, . . . → . . . , A′, B′ . . .
SLIDE 18
Extending Actors with Task Scheduling
◮ Timed automata specifications Tm of message handlers
(output actions: m(d))
◮ Scheduling (e.g., shortest deadline first)
SLIDE 19
Schedulability Analysis
Analysis of a single actor wrt a timed automaton specification D (driver) of the environment (input actions: m(d))
SLIDE 20
Operational Model
States s, s′, c, (T1, c1, d1), . . . , (Tn, cn, dn)
◮ s in Driver ◮ s′ in T1 ◮ c: clock assignment ◮ ci ≤ di
Transitions
◮ Interleaving of instantaneous (input and output)
actions
◮ Synchronization on delay
SLIDE 21
Summary
Construction of the Task Automaton: Tm1, . . . , Tmn, D ⇒ TA where
◮ Tmi: TA of method mi of actor A ◮ D: Driver
SLIDE 22
Modular Analysis: Design by Contract
Possible use Driver D Actual use Use case U Compatibility by refinement (trace inclusion): U ⊑ D Verification by deadlock analysis of synchronous product : U D (assuming D is deterministic)
SLIDE 23
Conformence Testing
Conformence by refinement (trace inclusion): S ⊑ ΠADA Falsification: Traces(S) \ Traces(ΠADA) = ∅ Test case (t1, R1), . . . , (tn, Rn)
◮ ti: Transition in ΠADA ◮ Ri: Alternative transitions (in ΠADA)
A deadlock in the synchronous product T S generates a counter-example
SLIDE 24
What Next?
◮ Application to the ASK system (Almende) ◮ Actors2Objects (synchronization) ◮ Real-time extension of concurrent objects ◮ Software Families: EU FET IP HATS project on
Highly Adaptable and Trustworthy Software Using Formal Models
◮ Distributed Implementation: Objective C
SLIDE 25