1 Chapter 11: Coordination and Agreement From Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edition 3, © Addison-Wesley 2001.

Slides:



Advertisements
Similar presentations
CS542 Topics in Distributed Systems Diganta Goswami.
Advertisements

CS 542: Topics in Distributed Systems Diganta Goswami.
CS425 /CSE424/ECE428 – Distributed Systems – Fall 2011 Material derived from slides by I. Gupta, M. Harandi, J. Hou, S. Mitra, K. Nahrstedt, N. Vaidya.
CS542 Topics in Distributed Systems Diganta Goswami.
Failure Detection The ping-ack failure detector in a synchronous system satisfies – A: completeness – B: accuracy – C: neither – D: both.
Synchronization Chapter clock synchronization * 5.2 logical clocks * 5.3 global state * 5.4 election algorithm * 5.5 mutual exclusion * 5.6 distributed.
CS 582 / CMPE 481 Distributed Systems
What we will cover…  Distributed Coordination 1-1.
1 Chapter 14: Replication From Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edition 3, © Addison-Wesley 2001 Presentation.
Distributed Systems Fall 2009 Coordination and agreement, Multicast, and Message ordering.
Copyright © George Coulouris, Jean Dollimore, Tim Kindberg This material is made available for private study and for direct.
Distributed Systems Fall 2009 Replication Fall 20095DV0203 Outline Group communication Fault-tolerant services –Passive and active replication Highly.
Chapter 18: Distributed Coordination (Chapter 18.1 – 18.5)
1 Slides for Chapter 10: Time (and Global State) From Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edition 3, © Addison-Wesley.
Distributed Mutual Exclusion Béat Hirsbrunner References G. Coulouris, J. Dollimore and T. Kindberg "Distributed Systems: Concepts and Design", Ed. 4,
Computer Science Lecture 12, page 1 CS677: Distributed OS Last Class Vector timestamps Global state –Distributed Snapshot Election algorithms.
Logical Clocks (2). Topics r Logical clocks r Totally-Ordered Multicasting r Vector timestamps.
Computer Science 425 Distributed Systems (Fall 2009) Lecture 5 Multicast Communication Reading: Section 12.4 Klara Nahrstedt.
1DT066 D ISTRIBUTED I NFORMATION S YSTEM Time, Coordination and Agreement 1.
Distributed Mutex EE324 Lecture 11.
Coordination and Agreement, Multicast, and Message Ordering.
CSE 486/586, Spring 2013 CSE 486/586 Distributed Systems Mutual Exclusion Steve Ko Computer Sciences and Engineering University at Buffalo.
Fault-Tolerant Broadcast Terminology: broadcast(m) a process broadcasts a message to the others deliver(m) a process delivers a message to itself 1.
CSE 486/586, Spring 2012 CSE 486/586 Distributed Systems Mutual Exclusion Steve Ko Computer Sciences and Engineering University at Buffalo.
Slides for Chapter 8: Coordination and Agreement From Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edition 4, © Pearson Education.
Slides for Chapter 12: Coordination and Agreement From Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edition 4, © Pearson.
Slides for Chapter 12: Coordination and Agreement From Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edition 4, © Pearson.
CS425 /CSE424/ECE428 – Distributed Systems – Fall 2011 Material derived from slides by I. Gupta, M. Harandi, J. Hou, S. Mitra, K. Nahrstedt, N. Vaidya.
Coordination and Agreement. Topics Distributed Mutual Exclusion Leader Election.
1 Coordination and Agreement. 3 Failure model zAssumptions: Independent processes, reliable channels, no Byzantine errors. zFailure detector: yMay be.
November 2005Distributed systems: distributed algorithms 1 Distributed Systems: Distributed algorithms.
Farnaz Moradi Based on slides by Andreas Larsson 2013.
Synchronization Chapter 5.
1 Chapter 7: Clock Synchronization, Coordination &Agreement.
Fault Tolerant Services
1 Distribuerede systemer og sikkerhed – 21. marts 2002 zFrom Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design zEdition 3, © Addison-Wesley.
CSE 486/586, Spring 2012 CSE 486/586 Distributed Systems Mutual Exclusion & Leader Election Steve Ko Computer Sciences and Engineering University.
Exercises for Chapter 15: COORDINATION AND AGREEMENT From Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edition 3, © Addison-Wesley.
1.Mutual Exclusion in Distributed Systems 2.Non-Token-Based Algorithms 3.Token-Based Algorithms 4.Distributed Election 5.The Bully and the Ring-Based Algorithms.
Replication and Group Communication. Management of Replicated Data FE Requests and replies C Replica C Service Clients Front ends managers RM FE RM Instructor’s.
Distributed Systems Topic 5: Time, Coordination and Agreement
Lecture 10: Coordination and Agreement (Chap 12) Haibin Zhu, PhD. Assistant Professor Department of Computer Science Nipissing University © 2002.
Page 1 Mutual Exclusion & Election Algorithms Paul Krzyzanowski Distributed Systems Except as otherwise noted, the content.
DISTRIBUTED SYSTEMS II FAULT-TOLERANT BROADCAST Prof Philippas Tsigas Distributed Computing and Systems Research Group.
Lecture 12-1 Computer Science 425 Distributed Systems CS 425 / CSE 424 / ECE 428 Fall 2012 Indranil Gupta (Indy) October 4, 2012 Lecture 12 Mutual Exclusion.
Lecture 7- 1 CS 425/ECE 428/CSE424 Distributed Systems (Fall 2009) Lecture 7 Distributed Mutual Exclusion Section 12.2 Klara Nahrstedt.
From Coulouris, Dollimore, Kindberg and Blair Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Slides for Chapter 15: Coordination.
CIS 825 Review session. P1: Assume that processes are arranged in a ring topology. Consider the following modification of the Lamport’s mutual exclusion.
Mutual Exclusion Algorithms. Topics r Defining mutual exclusion r A centralized approach r A distributed approach r An approach assuming an organization.
CSE 486/586 CSE 486/586 Distributed Systems Leader Election Steve Ko Computer Sciences and Engineering University at Buffalo.
Distributed Systems Lecture 9 Leader election 1. Previous lecture Middleware RPC and RMI – Marshalling 2.
Revisiting Logical Clocks: Mutual Exclusion Problem statement: Given a set of n processes, and a shared resource, it is required that: –Mutual exclusion.
Lecture 11: Coordination and Agreement Central server for mutual exclusion Election – getting a number of processes to agree which is “in charge” CDK4:
CS 425 / ECE 428 Distributed Systems Fall 2015 Indranil Gupta (Indy) Oct 1, 2015 Lecture 12: Mutual Exclusion All slides © IG.
Slides for Chapter 11: Coordination and Agreement From Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edition 3, © Addison-Wesley.
Exercises for Chapter 11: COORDINATION AND AGREEMENT
CSE 486/586 Distributed Systems Reliable Multicast --- 1
Coordination and Agreement
CSE 486/586 Distributed Systems Leader Election
Coordination and Agreement
Computer Science 425 Distributed Systems CS 425 / ECE 428 Fall 2013
Outline Distributed Mutual Exclusion Introduction Performance measures
CSE 486/586 Distributed Systems Leader Election
CSE 486/586 Distributed Systems Mutual Exclusion
Lecture 10: Coordination and Agreement
Lecture 11: Coordination and Agreement
CSE 486/586 Distributed Systems Mutual Exclusion
CSE 486/586 Distributed Systems Reliable Multicast --- 1
CSE 486/586 Distributed Systems Leader Election
Presentation transcript:

1 Chapter 11: Coordination and Agreement From Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edition 3, © Addison-Wesley 2001 Presentation based on slides by Coulouris et al; modified by Jens B Jorgensen, University of Aarhus

2 Failure model zAssumptions: Independent processes, reliable channels, no Byzantine errors. zFailure detector: yMay be unreliable (yield “Unsupected” or “Suspected”). yMay be reliable (yield “Unsuspected” or “Failed”).

3 Distributed mutual exclusion zSituation: A number of processes want to access some shared resource. zProblem: Prevent interference, maintain consistency; critical section. zExamples: yShared files. yCar park monitoring.

4 Distributed mutual exclusion – basics zApplication-level protocol: yenter() yresourceAccess() yexit() zCorrectness criteria: ySafety yLiveness y->-fairness zPerformance measures: yBandwith. yClient delay. yThroughput. ySynchronization delay.

5 Distributed mutual exclusion – central server algorithm

6 Distributed mutual exclusion – ring-based algorithm

7 Distributed mutual exclusion – time-stamp based algorithm On initialization state := RELEASED; To enter the section state := WANTED; Multicast request to all processes;request processing deferred here T := request’s timestamp; Wait until (number of replies received = (N – 1)); state := HELD; On receipt of a request at p j (i ≠ j) if (state = HELD or (state = WANTED and (T, p j ) < (T i, p i ))) then queue request from p i without replying; else reply immediately to p i ; end if To exit the critical section state := RELEASED; reply to any queued requests;

8 Distributed mutual exclusion – time-stamp based algorithm example p 3 34 Reply p 1 p 2 Reply

9 Elections zSituation: A unique process to play a particular role among a set of processes must be chosen. zProblem: All processes must agree on the choice. zExamples: yCentral server algorithm for mutual exclusion. yCoordinator process in Berkeley algorithm for internal clock synchronization.

10 Elections – basics zProtocol: yA process may call an election. yAny process is either participant or non-participant in an election. yThe elected process should be chosen as the one with largest identifier. zCorrectness criteria: ySafety. yLiveness. zPerformance measures: yBandwidth. yTurn-around time.

11 Elections – ring-based algorithm zN processes arranged in a ring; a coordinator must be elected; no failures occur. zInitially, each process is non-participant. zSome process pi sends an election message, elctn(i). zWhen a process pr receives a message elctn(i): yIf r<i then forward elctn(i); participant(pr) := true; endif; yIf (r>i and not(participant(pr))) then xforward (elctn(r)); participant(pr) := true; endif; yIf (r>i and participant(pr)) then skip (* do not forward *); endif; yIf r=i then participant(pr) := false; send(elctd(r)); endif; zWhen a process pr receives an elected message, elctd(c): yparticipant(pr) := false; elected(r) := c; y if r=c then skip (* do not forward *) else forward (elctd(c)); endif;

12 Elections – ring-based algorithm example Note: The election was started by process 17. The highest process identifier encountered so far is 24. Participant processes are shown darkened

13 Multicast communication zThe aim is for each of a group of processes to receive copies of the messages sent to the group. zA process issues only one multicast operation to send a message to a group of processes instead of issuing multiple send operations. zMulticast operations may provide: yDelivery guarantees. yEfficiency. yConvenience to programmers.

14 Multicast communication – basics zFailure model: Reliable channels, processes may crash. zProcesses are member of groups (open or closed). zOperations: ymulticast(g,m). ydeliver(m).

15 Multicast communication – basic multicast zB-multicast based on a reliable one-to-one send operation: yTo B-multicast(g,m), for each p in g, send(p,m). yOn receive(m) at p, B-deliver(m) at p. zMay be implemented using threads to perform the send operations concurrently. zMay suffer from the ack-implosion problem.

16 Multicast communication – reliable multicast zIntegrity: A correct process p delivers a message m at most once. Furthermore p in group(m) and m was supplied to a multicast operation by sender(m). zValidity: If a correct process multicasts message m, then it will eventually deliver m (assumption: closed groups). zAgreement: If a correct process delivers message m, then all other correct processes in group(m) will eventually deliver(m).

17 Multicast communication – reliable multicast algorithm

18 Multicast communication – orderings; bulletin board example Bulletin board: os.interesting Item FromSubject 23A.HanlonMach 24G.JosephMicrokernels 25A.HanlonRe: Microkernels 26T.L’HeureuxRPC performance 27M.WalkerRe: Mach end

19 Multicast communication – ordering relations zFIFO ordering: If a correct process issues multicast(g,m) and then multicast(g,m’), then every correct process that delivers m’ will deliver m before m’. zCausal ordering: If multicast(g,m) -> multicast(g,m’), then any correct process that delivers m’ will deliver m before m’. zTotal ordering: If a correct process delivers m before it delivers m’, then any other correct process that delivers m’ will deliver m before m’. zHybrid ordering relations exist.

20 Multicast communication – ordering examples Notice the consistent ordering of totally ordered messages T 1 and T 2, the FIFO-related messages F 1 and F 2 and the causally related messages C 1 and C 3 – and the otherwise arbitrary delivery ordering of messages.

21 Multicast communication – bulletin board example revisited Bulletin board: os.interesting Item FromSubject 23A.HanlonMach 24G.JosephMicrokernels 25A.HanlonRe: Microkernels 26T.L’HeureuxRPC performance 27M.WalkerRe: Mach end

22 Summary zFailures and failure detection. zDistributed mutual exclusion: yCentral-server algorithm. yRing-based algorithm. yTime-stamp based algorithm. zElections: yRing-based algorithm. zMulticast communication yBasic multicast. yReliable multicast. yOrdering semantics.