Modeling and Analysis of Real -Time Systems with Mutex Components - - PowerPoint PPT Presentation

modeling and analysis of real time systems with mutex
SMART_READER_LITE
LIVE PREVIEW

Modeling and Analysis of Real -Time Systems with Mutex Components - - PowerPoint PPT Presentation

Modeling and Analysis of Real -Time Systems with Mutex Components APDCM10 Guoqiang Li 1 , Xiaojuan Cai 1 ,Shoji Yuen 2 1 BASICS, Shanghai Jiao Tong University 2 Graduate School of Information Science, Nagoya University 19th, April. 2010


slide-1
SLIDE 1

Modeling and Analysis of Real -Time Systems with Mutex Components

APDCM’10

Guoqiang Li1, Xiaojuan Cai1,Shoji Yuen2

1BASICS, Shanghai Jiao Tong University 2Graduate School of Information Science, Nagoya University

19th, April. 2010

1 / 19 APDCM’10

slide-2
SLIDE 2

Backgrounds and Aims

Formal models for complex real-timed systems (e.g. timed automata). A real-time system consists of several functionally independent components that interact with each other, e.g. processors, controllers, various chips, etc.

Synchronization is modeled by parallel composition of timed automata [RTSS’95] Mutex . . .

In synthesis of a whole system, the “global” control of components is a key issue in design. Whether such a synthesis is decidable?

2 / 19 APDCM’10

slide-3
SLIDE 3

Timed Automata

[Alur & Dill TCS 94]

x ≤ 6 x ≤ 5

a, x := 0, y := 0 y > 25

x ≥ 5, y ≤ 25, x := 0

b, x := 0, y := 0 y > 30

x ≥ 6, y ≤ 30, x := 0 3 / 19 APDCM’10

slide-4
SLIDE 4

Parallel Composition

[Wang Yi et. al. RTSS’95] Actions are divided into two disjoint sets Σ = E ∪ H, for external and internal actions respectively. External actions E are partitioned to two disjoint sets E = Eo ∪ Ei, for triggering symbols, ranged over by a!, b!, . . ., and triggered symbols, ranged over by a?, b?, . . ..

  • ff

dim bright press? x:=0 x<=10 press? x>10 press? press?

  • x < 10

press!, x := 0 press!, x ≥ 10, x := 0 4 / 19 APDCM’10

slide-5
SLIDE 5

Why Need Controller Automata?

Usually, mutex can be implemented by synchronization. However, in real-time system, time in an awaited component will elapse when it hangs up. There are three relations for two mutex components:

Competition e.g., Reading/Writing a shared buffer Preemption and Resumption e.g., Interrupt

Controller automata provide global controls among a group of timed automata.

5 / 19 APDCM’10

slide-6
SLIDE 6

Controller Automata

Controller automata provide transitions for timed automata that represents different components. There are three kinds of transitions, push, pop and internal actions.

x1 < 2 x1 < 2 W TP

x ≥ 2, x1 := 0

W TP , x1 ≥ 2 ∧ y1 ≤ 25, x1 := 0 x2 < 3 x2 < 3 RDP

x2 ≥ 3, x2 := 0

RDP , x2 ≥ 3 ∧ y2 ≤ 30, x2 := 0

release! require? release! require?

= ⇒∈ δint

6 / 19 APDCM’10

slide-7
SLIDE 7

An Example: Reading/Writing with Priority

x1 < 2 x1 < 2

I. II.

W TP

x1 ≥ 2, x1 := 0

W TP , x1 ≥ 2 ∧ y1 ≤ 25, x1 := 0 x2 < 3 x2 < 3 ERR RDP

x2 ≥ 3, x2 := 0

y

2

≥ 20 RDP , x2 ≥ 3 ∧ y2 ≤ 30, x2 := 0

releaseW ! requireW ? releaseR! requireR? requireW ? : δpush : δpop 7 / 19 APDCM’10

slide-8
SLIDE 8

Time Lag in Timed Automata

When a timed automaton is preempted by another one, the system will stop running current timed automaton, store the current status, and begin to run the latter timed automaton. A time lag adds a location and a fresh clock to wait a certain time when preempted by another timed automata.

x ≤ 6

x := 0, y := 0 y > 25

x ≥ 5, y ≤ 25, x := 0

x := 0, y := 0 y > 30

x ≥ 6, y ≤ 30, x := 0 8 / 19 APDCM’10

slide-9
SLIDE 9

Time Lag in Timed Automata

When a timed automaton is preempted by another one, the system will stop running current timed automaton, store the current status, and begin to run the latter timed automaton. A time lag adds a location and a fresh clock to wait a certain time when preempted by another timed automata.

x ≤ 6 xp ≤ 0∨ xp ≥ t

x := 0, y := 0, xp := 0 y > 25

x ≥ 5, y ≤ 25, x := 0, xp := 0

x := 0, y := 0 y > 30

x ≥ 6, y ≤ 30, x := 0 xp ≤ t

xp ≥ t

9 / 19 APDCM’10

slide-10
SLIDE 10

Running Controller Automata

1 pat?, x := 0 pat?, x < 2 2 triggerp!, x ≥ 2,x := 0 x > 25 3 pat?, x := 0 p a t ? , x < 2 4 triggerq!, 2 ≤ x ≤ 25,x := 0 5 pat?, x := 0 triggerq!, 2 ≤ x ≤ 30, x := 0 pat?, x < 2 x > 3 xrun ≤ 150 1 xrun ≤ 50 turn?, ⊤, ∅ apop⊤, ∅ bpop ⊤ , ∅ pat?, ⊤, ∅ turn?, ⊤, ∅ cpop, ⊤, ∅ : δpush : δpop

10 / 19 APDCM’10

slide-11
SLIDE 11

Running Controller Automata

1 pat?, x := 0 pat?, x < 2 2 triggerp!, x ≥ 2,x := 0 x > 25 3 pat?, x := 0 p a t ? , x < 2 4 triggerq!, 2 ≤ x ≤ 25,x := 0 5 pat?, x := 0 triggerq!, 2 ≤ x ≤ 30, x := 0 pat?, x < 2 x > 3 xrun ≤ 150 1 xrun ≤ 50 turn?, ⊤, ∅ apop⊤, ∅ bpop ⊤ , ∅ pat?, ⊤, ∅ turn?, ⊤, ∅ cpop, ⊤, ∅ : δpush : δpop

(S0, 0) 11 / 19 APDCM’10

slide-12
SLIDE 12

Running Controller Automata

1 pat?, x := 0 pat?, x < 2 2 triggerp!, x ≥ 2,x := 0 x > 25 3 pat?, x := 0 p a t ? , x < 2 4 triggerq!, 2 ≤ x ≤ 25,x := 0 5 pat?, x := 0 triggerq!, 2 ≤ x ≤ 30, x := 0 pat?, x < 2 x > 3 xrun ≤ 150 1 xrun ≤ 50 turn?, ⊤, ∅ apop⊤, ∅ bpop ⊤ , ∅ pat?, ⊤, ∅ turn?, ⊤, ∅ cpop, ⊤, ∅ : δpush : δpop

(S0, 0) 12 / 19 APDCM’10

slide-13
SLIDE 13

Running Controller Automata

1 pat?, x := 0 pat?, x < 2 2 triggerp!, x ≥ 2,x := 0 x > 25 3 pat?, x := 0 p a t ? , x < 2 4 triggerq!, 2 ≤ x ≤ 25,x := 0 5 pat?, x := 0 triggerq!, 2 ≤ x ≤ 30, x := 0 pat?, x < 2 x > 3 xrun ≤ 150 1 xrun ≤ 50 turn?, ⊤, ∅ apop⊤, ∅ bpop ⊤ , ∅ pat?, ⊤, ∅ turn?, ⊤, ∅ cpop, ⊤, ∅ : δpush : δpop

(S0, 0) 13 / 19 APDCM’10

slide-14
SLIDE 14

Running Controller Automata

1 pat?, x := 0 pat?, x < 2 2 triggerp!, x ≥ 2,x := 0 x > 25 3 pat?, x := 0 p a t ? , x < 2 4 triggerq!, 2 ≤ x ≤ 25,x := 0 5 pat?, x := 0 triggerq!, 2 ≤ x ≤ 30, x := 0 pat?, x < 2 x > 3 xrun ≤ 150 1 xrun ≤ 50 turn?, ⊤, ∅ apop⊤, ∅ bpop ⊤ , ∅ pat?, ⊤, ∅ turn?, ⊤, ∅ cpop, ⊤, ∅ : δpush : δpop

(S0, 0) 14 / 19 APDCM’10

slide-15
SLIDE 15

Running Controller Automata

1 pat?, x := 0 pat?, x < 2 2 triggerp!, x ≥ 2,x := 0 x > 25 3 pat?, x := 0 p a t ? , x < 2 4 triggerq!, 2 ≤ x ≤ 25,x := 0 5 pat?, x := 0 triggerq!, 2 ≤ x ≤ 30, x := 0 pat?, x < 2 x > 3 xrun ≤ 150 1 xrun ≤ 50 turn?, ⊤, ∅ apop⊤, ∅ bpop ⊤ , ∅ pat?, ⊤, ∅ turn?, ⊤, ∅ cpop, ⊤, ∅ : δpush : δpop

(S1, 3) (S0, 0) 15 / 19 APDCM’10

slide-16
SLIDE 16

Running Controller Automata

1 pat?, x := 0 pat?, x < 2 2 3′ triggerp!, x ≥ 2,x := 0 x > 25 3 pat?, x := 0 p a t ? , x < 2 4 triggerq!, 2 ≤ x ≤ 25,x := 0 5 pat?, x := 0 triggerq!, 2 ≤ x ≤ 30, x := 0 pat?, x < 2 x > 3 xrun ≤ 150 1 xrun ≤ 50 turn?, ⊤, ∅ apop⊤, ∅ bpop ⊤ , ∅ pat?, ⊤, ∅ turn?, ⊤, ∅ cpop, ⊤, ∅ : δpush : δpop

(S0, 0) 16 / 19 APDCM’10

slide-17
SLIDE 17

Decidability Problems of Controller Automata

Some comments...

controller automata are not beyond timed (pushdown) automata... controller automata are stopwatch pushdown automata...

Controller automata are less expressive than stopwatch automata

  • Fact. the frozen clocks are kept zero in CA.

The decidability problems (e.g. reachability problem) of controller automata are in general undecidable.

Infinite insertion of fresh clocks and control locations.

With a strict partial order on the state, an ordered controller automaton can be translated to a timed automaton.

17 / 19 APDCM’10

slide-18
SLIDE 18

Conclusion

Controller automata are introduced, to perform global control on complex real-time systems. Analysis techniques (e.g. reachability) of controller automata are investigated. Future work:

Theoretical approaches: to investigate the languages category recognized by controller automata. Practical approaches: to verify properties for complex real-time systems, e.g. liveness Implementation work: translate an OCA to a timed automaton recognized by UPPAAL.

18 / 19 APDCM’10

slide-19
SLIDE 19

Thank You!

li.g@sjtu.edu.cn

19 / 19 APDCM’10