Tasks for Actors Frank S. de Boer Main Problem Modeling and - - PowerPoint PPT Presentation

tasks for actors
SMART_READER_LITE
LIVE PREVIEW

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-1
SLIDE 1

Tasks for Actors

Frank S. de Boer

slide-2
SLIDE 2

Main Problem

Modeling and analysis of real-time distributed software systems

slide-3
SLIDE 3

Main Approach

Executable modeling language for concurrent objects

slide-4
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
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
SLIDE 6

Actors

No

◮ inter-object (return) ◮ intra-object (suspended processes)

synchronization

slide-7
SLIDE 7

Technical Overview

◮ Timed Automata ◮ Task Automata ◮ Actors ◮ Tasks for Actors ◮ Conclusion

slide-8
SLIDE 8

Timed Automata

Clocks Real-valued States Delay:

◮ Invariant

Transitions Instantaneous actions:

◮ Enabling condition ◮ Reset

slide-9
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
SLIDE 10

Analysis

Model-checking: Reduction to finite state-space

slide-11
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
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
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
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
SLIDE 15

Schedulability Analysis

Schedulability analysis = Reachability analysis

slide-16
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
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
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
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
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
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
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
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
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
SLIDE 25

References

◮ Credo: http://credo.cwi.nl. ◮ E. B. Johnsen and O. Owe.

An Asynchronous Communication Model for Distributed Concurrent Objects. Software and Systems Modeling.

◮ E. Fersman, P. Krcal, P. Pettersson, and W. Yi.

Task automata: Schedulability, decidability and undecidability. Information and Computation.

◮ M. M. Jaghoori, F. S. de Boer, T. Chothia, and M. Sirjani.

Schedulability of asynchronous real-time concurrent objects. Journal of Logic and Algebraic Programming.

◮ F.S. de Boer, T. Chothia and M. M. Jaghoori.

Modular Schedulability Analysis of Concurrent Objects in Creol. FSEN 2009, LNCS.