Probabilistic Methods in Concurrency Lecture 4 Problems in distributed systems for which only randomized solutions exist Catuscia Palamidessi

Slides:



Advertisements
Similar presentations
CS 603 Process Synchronization: The Colored Ticket Algorithm February 13, 2002.
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.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
CS252: Systems Programming Ninghui Li Based on Slides by Prof. Gustavo Rodriguez-Rivera Topic 14: Deadlock & Dinning Philosophers.
Paris, 3 Dec 2007MPRI Course on Concurrency MPRI – Course on Concurrency Lecture 12 Probabilistic process calculi Catuscia Palamidessi LIX, Ecole Polytechnique.
Program correctness The State-transition model A global state S  s 0 x s 1 x … x s m {s k = local state of process k} S0  S1  S2  … Each state transition.
Snap-stabilizing Committee Coordination Borzoo Bonakdarpour Stephane Devismes Franck Petit IEEE International Parallel and Distributed Processing Symposium.
Mutual Exclusion By Shiran Mizrahi. Critical Section class Counter { private int value = 1; //counter starts at one public Counter(int c) { //constructor.
Concurrent Programming Problems OS Spring Concurrency pros and cons Concurrency is good for users –One of the reasons for multiprogramming Working.
1 Chapter 2 Synchronization Algorithms and Concurrent Programming Gadi Taubenfeld © 2007 Synchronization Algorithms and Concurrent Programming Gadi Taubenfeld.
Multiprocessor Synchronization Algorithms ( ) Lecturer: Danny Hendler The Mutual Exclusion problem.
Critical Section chapter3.
Chapter 3 The Critical Section Problem
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
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
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.
THIRD PART Algorithms for Concurrent Distributed Systems: The Mutual Exclusion problem.
1 Introduction to Computability Theory Lecture15: Reductions Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture12: Reductions Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture11: Variants of Turing Machines Prof. Amos Israeli.
Avishai Wool lecture Introduction to Systems Programming Lecture 4 Inter-Process / Inter-Thread Communication.
Bakery Algorithm - Proof
Process Synchronization
Concurrency in Distributed Systems: Mutual exclusion.
CS 603 Dining Philosopher’s Problem February 15, 2002.
Efficient Algorithms to Implement Failure Detectors and Solve Consensus in Distributed Systems Mikel Larrea Departamento de Arquitectura y Tecnología de.
11 February CdP INRIA Futurs Catuscia Palamidessi INRIA Saclay.
CS 153 Design of Operating Systems Spring 2015 Lecture 11: Scheduling & Deadlock.
CS4231 Parallel and Distributed Algorithms AY 2006/2007 Semester 2 Lecture 3 (26/01/2006) Instructor: Haifeng YU.
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.
1 Chapter 9 Synchronization Algorithms and Concurrent Programming Gadi Taubenfeld © 2014 Synchronization Algorithms and Concurrent Programming Synchronization.
THIRD PART Algorithms for Concurrent Distributed Systems: The Mutual Exclusion problem.
By J. Burns and J. Pachl Based on a presentation by Irina Shapira and Julia Mosin Uniform Self-Stabilization 1 P0P0 P1P1 P2P2 P3P3 P4P4 P5P5.
MPRI – Course on Concurrency Probabilistic methods in Concurrency Catuscia Palamidessi INRIA Futurs and LIX
Mutual Exclusion Using Atomic Registers Lecturer: Netanel Dahan Instructor: Prof. Yehuda Afek B.Sc. Seminar on Distributed Computation Tel-Aviv University.
Defining Liveness by Bowen Alpern and Fred B. Schneider Presented by Joe Melnyk.
Distributed systems Consensus Prof R. Guerraoui Distributed Programming Laboratory.
MPRI – Course on Concurrency Lectures 11 and 12 The pi-calculus expressiveness hierarchy Catuscia Palamidessi INRIA Futurs and LIX
CIS 720 Asynchronous Message Passing. Asynchronous message passing Send is non-blocking Modeling a channel c: 1.Two variables: sent c, recv c 2.Queue.
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.
CGS 3763 Operating Systems Concepts Spring 2013 Dan C. Marinescu Office: HEC 304 Office hours: M-Wd 11: :30 AM.
Model Checking Lecture 1. Model checking, narrowly interpreted: Decision procedures for checking if a given Kripke structure is a model for a given formula.
Program Correctness. The designer of a distributed system has the responsibility of certifying the correctness of the system before users start using.
“Towards Self Stabilizing Wait Free Shared Memory Objects” By:  Hopeman  Tsigas  Paptriantafilou Presented By: Sumit Sukhramani Kent State University.
Probabilistic Methods in Concurrency Lecture 6 Progress statements: A tool for verification of probabilistic automata Catuscia Palamidessi
CIS 720 Asynchronous Message Passing. Dining philosophers problem P 0 : do hungry acquire left and right fork eat release forks sleep od.
6 October PPDP / GPCE 2002 Mobile Calculi Catuscia Palamidessi, INRIA Futurs, France joint work with Mihaela Herescu, IBM, Austin for Distributed.
Snap-Stabilizing Committee Coordination Borzoo Bonakdarpour, Stéphane Devismes, and Frank Petit.
Model Checking Lecture 1: Specification Tom Henzinger.
Hwajung Lee. Mutual Exclusion CS p0 p1 p2 p3 Some applications are:  Resource sharing  Avoiding concurrent update on shared data  Controlling the.
Semaphores Chapter 6. Semaphores are a simple, but successful and widely used, construct.
Introduction to distributed systems description relation to practice variables and communication primitives instructions states, actions and programs synchrony.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Multiprocessor Synchronization Algorithms ( )
Catuscia Palamidessi, INRIA Saclay, France
Probabilistic Methods in Concurrency Lecture 5 Basics of Measure Theory and Probability Theory Probabilistic Automata Catuscia Palamidessi
Liveness And Performance
Semaphores Chapter 6.
Probabilistic Methods in Concurrency Lecture 7 The probabilistic asynchronous p-calculus Catuscia Palamidessi
ITEC452 Distributed Computing Lecture 7 Mutual Exclusion
Distributed systems Consensus
Presentation transcript:

Probabilistic Methods in Concurrency Lecture 4 Problems in distributed systems for which only randomized solutions exist Catuscia Palamidessi Page of the course:

Pisa, 1 July 2004Prob methods in Concurrency2 (1) 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

Pisa, 1 July 2004Prob methods in Concurrency3 Deadlock freedom (aka progress): if there is a hungry philosopher, a philosopher will eventually eat Starvation freedom: every hungry philosopher will eventually eat (but we won’t consider this property here) Robustness wrt a large class of adversaries: Adversaries decide who does the next move (schedulers) Fully distributed: no centralized control or memory Symmetric: –All philosophers run the same code and are in the same initial state –The same holds for the forks Intended properties of solution

Pisa, 1 July 2004Prob methods in Concurrency4 Non-existence of a “deterministic” solution Lehman and Rabin have shown that there does not exist a “deterministic” (i.e. non-probabilistic) solution to the dining philosophers, satisfying all properties listed in previous slide. The proof proceeds by proving that for every possible program we can define an adversary (scheduler) which preserves the initial symmetry Note: Francez and Rodeh did propose a “deterministic” solution using CSP. The solution to this apparent contradiction is that CSP cannot be implemented in a fully distributed way

Pisa, 1 July 2004Prob methods in Concurrency5 The 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

Pisa, 1 July 2004Prob methods in Concurrency6 Correctness of the algorithm of Lehmann and Rabin Theorem: for every fair adversary, if a philosopher becomes hungry, then a philosopher (not necessarily the same) will eventually eat with probability 1. Question: why the fairness requirement? Can we write a variant of the algorithm which does not require fairness?

Pisa, 1 July 2004Prob methods in Concurrency7 (2) The committee coordination problem Description of the problem: In a certain university, professors have organized themselves into committees. Each committee has a fixed membership roster of two or more professors. From time to time a professor may decide to attend a committee meeting. He then starts waiting and continues to wait until a meeting of a committee in which he is member is established. Requirements: –Mutual exclusion: No two committees meet simultaneously if they have a common member –Weak Interaction Fairness (WIF) : if all professors of a committee are waiting (i.e. the committee meeting is enabled), then eventually some professor will attend a committee meeting (not necessarily the same). or –Strong Interaction Fairness (SIF): A committee meetig that is enabled infinitely often will be established infinitely often

Pisa, 1 July 2004Prob methods in Concurrency8 The committee coordination problem Question: for which requirement among WIF and SIF do we have a correspondence with the synchronization mechanisms used in process calculi, like (the theory of) CSP and  ? –General case equivalent to multiway synchronization, like the mechanism used in (the Theory of) CSP –Binary case equivalent to the synchronization among two partners, like in CCS and 

Pisa, 1 July 2004Prob methods in Concurrency9 The algorithm of Joung and Smolka 1.while waiting do { 2. randomly choose a committee M ; 3. if TEST&OP(C M,inc,inc) = n M – 1 4. then % a committee meeting is established 5. attend the meeting M 6. else { wait  M time ; 7. if TEST&OP(C M,no-op,dec) = 0 8. then % a committee meeting is established 9. attend the meeting M 10. % else try another committee }

Pisa, 1 July 2004Prob methods in Concurrency10 Correctness of the algoritm Assumption: –  M > max prof {time 2-3 (M,prof)} Theorem: if a committee is enabled then a professor will eventually attend a meeting with probability 1 (WIF) Theorem: if a professor’s transition from thinking to waiting does not depend on the random draws performed by other professors, then a committee meeting which is enabled infinitely often will eventually be established (SIF)

Pisa, 1 July 2004Prob methods in Concurrency11 Importance of the assumption on  The assumption on  M is an assumption about the degree of synchronism (in the sense of cooperation) of the system. In Distributed Algorithms there are three models of cooperation: 1.Partially synchronous 2.Asynchronous 3.Synchronous (lockstep) This assumption corresponds to (2) –Hence this algorithm would not be suitable for implementing the synchronization mechanism of CSP or CCS in a fully distributed setting, since we need an asynchronous cooperation model.

Pisa, 1 July 2004Prob methods in Concurrency12 C B A C B A C B A C B A C B A C B A C B A C B A Algorithm of Joung and Smolka: Example of a livelock in absence of the assumption on  The states at the beginning of Lines 3, 5 and 6 are represented with a filled circle. The states at the beginning of Line 1, 2 and 8 are represented with a white circle. Lines 4 and 7 are never reached