Paris, 3 Dec 2007MPRI Course on Concurrency MPRI – Course on Concurrency Lecture 12 Probabilistic process calculi Catuscia Palamidessi LIX, Ecole Polytechnique.

Slides:



Advertisements
Similar presentations
Automated Theorem Proving Lecture 1. Program verification is undecidable! Given program P and specification S, does P satisfy S?
Advertisements

Impossibility of Distributed Consensus with One Faulty Process
08 April PPS - Groupe de Travail en Concurrence The probabilistic asynchronous -calculus Catuscia Palamidessi, INRIA Futurs, France.
A General Characterization of Indulgence R. Guerraoui EPFL joint work with N. Lynch (MIT)
Distributed Markov Chains P S Thiagarajan School of Computing, National University of Singapore Joint work with Madhavan Mukund, Sumit K Jha and Ratul.
Snap-stabilizing Committee Coordination Borzoo Bonakdarpour Stephane Devismes Franck Petit IEEE International Parallel and Distributed Processing Symposium.
1 Operating Systems, 122 Practical Session 5, Synchronization 1.
1 Concurrency Specification. 2 Outline 4 Issues in concurrent systems 4 Programming language support for concurrency 4 Concurrency analysis - A specification.
Process Algebra (2IF45) Probabilistic Process Algebra Suzana Andova.
SPL/2010 Liveness And Performance 1. SPL/2010 Performance ● Throughput - How much work can your program complete in a given time unit? ● Example: HTTP.
Probabilistic Methods in Concurrency Lecture 9 Other uses of randomization: a randomized protocol for anonymity Catuscia Palamidessi
Deadlock CS Introduction to Operating Systems.
Bangalore, 2 Feb 2005Probabilistic security protocols 1 CIMPA School on Security Specification and verification of randomized security protocols Lecture.
Probabilistic Methods in Concurrency Lecture 3 The pi-calculus hierarchy: separation results Catuscia Palamidessi
Byzantine Generals Problem: Solution using signed messages.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Course on Probabilistic Methods in Concurrency (Concurrent Languages for Probabilistic Asynchronous Communication) Lecture 1 The pi-calculus and the asynchronous.
CPSC 668Set 14: Simulations1 CPSC 668 Distributed Algorithms and Systems Spring 2008 Prof. Jennifer Welch.
Introduction to Computability Theory
Sergio Rajsbaum 2006 Lecture 3 Introduction to Principles of Distributed Computing Sergio Rajsbaum Math Institute UNAM, Mexico.
CPSC 668Set 16: Distributed Shared Memory1 CPSC 668 Distributed Algorithms and Systems Fall 2006 Prof. Jennifer Welch.
Bakery Algorithm - Proof
Distributed systems Module 2 -Distributed algorithms Teaching unit 1 – Basic techniques Ernesto Damiani University of Bozen Lesson 2 – Distributed Systems.
 Idit Keidar, Principles of Reliable Distributed Systems, Technion EE, Spring Principles of Reliable Distributed Systems Lecture 6: Impossibility.
CS533 - Concepts of Operating Systems
 Idit Keidar, Principles of Reliable Distributed Systems, Technion EE, Spring Principles of Reliable Distributed Systems Lecture 12: Impossibility.
CS 603 Dining Philosopher’s Problem February 15, 2002.
Systems of Distributed systems Module 2 - Distributed algorithms Teaching unit 2 – Properties of distributed algorithms Ernesto Damiani University of Bozen.
Composition Model and its code. bound:=bound+1.
Consensus and Related Problems Béat Hirsbrunner References G. Coulouris, J. Dollimore and T. Kindberg "Distributed Systems: Concepts and Design", Ed. 4,
Paxos Made Simple Jinghe Zhang. Introduction Lock is the easiest way to manage concurrency Mutex and semaphore. Read and write locks. In distributed system:
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.
Lecture #12 Distributed Algorithms (I) CS492 Special Topics in Computer Science: Distributed Algorithms and Systems.
Probabilistic Methods in Concurrency Lecture 4 Problems in distributed systems for which only randomized solutions exist Catuscia Palamidessi
11 February CdP INRIA Futurs Catuscia Palamidessi INRIA Saclay.
Distributed Algorithms – 2g1513 Lecture 9 – by Ali Ghodsi Fault-Tolerance in Distributed Systems.
Consensus and Its Impossibility in Asynchronous Systems.
10 December 2002ENS Cachan1 Generalized dining philosophers Catuscia Palamidessi, INRIA in collaboration with Mihaela Oltea Herescu, IBM Michael Pilquist,
Distributed Algorithms Lecture 10b – by Ali Ghodsi Fault-Tolerance in Asynchronous Networks – Probabilistic Consensus.
DISTRIBUTED ALGORITHMS AND SYSTEMS Spring 2014 Prof. Jennifer Welch Set 11: Asynchronous Consensus 1.
1 Chapter 10 Synchronization Algorithms and Concurrent Programming Gadi Taubenfeld © 2014 Synchronization Algorithms and Concurrent Programming Synchronization.
MPRI – Course on Concurrency Probabilistic methods in Concurrency Catuscia Palamidessi INRIA Futurs and LIX
DISTRIBUTED SYSTEMS II A POLYNOMIAL LOCAL SOLUTION TO MUTUAL EXCLUSION Prof Philippas Tsigas Distributed Computing and Systems Research Group.
CS294, Yelick Consensus revisited, p1 CS Consensus Revisited
Paris, 17 December 2007MPRI Course on Concurrency MPRI – Course on Concurrency Lecture 14 Application of probabilistic process calculi to security Catuscia.
MPRI 3 Dec 2007Catuscia Palamidessi 1 Why Probability and Nondeterminism? Concurrency Theory Nondeterminism –Scheduling within parallel composition –Unknown.
MPRI – Course on Concurrency Lectures 11 and 12 The pi-calculus expressiveness hierarchy Catuscia Palamidessi INRIA Futurs and LIX
Chap 15. Agreement. Problem Processes need to agree on a single bit No link failures A process can fail by crashing (no malicious behavior) Messages take.
Chapter 11 Resource Allocation by Mikhail Nesterenko “Distributed Algorithms” by Nancy A. Lynch.
14 October BASICS'09, Shanghai On the expressive power of synchronization primitives in the π-calculus Catuscia Palamidessi, INRIA Saclay, France.
SysRép / 2.5A. SchiperEté The consensus problem.
Fault tolerance and related issues in distributed computing Shmuel Zaks GSSI - Feb
From Natural Language to LTL: Difficulties Capturing Natural Language Specification in Formal Languages for Automatic Analysis Elsa L Gunter NJIT.
Probabilistic Methods in Concurrency Lecture 6 Progress statements: A tool for verification of probabilistic automata Catuscia Palamidessi
6 October PPDP / GPCE 2002 Mobile Calculi Catuscia Palamidessi, INRIA Futurs, France joint work with Mihaela Herescu, IBM, Austin for Distributed.
Semaphores Chapter 6. Semaphores are a simple, but successful and widely used, construct.
Lecture 4 1 Honnor Projects Supervised by Catuscia Palamidessi The  -calculus, a small language for specification and verification of concurrency and.
16 January 2004LIX1 Equipe Comète Concurrency, Mobility, and Transactions Catuscia Palamidessi INRIA-Futurs and LIX.
Wait-Free Consensus CPSC 661 Fall 2003 Supervised by: Lisa Higham
The consensus problem in distributed systems
Catuscia Palamidessi, INRIA Saclay, France
Alternating Bit Protocol
Distributed Consensus
Liveness And Performance
Semaphores Chapter 6.
Probabilistic Methods in Concurrency Lecture 7 The probabilistic asynchronous p-calculus Catuscia Palamidessi
FLP Impossibility of Consensus
EEC 688/788 Secure and Dependable Computing
Presentation transcript:

Paris, 3 Dec 2007MPRI Course on Concurrency MPRI – Course on Concurrency Lecture 12 Probabilistic process calculi Catuscia Palamidessi LIX, Ecole Polytechnique Page of the course:

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

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

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

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

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

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

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

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

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

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 [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 , [FLP85] Michael J. Fischer, Nancy A. Lynch, Mike Paterson: Impossibility of Distributed Consensus with One Faulty Process J. ACM 32(2): (1985) [B88] Luc Bougé: On the Existence of Symmetric Algorithms to Find Leaders in Networks of Communicating Sequential Processes. Acta Inf. 25(2): (1988) 11