theorie van concurrency
play

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


  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 opgaven bij 4. EN Systems installatie pipe2 1

  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

  3. Definition 13. Let M = ( P, T, F, C in ) 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 t 1 � = t 2 ∈ U : nbh ( t 1 ) ∩ nbh ( t 2 ) = ∅ . (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 [ U � D , 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

  4. Lemma 15. Let M = ( P, T, F, C in ) 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 t 1 � = t 2 ∈ U , • t 1 ∩ • t 2 = ∅ and t 1 • ∩ t 2 • = ∅ . 4

  5. Let M = ( P, T, F, C in ) be an EN system. Let Lemma 16. C, D ⊆ P , and let U ⊆ T . Let { U 1 , U 2 } be a partition of U . ∗ If C [ U � D , then there is E 1 ⊆ P such that C [ U 1 � E 1 and E 1 [ U 2 � D . ∗ U = U 1 ∪ U 2 , U 1 ∩ U 2 = ∅ and U 1 , U 2 � = ∅ 5

  6. C • U 1 • U 2 U 1 U 2 E 2 U 2 • U 1 • U • U 1 • U 2 E 1 U 2 U 1 U 2 • U 1 • D Fig. 17. A diamond. 6

  7. p 1 bc 1 c p e pe fc p 2 bc 1 p 1 c 2 e p c pc pc p 1 c 1 p 2 c 2 f c p p 1 bc 2 p 2 c 1 f c p p 2 bc 2 Fig. 18. A configuration graph. 7

  8. Let M = ( P, T, F, C in ) be an EN system. Let Lemma 17. C, D ⊆ P and let U ⊆ T . If C [ U � D , then C [ t 1 · · · t n � D for each ordering ( t 1 , . . . , t n ) of the elements of U . 8

  9. p 1 bc 1 c p e p 2 bc 1 p 1 c 2 e p c p 1 c 1 p 2 c 2 f c p p 1 bc 2 p 2 c 1 f c p p 2 bc 2 Fig. 16. A sequential configuration graph. 9

  10. p 1 bc 1 c p e pe fc p 2 bc 1 p 1 c 2 e p c pc pc p 1 c 1 p 2 c 2 f c p p 1 bc 2 p 2 c 1 f c p p 2 bc 2 Fig. 18. A configuration graph. 10

  11. Lemma 19. Let M = ( P, T, F, C in ) 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

  12. Lemma 15. Let M = ( P, T, F, C in ) 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 t 1 � = t 2 ∈ U , • t 1 ∩ • t 2 = ∅ and t 1 • ∩ t 2 • = ∅ . 12

  13. Lemma 19.5 Let M = ( P, T, F, C in ) be an EN system. Let C ⊆ P and let U ⊆ T . If t i con C for every t i ∈ U and t 1 t 2 . . . t n con C for some order of the elements of U = { t 1 , t 2 , . . . , t n } , then U con C . 13

  14. Let M = ( P, T, F, C in ) be an EN system. Let Theorem 20. C, D ⊆ P and let U ⊆ T with U � = ∅ . Then (1) U con C iff t 1 · · · t n con C for every ordering ( t 1 , . . . , t n ) of the elements of U , and (2) C [ U � D iff C [ t 1 · · · t n � D for every ordering ( t 1 , . . . , t n ) of the elements of U . 14

  15. Let M = ( P, T, F, C in ) be an EN system. Let Lemma 17. C, D ⊆ P and let U ⊆ T . If C [ U � D , then C [ t 1 · · · t n � D for each ordering ( t 1 , . . . , t n ) of the elements of U . 15

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

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

  18. t 1 t 2 t 2 t 1 Fig. 19 , 20. Causality. 18

  19. t 1 t 2 Fig. 21. Concurrency. 19

  20. • t 1 • t 2 P C t 1 t 2 P − C t 1 • t 2 • Fig. 22. Concurrency, the complete picture. 20

  21. Causality: t 1 t 2 con C , but not t 2 con C . Concurrency: t 1 t 2 con C , and t 2 con C (Lemma 17 and Lemma 19). Hence, if t 1 t 2 con C , then either causality or concurrency. 21

  22. Definition: Transitions t 1 and t 2 are in conflict in configuration C , if t 1 con C and t 2 con C , but not { t 1 , t 2 } con C . 22

  23. w 1 w 2 in 1 in 2 c 1 p c 2 out 1 out 2 r 1 r 2 d 1 d 2 component 1 component 2 Fig. 5. The mutual exclusion problem. 23

  24. • t 2 • t 1 t 1 t 2 Fig. 23. Input-conflict. 24

  25. t 1 t 2 t 1 • t 2 • Fig. 24. Output-conflict. 25

  26. Concurrency: { t 1 , t 2 } con C , hence t 1 , t 2 con C (Lemma 15). Conflict: t 1 , t 2 con C , but not { t 1 , t 2 } con C . Hence, if t 1 , t 2 con C , then either concurrency or conflict. 26

  27. Let M = ( P, T, F, C in ) be an EN system. Let Definition 23. C ∈ C M , 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

  28. Definition 22. An EN system M = ( P, T, F, C in ) is conflict-free if, for every C ∈ C M and all transitions t 1 , t 2 ∈ T : { t 1 , t 2 } con C whenever t 1 con C and t 2 con C . 28

  29. p 1 c 1 e p b p 2 c 2 f c Fig. 12. Conflict-free. 29

  30. p 2 t 2 p 1 p 3 p 4 t 1 t 3 p 5 p 6 Fig. 25. A conflict-increasing confusion. 30

  31. Let M = ( P, T, F, C in ) be an EN system. Let Definition 24. C ∈ C M , and let t 1 , t 2 ∈ T . The triple ( C, t 1 , t 2 ) is called a confusion ( in C ) if 1. t 1 � = t 2 , 2. { t 1 , t 2 } con C , and 3. cfl ( t 1 , C ) � = cfl ( t 1 , D ), where C [ t 2 � D . M is confused in C if there is a confusion in C . 31

  32. p 1 p 2 t 1 t 3 t 2 p 5 p 4 p 3 Fig. 26. A conflict-decreasing confusion. 32

  33. Definition 25 Let M = ( P, T, F, C in ) be an EN system. Let C ∈ C M and t 1 , t 2 ∈ T . Let γ = ( C, t 1 , t 2 ) be a confusion and C [ t 2 � D . (1) γ is a conflict-increasing confusion , ci confusion for short, if cfl ( t 1 , D ) � cfl ( t 1 , C ). (2) γ is a conflict-decreasing confusion , cd confusion for short, if cfl ( t 1 , D ) � cfl ( t 1 , C ). 33

  34. t 2 p 2 p 1 p 4 p 3 t 3 t 1 t 4 p 5 p 6 p 7 Fig. 27. A confusion which is neither ci nor cd. 34

  35. p 1 p 3 t 1 t 2 p 4 p 2 t 4 t 3 p 5 p 6 Fig. 28. A symmetric confusion. Let M = ( P, T, F, C in ) be an EN system. Let Definition 26. C ∈ C M and t 1 , t 2 ∈ T . Let γ = ( C, t 1 , t 2 ) be a confusion. γ is symmetric if ( C, t 2 , t 1 ) is also a confusion, otherwise γ is asymmetric . 35

  36. Consider the EN system Mutex (Figure 5). Give CG(Mutex) and determine all confusions ( C, t 1 , t 2 ) with C ∈ C Mutex. 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

Recommend


More recommend