CPSC 668Set 15: Broadcast1 CPSC 668 Distributed Algorithms and Systems Fall 2006 Prof. Jennifer Welch.

Slides:



Advertisements
Similar presentations
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS Fall 2011 Prof. Jennifer Welch CSCE 668 Set 14: Simulations 1.
Advertisements

CS425/CSE424/ECE428 – Distributed Systems – Fall 2011 Material derived from slides by I. Gupta, M. Harandi, J. Hou, S. Mitra, K. Nahrstedt, N. Vaidya.
DISTRIBUTED SYSTEMS II FAULT-TOLERANT BROADCAST Prof Philippas Tsigas Distributed Computing and Systems Research Group.
CS4231 Parallel and Distributed Algorithms AY 2006/2007 Semester 2 Lecture 6 Instructor: Haifeng YU.
CSE 486/586, Spring 2014 CSE 486/586 Distributed Systems Reliable Multicast Steve Ko Computer Sciences and Engineering University at Buffalo.
CS542 Topics in Distributed Systems Diganta Goswami.
Time and Global States Part 3 ECEN5053 Software Engineering of Distributed Systems University of Colorado, Boulder.
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS Fall 2011 Prof. Jennifer Welch CSCE 668 Self Stabilization 1.
CPSC 668Set 14: Simulations1 CPSC 668 Distributed Algorithms and Systems Spring 2008 Prof. Jennifer Welch.
CPSC 668Set 7: Mutual Exclusion with Read/Write Variables1 CPSC 668 Distributed Algorithms and Systems Fall 2009 Prof. Jennifer Welch.
CPSC 668Set 10: Consensus with Byzantine Failures1 CPSC 668 Distributed Algorithms and Systems Fall 2009 Prof. Jennifer Welch.
CPSC 668Set 5: Synchronous LE in Rings1 CPSC 668 Distributed Algorithms and Systems Spring 2008 Prof. Jennifer Welch.
CPSC 668Set 4: Asynchronous Lower Bound for LE in Rings1 CPSC 668 Distributed Algorithms and Systems Fall 2009 Prof. Jennifer Welch.
CS 582 / CMPE 481 Distributed Systems Fault Tolerance.
CPSC 668Set 2: Basic Graph Algorithms1 CPSC 668 Distributed Algorithms and Systems Spring 2008 Prof. Jennifer Welch.
CPSC 668Set 3: Leader Election in Rings1 CPSC 668 Distributed Algorithms and Systems Spring 2008 Prof. Jennifer Welch.
CPSC 668Set 15: Broadcast1 CPSC 668 Distributed Algorithms and Systems Fall 2009 Prof. Jennifer Welch.
CPSC 668Set 9: Fault Tolerant Consensus1 CPSC 668 Distributed Algorithms and Systems Fall 2006 Prof. Jennifer Welch.
CPSC 668Set 9: Fault Tolerant Consensus1 CPSC 668 Distributed Algorithms and Systems Spring 2008 Prof. Jennifer Welch.
CPSC 668Set 16: Distributed Shared Memory1 CPSC 668 Distributed Algorithms and Systems Fall 2006 Prof. Jennifer Welch.
CPSC 668Set 12: Causality1 CPSC 668 Distributed Algorithms and Systems Fall 2009 Prof. Jennifer Welch.
CPSC 668Set 10: Consensus with Byzantine Failures1 CPSC 668 Distributed Algorithms and Systems Fall 2006 Prof. Jennifer Welch.
CPSC 668Set 17: Fault-Tolerant Register Simulations1 CPSC 668 Distributed Algorithms and Systems Fall 2009 Prof. Jennifer Welch.
CPSC 689: Discrete Algorithms for Mobile and Wireless Systems Spring 2009 Prof. Jennifer Welch.
CPSC 668Self Stabilization1 CPSC 668 Distributed Algorithms and Systems Spring 2008 Prof. Jennifer Welch.
Aran Bergman Eddie Bortnikov, Principles of Reliable Distributed Systems, Technion EE, Spring Principles of Reliable Distributed Systems Recitation.
Idit Keidar, Principles of Reliable Distributed Systems, Technion EE, Spring Principles of Reliable Distributed Systems Lecture 3: Fault-Tolerant.
Distributed systems Module 2 -Distributed algorithms Teaching unit 1 – Basic techniques Ernesto Damiani University of Bozen Lesson 4 – Consensus and reliable.
Ordered Communication. Define guarantees about the order of deliveries inside group of processes Type of ordering: Deliveries respect the FIFO ordering.
CPSC 668Set 11: Asynchronous Consensus1 CPSC 668 Distributed Algorithms and Systems Fall 2006 Prof. Jennifer Welch.
Aran Bergman & Eddie Bortnikov & Alex Shraer, Principles of Reliable Distributed Systems, Spring Principles of Reliable Distributed Systems Recitation.
Aran Bergman, Principles of Reliable Distributed Systems, Technion EE, Spring Principles of Reliable Distributed Systems Recitation 5: Reliable.
CPSC 668Set 11: Asynchronous Consensus1 CPSC 668 Distributed Algorithms and Systems Fall 2009 Prof. Jennifer Welch.
Lecture 12 Synchronization. EECE 411: Design of Distributed Software Applications Summary so far … A distributed system is: a collection of independent.
Time, Clocks, and the Ordering of Events in a Distributed System Leslie Lamport (1978) Presented by: Yoav Kantor.
Computer Science 425 Distributed Systems (Fall 2009) Lecture 5 Multicast Communication Reading: Section 12.4 Klara Nahrstedt.
CIS 720 Distributed algorithms. “Paint on the forehead” problem Each of you can see other’s forehead but not your own. I announce “some of you have paint.
1 A Modular Approach to Fault-Tolerant Broadcasts and Related Problems Author: Vassos Hadzilacos and Sam Toueg Distributed Systems: 526 U1580 Professor:
Formal Model for Simulations Instructor: DR. Lê Anh Ngọc Presented by – Group 6: 1. Nguyễn Sơn Hùng 2. Lê Văn Hùng 3. Nguyễn Xuân Hậu 4. Nguyễn Xuân Tùng.
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS Fall 2011 Prof. Jennifer Welch CSCE 668 Set 11: Asynchronous Consensus 1.
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS Fall 2011 Prof. Jennifer Welch CSCE 668 Set 15: Broadcast 1.
DISTRIBUTED ALGORITHMS AND SYSTEMS Spring 2014 Prof. Jennifer Welch Set 11: Asynchronous Consensus 1.
Event Ordering Greg Bilodeau CS 5204 November 3, 2009.
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS Fall 2011 Prof. Jennifer Welch CSCE 668 Set 5: Synchronous LE in Rings 1.
Studying Different Problems from Distributed Computing Several of these problems are motivated by trying to use solutiions used in `centralized computing’
Time, Clocks, and the Ordering of Events in a Distributed System Leslie Lamport Massachusetts Computer Associates,Inc. Presented by Xiaofeng Xiao.
EEC 688/788 Secure and Dependable Computing Lecture 10 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University
Several sets of slides by Prof. Jennifer Welch will be used in this course. The slides are mostly identical to her slides, with some minor changes. Set.
DISTRIBUTED ALGORITHMS Spring 2014 Prof. Jennifer Welch Set 2: Basic Graph Algorithms 1.
Building Dependable Distributed Systems, Copyright Wenbing Zhao
Chapter 21 Asynchronous Network Computing with Process Failures By Sindhu Karthikeyan.
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS Fall 2011 Prof. Jennifer Welch CSCE 668 Set 16: Distributed Shared Memory 1.
DISTRIBUTED ALGORITHMS Spring 2014 Prof. Jennifer Welch Set 9: Fault Tolerant Consensus 1.
Ordering of Events in Distributed Systems UNIVERSITY of WISCONSIN-MADISON Computer Sciences Department CS 739 Distributed Systems Andrea C. Arpaci-Dusseau.
“Distributed Algorithms” by Nancy A. Lynch SHARED MEMORY vs NETWORKS Presented By: Sumit Sukhramani Kent State University.
EEC 688/788 Secure and Dependable Computing Lecture 10 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS
CSE 486/586 Distributed Systems Reliable Multicast --- 1
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS
Computer Science 425 Distributed Systems CS 425 / ECE 428 Fall 2013
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS
EEC 688/788 Secure and Dependable Computing
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS
EEC 688/788 Secure and Dependable Computing
EEC 688/788 Secure and Dependable Computing
CSE 486/586 Distributed Systems Reliable Multicast --- 2
CSE 486/586 Distributed Systems Reliable Multicast --- 1
Presentation transcript:

CPSC 668Set 15: Broadcast1 CPSC 668 Distributed Algorithms and Systems Fall 2006 Prof. Jennifer Welch

CPSC 668Set 15: Broadcast2 Broadcast Specifications Recall the specification of a broadcast service given in the last set of slides: Inputs: bc-send i (m) –an input to the broadcast service –p i wants to use the broadcast service to send m to all the procs Outputs: bc-recv i (m,j) –an output of the broadcast service –broadcast service is delivering msg m, sent by p j, to p i

CPSC 668Set 15: Broadcast3 Broadcast Specifications A sequence of inputs and outputs (bc-sends and bc-recvs) is allowable iff there exists a mapping  from each bc-recv i (m,j) event to an earlier bc-send j (m) event s.t. –  is well-defined: every msg bc-recv'ed was previously bc-sent (Integrity) –  restricted to bc-recv i events, for each i, is one-to- one: no msg is bc-recv'ed more than once at any single proc. (No Duplicates) –  restricted to bc-recv i events, for each i, is onto: every msg bc-sent is received at every proc. (Liveness)

CPSC 668Set 15: Broadcast4 Ordering Properties Sometimes we might want a broadcast service that also provides some kind of guarantee on the order in which messages are delivered. We can add additional constraints on the mapping  : –single-source FIFO or –totally ordered or –causally ordered

CPSC 668Set 15: Broadcast5 Single-Source FIFO Ordering For all messages m 1 and m 2 and all p i and p j, if p i sends m 1 before it sends m 2, and if p j receives m 1 and m 2, then p j receives m 1 before it receives m 2. Phrased carefully to avoid requiring that both messages are received. –that is the responsibility of a liveness property

CPSC 668Set 15: Broadcast6 Totally Ordered For all messages m 1 and m 2 and all p i and p j, if both p i and p j receive both messages, then they receive them in the same order. Phrased carefully to avoid requiring that both messages are received by both procs. –that is the responsibility of a liveness property

CPSC 668Set 15: Broadcast7 Happens Before for Messages Earlier we defined "happens before" relation for events. Now extend this definition to messages. Assume all communication is through broadcast sends and receives. Msg m 1 happens before msg m 2 if –bc-recv event for m 1 happens before the bc-send event for m 2, or –m 1 and m 2 are sent by the same proc. and m 1 is sent before m 2 is sent.

CPSC 668Set 15: Broadcast8 Causally Ordered For all messages m 1 and m 2 and all p i, if m 1 happens before m 2, and if p i receives both m 1 and m 2, then p i receives m 1 before it receives m 2. Phrased carefully to avoid requiring that both messages are received. –that is the responsibility of a liveness property

CPSC 668Set 15: Broadcast9 Example a b single-source FIFO? totally ordered? causally ordered?

CPSC 668Set 15: Broadcast10 Example ab single-source FIFO? totally ordered? causally ordered?

CPSC 668Set 15: Broadcast11 Example a b single-source FIFO? totally ordered? causally ordered?

CPSC 668Set 15: Broadcast12 Algorithm to Simulate Basic Broadcast on Top of Point-to-Point When bc-send i (m) occurs: –p i sends a separate copy of m to every processor (including itself) using the underlying point-to-point message passing communication system When can p i perform bc-recv i (m)? –when it receives m from the underlying point-to-point message passing communication system

CPSC 668Set 15: Broadcast13 Correctness of Basic Broadcast Algorithm Assume the underlying point-to-point message passing system is correct (i.e., conforms to the spec given in previous set of slides). Check that the simulated broadcast service satisfies: –Integrity –No Duplicates –Liveness

CPSC 668Set 15: Broadcast14 Single-Source FIFO Algorithm Assume the underlying communication system is basic broadcast. when ssf-bc-send i (m) occurs: –p i uses the underlying basic broadcast service to bcast m together with a sequence number –p i increments sequence number by 1 each time it initiates a bcast when can p i perform ssf-bc-recv i (m)? –when p i has bc-recv'ed m with sequence number T and has ssf-bc-recv'ed messages from p j (the ssf- bc-sender of m) with all smaller sequence numbers

CPSC 668Set 15: Broadcast15 Single-Source FIFO Algorithm SSF alg (timestamps) basic bcast alg (n copies) point-to-point message passing user of SSF bcast ssf-bc-sendssf-bc-recv bc-send send bc-recv recv basic bcast ssf bcast

CPSC 668Set 15: Broadcast16 Asymmetric Algorithm for Totally Ordered Broadcast Assume underlying communication service is basic broadcast. There is a distinguished proc. p c when to-bcast i (m) occurs: –p i sends m to p c (either assume the basic broadcast service also has a point-to-point mechanism, or have recipients other than p c ignore the msg) when p c receives m from p i from the basic broadcast service: –append a sequence number to m and bc-send it

CPSC 668Set 15: Broadcast17 Asymmetric Algorithm for Totally Ordered Broadcast when can p i perform to-bc-recv(m)? –when p i has bc-recv'ed m with sequence number T and has to-bc-recv'ed messages with all smaller sequence numbers

CPSC 668Set 15: Broadcast18 Symmetric Algorithm for Totally Ordered Broadcast Assume the underlying communication service is single-source FIFO broadcast. Each proc. tags each msg it sends with a timestamp (increasing). Each proc. keeps a vector of estimates of the other proc's timestamps: –if p i 's estimate for p j is k, then p i will not receive any later msg from p j with timestamp k. –Estimates are updated based on msgs received and "timestamp update" msgs

CPSC 668Set 15: Broadcast19 Symmetric Algorithm for Totally Ordered Broadcast Each proc. keeps its timestamp to be ≥ all its estimates: –when p i has to increase its timestamp because of the receipt of a message, it sends a timestamp update msg A proc. can deliver a msg with timestamp T once every entry in the proc's vector of estimates is at least T.

CPSC 668Set 15: Broadcast20 Symmetric Algorithm when to-bc-send i (m) occurs: ts[i]++ add (m,ts[i]) to pending invoke ssf-bc-send i ((m,ts[i])) when ssf-bc-recv i ((m,T)) from p j occurs: ts[j] := T add (m,T) to pending if T > ts[i] then ts[i] := T invoke ssf-bc-send i ("ts-up",T) when ssf-bc-recv i ("ts-up",T) from p j occurs: ts[j] := T invoke to-bc-recv i (m) when: (m,T) is entry in pending with smallest T T ≤ ts[k] for all k result: remove (m,T) from pending

CPSC 668Set 15: Broadcast21 SSF alg (timestamps) basic bcast alg (n copies) point-to-point message passing symmetric TO alg ssf-bc-sendssf-bc-recv bc-send send bc-recv recv basic bcast user of TO bcast to-bc-sendto-bc-recv ssf bcast TO bcast

CPSC 668Set 15: Broadcast22 Correctness of Symmetric Algorithm Lemma (8.2): Timestamps assigned to msgs form a total order (break ties with id of sender). Theorem (8.3): Symmetric algorithm simulates totally ordered broadcast service. Proof: Must show top-level outputs of symmetric algorithm satisfy 4 properties, in every admissible execution (relies on underlying ssf-bcast service being correct).

CPSC 668Set 15: Broadcast23 Correctness of Symmetric Alg. Integrity: follows from same property for ssf-bcast. No Duplicates: follows from same property for ssf-bcast. Liveness: Suppose in contradiction some p i has some entry (m,T) stuck in its pending set forever, where T is the smallest timestamp of all stuck entries. Eventually (m,T) has the smallest timestamp of all entries. Why is (m,T) stuck at p i ? Because its estimate of some p k 's timestamp is stuck at some value T' < T. But that would mean either p k never receives (m,T) or p k 's timestamp update msg resulting from p k receiving (m,T) is never received at p i, contradicting correctness of the SSF broadcast.

CPSC 668Set 15: Broadcast24 Correctness of Symmetric Alg. Total Ordering: Suppose p i does to-bc-recv for msg m with timestamp T, and later it does to-bc-recv for msg m' with timestamp T'. Show T < T'. By the code, if (m',T') is in p i 's pending set when p i does the to-bc-recv for m, then T < T'. Suppose (m',T') is not yet in p i 's pending set at that time. Let p j be the proc. that initiated the to-bcast of m'. When p i does the to-bc-recv for m, T ≤ ts[j]. So p i has received a msg from p j with timestamp ≥ T. By the SSF property, every subsequent msg p i receives from p k will have timestamp > T, so T' must be > T.

CPSC 668Set 15: Broadcast25 Causal Ordering Algorithms The symmetric total ordering algorithm ensures causal ordering: –timestamp order extends the happens- before order on messages. Causal ordering can also be attained without the overhead of total ordering using an algorithm based on vector clocks…

CPSC 668Set 15: Broadcast26 Causal Order Algorithm when co-bc-send i (m) occurs: vt[i]++ invoke co-bc-recv i (m) invoke bc-send i ((m,vt)) when bc-recv i ((m,w)) from p j occurs: add (m,w,j) to pending invoke co-bc-recv i (m) when: (m,w,j) is in pending w[j] = vt[j] + 1 w[k] ≤ vt[k] for all k ≠ i result: remove (m,w,j) from pending vt[j]++ Note: vt[j] records how many msgs from p j have been co-recv'ed

CPSC 668Set 15: Broadcast27 Correctness of Causal Order Algorithm (Sketch) Lemma (8.6): The local array variables vt serve as vector clocks. Theorem (8.7): The algorithm simulates causally ordered broadcast, if the underlying communication system satisfies (basic) broadcast. Proof: Integrity and No Duplicates follow from the same properties of the basic broadcast. Liveness requires some arguing. Causal Ordering follows from the lemma.

CPSC 668Set 15: Broadcast28 Reliable Broadcast What do we require of a broadcast service when some of the procs can be faulty? Specifications differ from those of the corresponding non-fault-tolerant specs in two ways: 1.proc indices are partitioned into "faulty" and "nonfaulty" 2.Liveness property is modified…

CPSC 668Set 15: Broadcast29 Reliable Broadcast Specification Nonfaulty Liveness: Every msg bc-sent by a nonfaulty proc is eventually bc- recv'ed by all nonfaulty procs. Faulty Liveness: Every msg bc-sent by a faulty proc is bc-recv'ed by either all the nonfaulty procs or none of them.

CPSC 668Set 15: Broadcast30 Discussion of Reliable Bcast Spec Specification is independent of any particular fault model. We will only consider implementations for crash faults. No guarantee is given concerning which messages are received by faulty procs. Can extend this spec to the various ordering variants: –msgs that are received by faulty procs must conform to the relevant ordering property.

CPSC 668Set 15: Broadcast31 Spec of Failure-Prone Point-to- Point Message Passing System Before we can design an algorithm to implement reliable (i.e., fault-tolerant) broadcast, we need to know what we can rely on from the lower layer communication system. Modify the previous point-to-point spec from the no-fault case in two ways: 1.partition proc indices into "faulty" and "nonfaulty" 2.Liveness property is modified…

CPSC 668Set 15: Broadcast32 Spec of Failure-Prone Point-to- Point Message Passing System Nonfaulty Liveness: every msg sent by a nonfaulty proc to any nonfaulty proc is eventually received. Note that this places no constraints on messages received by faulty procs.

CPSC 668Set 15: Broadcast33 Reliable Broadcast Algorithm when rel-bc-send i (m) occurs: invoke send i (m) to all procs when recv i (m) from p j occurs: if m has not already been recv'ed then invoke send i (m) to all procs invoke rel-bc-recv i (m)

CPSC 668Set 15: Broadcast34 Correctness of Reliable Bcast Alg Integrity: follows from Integrity property of underlying point-to-point msg system. No Duplicates: follows from No Duplicates property of underlying point-to-point msg system and the check that this msg was not already received. Nonfaulty Liveness: follows from Nonfaulty Liveness property of underlying point-to-point msg system. Faulty Liveness: follows from relaying and underlying Nonfaulty Liveness.