2 notation p k q where α p k q α p α q 3 execution

Info icon This preview shows pages 8–16. Sign up to view the full content.

View Full Document Right Arrow Icon
(2) Notation: P k Q . where α ( P k Q ) = α ( P ) α ( Q ) (3) Execution Mechanism: (a) When such processes are assembled to run concurrently, events that are in both their alphabets require simultaneous participation of both P and Q. (b) Events in the alphabet of P but not in the alphabet of Q are of no concern to Q. Such events may occur independently of Q whenever P engages in them. (c) Another similar to (b) 8
Image of page 8

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
& $ % Examples of Concurrency (1) Let NOISY V M = { coin, choc, clink, clunk, toffee } , where clink is the sound of a coin dropping into the moneybox of a noisy vending machine, and clunk is the sound made by the vending machine on completion of a transaction. The noisy vending machine has run out of toffee NOISY V M = ( coin clink choc clunk NOISY V M ) The customer of this machine definitely prefers toffee; the curse is what he utters when he fails to get it; he then has to take a chocolate instead αCUST = { coin, choc, curse, toffee } CUST = ( coin ( toffee CUST | curse choc CUST )) The result of the concurrent activity of these two processes is ( NOISY V M || CUST ) = μX ( coin ( clink curse choc clunk X | curse clink choc clunk X )) 9
Image of page 9
& $ % Laws of Concurrency L1,2 || is symmetric and associative L3A P || STOP αP = STOP αP L3B P || RUN αP = P Let a ( αP - αQ ), b ( αQ - αP ) and { c, d } ⊆ ( αP αQ ). The following laws show the way in which P engages alone in a , Q engages alone in b , but c and d require simultaneous participation of both P and Q . L4A ( c P ) || ( c Q ) = c ( P || Q ) 10
Image of page 10

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
& $ % L4B ( c P ) || ( d Q ) = STOP if c 6 = d L5A ( a P ) || ( c Q ) = a ( P || ( c Q )) L5B ( c P ) || ( b Q ) = b (( c P ) || Q ) L6 ( a P ) || ( b Q ) = ( a ( P || ( b Q )) | b (( a P ) || Q )) 11
Image of page 11
& $ % These laws can be generalised to deal with the general choice operator. L7 Let P = ( x : A P ( x )) and Q = ( y : B Q ( y )) Then ( P || Q ) = ( z : C P 0 || Q 0 ) where C = ( A B ) ( A - αQ ) ( B - αP ) and P 0 = P ( z ) if z A P 0 = P otherwise and Q 0 = Q ( z ) if z B Q 0 = Q otherwise. 12
Image of page 12

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
& $ % These laws permit a process defined by concurrency to be redefined without that operator, as shown in the following example. Example X1 Let αP = { a, c } and P = ( a c P ) αQ = { b, c } Q = ( c b Q ) P || Q = ( a c P ) || ( c b Q ) [by definition] = a (( c P ) || ( c b Q )) [by L5A] = a c ( P || ( b Q )) [by L4A. . . ] Also P || ( b Q ) = ( a ( c P ) || ( b Q ) | b ( P || Q )) [by L6] 13
Image of page 13
& $ % = ( a b (( c P ) || Q ) | b ( P || Q )) [by L5B] = ( a b c ( P || ( b Q )) | b a c ( P || ( b Q ))) [by above] = μX ( a b c X | b a c X ) [since this is guarded] Therefore ( P || Q ) = ( a c X ( a b c X | b a c X )) by above 14
Image of page 14

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
& $ % Example: The Dining Philosophers (1) Describing the example: In ancient times, a wealthy philanthropist endowed a College to accommodate five eminent philosophers. Each philosopher had a room in which he could engage in his professional activity of thinking; there was also a common dining room, furnished with a circular table, surrounded by five chairs, each labelled by the name of the philosopher who was to sit in it. The names of the philosophers were PHIL0, PHIL1,
Image of page 15
Image of page 16
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern