Theorie van Concurrency najaar 2011 - - PowerPoint PPT Presentation

theorie van concurrency
SMART_READER_LITE
LIVE PREVIEW

Theorie van Concurrency najaar 2011 - - PowerPoint PPT Presentation

Theorie van Concurrency najaar 2011 http://www.liacs.nl/home/rvvliet/tvc/ derde college: 13 september 2011 4.4 Concurrency 4.5 Fundamental Situations eerste werkcollege: 15 september 2011 opgaven bij 4. EN Systems installatie pipe2 1


slide-1
SLIDE 1

Theorie van Concurrency

najaar 2011 http://www.liacs.nl/home/rvvliet/tvc/ derde college: 13 september 2011 4.4 Concurrency 4.5 Fundamental Situations eerste werkcollege: 15 september 2011

  • pgaven bij 4. EN Systems

installatie pipe2

1

slide-2
SLIDE 2

Theorie van Concurrency — najaar 2011 http://www.liacs.nl/home/rvvliet/tvc/

  • hoorcollege/werkgroep ∼ 2/1

Gecorrigeerde data: dinsdag 6 september - 25 oktober, zaal 403, 11.15–13.00 donderdag 8 september - 27 oktober, zaal 403, 11.15–13.00 donderdag 3 november - 8 december, zaal 403, 10.00–13.00

  • dictaat + survey paper
  • opgavenbundel + oplossingen + oude tentamens

Samen voor EUR 10,50

  • modelleertoets, donderdag 17 november 2011, 10:00–13:00

2

slide-3
SLIDE 3

Definition 13. Let M = (P, T, F, Cin) be an EN system. (1) Let U ⊆ T. U is a disjoint set of transitions, notation disj(U), if 1. U = ∅ and 2. for all transitions t1 = t2 ∈ U: nbh(t1) ∩ nbh(t2) = ∅. (2) Let U ⊆ T and let C ⊆ P. Then U has concession in C (or U can be fired in C, or U is enabled in C) if

  • 1. disj(U), 2. •U ⊆ C, and 3. U• ∩ C = ∅.

Notation: U con C. (3) Let U ⊆ T and let C, D ⊆ P. Then U fires from C to D, written as C[UD, if

  • 1. U con C and 2. D = (C − •U) ∪ U•.

If #U ≥ 2, then U is a concurrent step from C to D.

3

slide-4
SLIDE 4

Lemma 15. Let M = (P, T, F, Cin) be an EN system. Let C ⊆ P and let U ⊆ T with U = ∅. Then U con C iff (1) t con C for all t ∈ U, and (2) for all t1 = t2 ∈ U, •t1 ∩ •t2 = ∅ and t1• ∩ t2• = ∅.

4

slide-5
SLIDE 5

Lemma 16. Let M = (P, T, F, Cin) be an EN system. Let C, D ⊆ P, and let U ⊆ T. Let {U1, U2} be a partition of U.∗ If C[UD, then there is E1 ⊆ P such that C[U1E1 and E1[U2D.

∗ U = U1 ∪ U2, U1 ∩ U2 = ∅ and U1, U2 = ∅

5

slide-6
SLIDE 6

D U1

  • U1

U U2• E2 U2

  • U1

C U1 U2 E1 U1• U1• U2•

  • U2
  • U2
  • Fig. 17. A diamond.

6

slide-7
SLIDE 7

p2bc1 p2c2 p1c2 p2bc2 p1bc2 p2c1 p1c1 p c c c p c pc p1bc1 p p pe pc e f f e fc

  • Fig. 18. A configuration graph.

7

slide-8
SLIDE 8

Lemma 17. Let M = (P, T, F, Cin) be an EN system. Let C, D ⊆ P and let U ⊆ T. If C[UD, then C[t1 · · · tnD for each ordering (t1, . . . , tn) of the elements of U.

8

slide-9
SLIDE 9

p1bc1 p2bc1 p2c2 p1c2 p2bc2 p1bc2 p2c1 p1c1 p c c p c p p c e e f f

  • Fig. 16. A sequential configuration graph.

9

slide-10
SLIDE 10

p2bc1 p2c2 p1c2 p2bc2 p1bc2 p2c1 p1c1 p c c c p c pc p1bc1 p p pe pc e f f e fc

  • Fig. 18. A configuration graph.

10

slide-11
SLIDE 11

Lemma 19. Let M = (P, T, F, Cin) be an EN system. Let C ⊆ P and let s, t ∈ T. If st con C and t con C, then {s, t} con C.

11

slide-12
SLIDE 12

Lemma 15. Let M = (P, T, F, Cin) be an EN system. Let C ⊆ P and let U ⊆ T with U = ∅. Then U con C iff (1) t con C for all t ∈ U, and (2) for all t1 = t2 ∈ U, •t1 ∩ •t2 = ∅ and t1• ∩ t2• = ∅.

12

slide-13
SLIDE 13

Lemma 19.5 Let M = (P, T, F, Cin) be an EN system. Let C ⊆ P and let U ⊆ T. If ti con C for every ti ∈ U and t1t2 . . . tn con C for some order of the elements of U = {t1, t2, . . . , tn}, then U con C.

13

slide-14
SLIDE 14

Theorem 20. Let M = (P, T, F, Cin) be an EN system. Let C, D ⊆ P and let U ⊆ T with U = ∅. Then (1) U con C iff t1 · · · tn con C for every ordering (t1, . . . , tn) of the elements of U, and (2) C[UD iff C[t1 · · · tnD for every ordering (t1, . . . , tn) of the elements of U.

14

slide-15
SLIDE 15

Lemma 17. Let M = (P, T, F, Cin) be an EN system. Let C, D ⊆ P and let U ⊆ T. If C[UD, then C[t1 · · · tnD for each ordering (t1, . . . , tn) of the elements of U.

15

slide-16
SLIDE 16

Definition 10. Let G1 = (V1, Γ1, Σ1, v1) and G2 = (V2, Γ2, Σ2, v2) be edge-labelled graphs. Then G1 and G2 are isomorphic, denoted by G1 ≡ G2, if there exist two bijections α : V1 → V2 and β : Σ1 → Σ2 such that α(v1) = v2 and, for all v, w ∈ V1 and all U ⊆ Σ1, (v, U, w) ∈ Γ1 iff (α(v), β(U), α(w)) ∈ Γ2.

16

slide-17
SLIDE 17

Theorem 21. For EN systems M and M′, SCG(M) ≡ SCG(M′) iff CG(M) ≡ CG(M′).

17

slide-18
SLIDE 18

t1 t2 t2 t1

  • Fig. 19, 20. Causality.

18

slide-19
SLIDE 19

t1 t2

  • Fig. 21. Concurrency.

19

slide-20
SLIDE 20

t1 t2 P C

  • t1
  • t2

t2• t1• P − C

  • Fig. 22. Concurrency, the complete picture.

20

slide-21
SLIDE 21

Causality: t1t2 con C, but not t2 con C. Concurrency: t1t2 con C, and t2 con C (Lemma 17 and Lemma 19). Hence, if t1t2 con C, then either causality or concurrency.

21

slide-22
SLIDE 22

Definition: Transitions t1 and t2 are in conflict in configuration C, if t1 con C and t2 con C, but not {t1, t2} con C.

22

slide-23
SLIDE 23

w1 w2 c1 p c2 d1 d2 r2 r1 component 1 component 2 in1 in2

  • ut1
  • ut2
  • Fig. 5. The mutual exclusion problem.

23

slide-24
SLIDE 24
  • t1

t1 t2

  • t2
  • Fig. 23. Input-conflict.

24

slide-25
SLIDE 25

t1 t2 t1• t2•

  • Fig. 24. Output-conflict.

25

slide-26
SLIDE 26

Concurrency: {t1, t2} con C, hence t1, t2 con C (Lemma 15). Conflict: t1, t2 con C, but not {t1, t2} con C. Hence, if t1, t2 con C, then either concurrency or conflict.

26

slide-27
SLIDE 27

Definition 23. Let M = (P, T, F, Cin) be an EN system. Let C ∈ CM, and let t ∈ T be such that t con C. Then cfl(t, C) = {t′ ∈ T | t′ con C and ¬ {t, t′} con C} is the conflict set of t in C.

27

slide-28
SLIDE 28

Definition 22. An EN system M = (P, T, F, Cin) is conflict-free if, for every C ∈ CM and all transitions t1, t2 ∈ T: {t1, t2} con C whenever t1 con C and t2 con C.

28

slide-29
SLIDE 29

p1 c2 c1 p b c f e p2

  • Fig. 12. Conflict-free.

29

slide-30
SLIDE 30

p1 p3 p5 t2 p2 p4 p6 t1 t3

  • Fig. 25. A conflict-increasing confusion.

30

slide-31
SLIDE 31

Definition 24. Let M = (P, T, F, Cin) be an EN system. Let C ∈ CM, and let t1, t2 ∈ T. The triple (C, t1, t2) is called a confusion (in C) if

  • 1. t1 = t2,
  • 2. {t1, t2} con C, and
  • 3. cfl(t1, C) = cfl(t1, D), where C[t2D.

M is confused in C if there is a confusion in C.

31

slide-32
SLIDE 32

p5 t1 t3 p3 p1 p2 p4 t2

  • Fig. 26. A conflict-decreasing confusion.

32

slide-33
SLIDE 33

Definition 25 Let M = (P, T, F, Cin) be an EN system. Let C ∈ CM and t1, t2 ∈ T. Let γ = (C, t1, t2) be a confusion and C[t2D. (1) γ is a conflict-increasing confusion, ci confusion for short, if

cfl(t1, D) cfl(t1, C).

(2) γ is a conflict-decreasing confusion, cd confusion for short, if cfl(t1, D) cfl(t1, C).

33

slide-34
SLIDE 34

p5 t3 p7 p1 t1 t4 t2 p6 p4 p2 p3

  • Fig. 27. A confusion which is neither ci nor cd.

34

slide-35
SLIDE 35

p3 p1 t1 t4 p4 t3 p2 p5 p6 t2

  • Fig. 28. A symmetric confusion.

Definition 26. Let M = (P, T, F, Cin) be an EN system. Let C ∈ CM and t1, t2 ∈ T. Let γ = (C, t1, t2) be a confusion. γ is symmetric if (C, t2, t1) is also a confusion, otherwise γ is asymmetric.

35

slide-36
SLIDE 36

Consider the EN system Mutex (Figure 5). Give CG(Mutex) and determine all confusions (C, t1, t2) with C ∈ CMutex. Give - if possible - examples of confusions which are conflict-increasing, conflict-decreasing, neither and in addition (a)symmetric. Prove: every confusion which is not ci is symmetric.

36