Download presentation

Presentation is loading. Please wait.

Published byMuhammad Heatherington Modified over 2 years ago

1
Paris, 3 Dec 2007MPRI Course on Concurrency MPRI – Course on Concurrency Lecture 12 Probabilistic process calculi Catuscia Palamidessi LIX, Ecole Polytechnique catuscia@lix.polytechnique.fr www.lix.polytechnique.fr/~catuscia Page of the course: http://mpri.master.univ-paris7.fr/C-2-3.html

2
Paris, 3 Dec 2007MPRI Course on Concurrency 2 Plan of the lecture Motivations The power of randomization –Problems in distributed systems that can only be solved with the use of randomization Dining Philosophers Probabilistic automata –Examples Probabilistic CCS –Operational rules Semantics

3
Paris, 3 Dec 2007MPRI Course on Concurrency 3 Motivations Modeling:Modeling: Often a system depends on complex phaenomena whose behavior we cannot know in detail, but for which we can give a quantitative extimation –probability as abstraction –examples: requests from users Expressiveness:Expressiveness: Some problems in distributed computing can only be solved by using randomization –Dining Philosophers [LR81] –Consensus (in presence of components that may fail) [FLP85] –Leader Election [B88] 3

4
Paris, 3 Dec 2007MPRI Course on Concurrency 4 The power of randomization: The dining philosophers Each philosopher needs exactly two forks Each fork is shared by exactly two philosophers A philosopher can access only one fork at the time

5
Paris, 3 Dec 2007MPRI Course on Concurrency 5 ProgressProgress: if there is a hungry philosopher, a philosopher will eventually eat Starvation freedom –Note that we could require something stronger, i.e. Starvation freedom: every hungry philosopher will eventually eat. However we won’t consider this property here allschedulersWorks for all (fair) schedulers: A scheduler decides who does the next move Fully distributedFully distributed: no centralized control or memory, and no guarded choice SymmetrySymmetry: –Symmetry of code: All philosophers run the same code (modulo remaing of channels). Same for the forks. –Symmetry of state: All philosophers are in the same initial state. Same for the forks. Intended properties of solution

6
Paris, 3 Dec 2007MPRI Course on Concurrency 6 The proof is due to Lehmann and Rabin [LR81] The idea is the following: –Assume by contradicton that there exists a solution –Construct a non terminating computation in which Progress does not hold –In the “solution”, let P1 be the first philosopher making a move –The scheduler selects all the other philosophers P2,P3,...,Pn, in turn, and forces them to make the same move. (This is possible by the symmetry of the codes). At the end, the system is in a new state, but still symmetric. So symmetry is preserved by this scheduler –The computation cannot pass by a situation in which one philosopher eats, because this would mean that at the end of the previous iteration one philosophers has 2 forks while another has 0 forks. Proof that the DP does not have a solution satisfying the intended properties

7
Paris, 3 Dec 2007MPRI Course on Concurrency 7 The proof is due to Lehmann and Rabin [LR81] The idea is the following: –Assume by contradicton that there exists a solution –Construct a non terminating computation in which Progress does not hold –In the “solution”, let P1 be the first philosopher making a move –The scheduler selects all the other philosophers P2,P3,...,Pn, in turn, and forces them to make the same move. (This is possible by the symmetry of the codes). At the end, the system is in a new state, but still symmetric. So symmetry is preserved by this scheduler –The computation cannot pass by a situation in which one philosopher eats, because this would mean that at the end of the previous iteration one philosophers has 2 forks while another has 0 forks. Proof that the DP does not have a solution satisfying the intended properties

8
Paris, 3 Dec 2007MPRI Course on Concurrency 8 Question: how does this result combine with the program seen at the beginning of the course? (cfr. first lecture) Note: the program seen at the beginning of the course is similar to the algorithm of Francez and Rodek [FR80] 8

9
Paris, 3 Dec 2007MPRI Course on Concurrency 9 The randomized algorithm of Lehmann and Rabin 1. Think 2. randomly choose fork in {left,right} %commit 3. if taken(fork) then goto 3 4. else take(fork) 5. if taken(other(fork)) then {release(fork); goto 2} 6. else take(other(fork)) 7. eat 8. release(other(fork)) 9. release(fork) 10. goto 1 9

10
Paris, 3 Dec 2007MPRI Course on Concurrency 10 Correctness of the randomized algorithm of Lehmann and Rabin Lehmann and Rabin proved that their algorithm satisfies Progress (when the scheduler is fair) with probability 1

11
Paris, 3 Dec 2007MPRI Course on Concurrency 11 Bibliography [LR81] D.J. Lehmann and M.O. Rabin. The advantages of free choice: a symmetric and fully distributed solution to the dining philosophers problem. In Proceedings of the 8th annual ACM SIGACT-SIGPLAN Symposium on principles of Programming Languages, pages 133--138. 1981. [FR80] N. Francez and M. Rodeh A Distributed Abstract Data Type Implemented by a Probabilistic Communication Scheme. Proc. 21st Ann. IEEE Symp. on Foundations of Computer Science. pp. 373-379, 1980. [FLP85] Michael J. Fischer, Nancy A. Lynch, Mike Paterson: Impossibility of Distributed Consensus with One Faulty Process J. ACM 32(2): 374-382 (1985) [B88] Luc Bougé: On the Existence of Symmetric Algorithms to Find Leaders in Networks of Communicating Sequential Processes. Acta Inf. 25(2): 179- 201 (1988) 11

Similar presentations

OK

Distributed Consensus Reaching agreement is a fundamental problem in distributed computing. Some examples are Leader election / Mutual Exclusion Commit.

Distributed Consensus Reaching agreement is a fundamental problem in distributed computing. Some examples are Leader election / Mutual Exclusion Commit.

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google

Ppt on content development pros Ppt on power grid failure los angeles Ppt on cartesian product wiki Ppt on asp dot net project Download ppt on ohm's law for class 10 Mems display ppt online Ppt on margin trading Ppt on earth hour philippines Download free ppt on p-block elements Ppt on polytene chromosomes drosophila