130 likes | 235 Views
This document provides a comprehensive analysis of Process Algebra (2IF45), focusing on the operating principles of probabilistic systems. It introduces key axioms related to TCP, including probabilistic choices in activities like chatting and thinking, exemplified by the Chatting Philosophers model. The model illustrates how philosophers decide between activities based on defined probabilities and includes a switcher managing the connections between them. Additionally, the text covers methods for analyzing nondeterminism and defining equivalence relations in Process Algebra.
E N D
Process Algebra (2IF45)Working with Probabilistic systems Dr. Suzana Andova
Axioms (not seen yet) of TCP(A, ) • x|| y = x╙y + y╙x + x | y, only if x=x+x and y=y+y • x || (y z) = (x || y) (x || z) • (x y) || z = (x || z) (y || z) • x | (y z) = (x | y) (x | z) • (x y) | z = (x | z) (y | z) • H(x y) = H(x) H(y) • x ╙ (y z) = (x ╙ y) (x ╙ z) • (x y) ╙ z = (x ╙ z) (y ╙ z) Process Algebra (2IF45)
Chatting Philosophers example • A chatting philosopher is a person dedicated to two activities: thinking and chatting. A philosopher uses his phone for chatting. He can decide to pick up the phone with probability pi, or stay thinking with probability 1-pi. Once he starts chatting, he end the call with probability ro, or keep chatting with probability 1-ro. • There is a switch which allocates connection to a philosopher, and also deallocating a connection. Our switcher is capable of handling only one connection at time. Switcher (2) Philosopher deall2 deall1 deall Think S 1 1-pi 2 ro all1 pi all2 all Chat 1-ro Process Algebra (2IF45)
Chatting Philosophers example • A chatting philosopher is a person dedicated to two activities: thinking and chatting. A philosopher uses his phone for chatting. He can decide to pick up the phone with probability pi, or stay thinking with probability 1-pi. Once he starts chatting, he end the call with probability ro, or keep chatting with probability 1-ro. • There is a switch which allocates connection to a philosopher, and also deallocating a connection. Our switcher is capable of handling only one connection at time. • We consider a system of two philosophers and one switcher • First, we compute Phil1 || Phil2, where Phili = Thinki Process Algebra (2IF45)
Chatting Philosophers example tick (1-)(1-) (1-) (1-) S,T1,T2 tick tick deall2 deall1 all1 all2 S1,C1,T2 S2,T1,C2 all1 all2 1- 1- tick tick Process Algebra (2IF45)
Chatting Philosophers example tick (1-)(1-) (1-) (1-) S,T1,T2 tick tick deall2 deall1 all1 all2 S1,C1,T2 S2,T1,C2 all1 all2 1- 1- tick tick max\min Process Algebra (2IF45)
Chatting Philosophers example all2 all1 all1 all2 tick tick all2 all1 tick all1 all2 tick tick tick Process Algebra (2IF45)
Chatting Philosophers example all2 all1 all1 all2 tick tick tick all1 all2 tick tick tick all1 all2 Process Algebra (2IF45)
Chatting Philosophers example (small change) tick (1-)(1-) (1-) (1-) S,T1,T2 tick tick deall2 deall1 all1 all2 S1,C1,T2 S2,T1,C2 all1 all2 1- 1- tick tick max\min Process Algebra (2IF45)
Schedulers • Resolves nondeterminism • Allows for analysis (min/max) • Needed to define equivalence relations (with silent transitions) Process Algebra (2IF45)
Chatting Philosophers example (cont.) tick (1-)(1-) (1-) (1-) S,T1,T2 tick tick deall2 deall1 all1 all2 S1,C1,T2 S2,T1,C2 all1 all2 1- 1- tick tick Process Algebra (2IF45)
Chatting Philosophers example (cont) 2 1 3 S R S = s1(x).Sx Sx = i.s2(x).1 + i.s2(err).Sx R = r2(x).r3(x).1 + r2(err).R Sys Sys = H(S || R) Sys =s1(x). H(Sx || R) H(Sx || R) = i.c2(x).s3(x).1 +i. c2(err). H(Sx || R) s1(x) i i c2(err) c2(x) s3(x) Process Algebra (2IF45)
ABP with unreliable channels 2 3 1 K 4 S R 5 6 L S = S0 S1 S Sn = d r1(d).Snd Snd = s2(dn). Tnd Tnd = r6(1-n).Snd + s6(err).Snd + r6(n).1 R = R1 R0 R Rn = r3(err).s5(n).Rn + d,n r3(dn).s5(n).Rn + d,n r3(d(1-n)).s4(d).s5(1-n).1 K = d,n r2(dn).(i.s3(dn).K + i.s3(err).K) L = n r5(n).(i.s6(n).K + i.s6(err).L) Specify K and L with probabilistic choice operator. Derive the spec. of the whole system Process Algebra (2IF45)