2015/6/271 5.4 Correctness criteria for protocols.

Slides:



Advertisements
Similar presentations
1 Process groups and message ordering If processes belong to groups, certain algorithms can be used that depend on group properties membership create (
Advertisements

Chapter 12 Message Ordering. Causal Ordering A single message should not be overtaken by a sequence of messages Stronger than FIFO Example of FIFO but.
Logical Clocks (2).
CS425/CSE424/ECE428 – Distributed Systems – Fall 2011 Material derived from slides by I. Gupta, M. Harandi, J. Hou, S. Mitra, K. Nahrstedt, N. Vaidya.
CS4231 Parallel and Distributed Algorithms AY 2006/2007 Semester 2 Lecture 6 Instructor: Haifeng YU.
Byzantine Generals. Outline r Byzantine generals problem.
Computer Networking A Top-Down Approach Chapter 4.7.
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.
PROTOCOL VERIFICATION & PROTOCOL VALIDATION. Protocol Verification Communication Protocols should be checked for correctness, robustness and performance,
Time and Global States Part 3 ECEN5053 Software Engineering of Distributed Systems University of Colorado, Boulder.
Computer Science 425 Distributed Systems CS 425 / ECE 428 Consensus
Consistency and Replication (3). Topics Consistency protocols.
Chapter 7 Synchronization. Topics Physical clock synchronization Logical clock synchronization Causality relation Lamport’s logical clock Vector logical.
CPSC 668Set 5: Synchronous LE in Rings1 CPSC 668 Distributed Algorithms and Systems Spring 2008 Prof. Jennifer Welch.
The Byzantine Generals Problem (M. Pease, R. Shostak, and L. Lamport) January 2011 Presentation by Avishay Tal.
1 Complexity of Network Synchronization Raeda Naamnieh.
LEADER ELECTION CS Election Algorithms Many distributed algorithms need one process to act as coordinator – Doesn’t matter which process does the.
CPSC 668Set 15: Broadcast1 CPSC 668 Distributed Algorithms and Systems Fall 2009 Prof. Jennifer Welch.
Group Communications Group communication: one source process sending a message to a group of processes: Destination is a group rather than a single process.
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.
Aran Bergman Eddie Bortnikov, Principles of Reliable Distributed Systems, Technion EE, Spring Principles of Reliable Distributed Systems Recitation.
EEC 693/793 Special Topics in Electrical Engineering Secure and Dependable Computing Lecture 13 Wenbing Zhao Department of Electrical and Computer Engineering.
CPSC 668Set 15: Broadcast1 CPSC 668 Distributed Algorithms and Systems Fall 2006 Prof. Jennifer Welch.
Ordered Communication. Define guarantees about the order of deliveries inside group of processes Type of ordering: Deliveries respect the FIFO ordering.
Aran Bergman, Principles of Reliable Distributed Systems, Technion EE, Spring Principles of Reliable Distributed Systems Recitation 5: Reliable.
Cloud Computing Concepts
Distributed Algorithms: Agreement Protocols. Problems of Agreement l A set of processes need to agree on a value (decision), after one or more processes.
Time, Clocks, and the Ordering of Events in a Distributed System Leslie Lamport (1978) Presented by: Yoav Kantor.
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.
Logical Clocks n event ordering, happened-before relation (review) n logical clocks conditions n scalar clocks condition implementation limitation n vector.
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS Fall 2011 Prof. Jennifer Welch CSCE 668 Set 15: Broadcast 1.
Reliable Communication in the Presence of Failures Based on the paper by: Kenneth Birman and Thomas A. Joseph Cesar Talledo COEN 317 Fall 05.
Issues with Clocks. Context The tree correction protocol was based on the idea of local detection and correction. Protocols of this type are complex to.
Multicast Communication. Unicast vs. Multicast Multicast Whereas the majority of network services and network applications use unicast for IPC, multicasting.
UDP User Datagram Protocol. User Datagram Protocol (UDP) UDP is the protocol available to network programmers who wish to send datagrams UDP datagrams.
Lamport’s Logical Clocks & Totally Ordered Multicasting.
Dealing with open groups The view of a process is its current knowledge of the membership. It is important that all processes have identical views. Inconsistent.
6/5/2016 Slides from Distributed Computing, M. L. Liu And Distributed system design and concepts 1 Chapter 6: Group Communication.
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.
Totally Ordered Broadcast in the face of Network Partitions [Keidar and Dolev,2000] INF5360 Student Presentation 4/3-08 Miran Damjanovic
Defining Liveness by Bowen Alpern and Fred B. Schneider Presented by Joe Melnyk.
CIS825 Lecture 2. Model Processors Communication medium.
D u k e S y s t e m s Asynchronous Replicated State Machines (Causal Multicast and All That) Jeff Chase Duke University.
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.
By Vivek Dimri. Basic Concepts on Networking IP Address – Protocol – Ports – The Client/Server Paradigm – Sockets The Java Networking Package – The InetAddress.
Building Dependable Distributed Systems, Copyright Wenbing Zhao
SysRép / 2.5A. SchiperEté The consensus problem.
Impossibility of Distributed Consensus with One Faulty Process By, Michael J.Fischer Nancy A. Lynch Michael S.Paterson.
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS Fall 2011 Prof. Jennifer Welch CSCE 668 Set 16: Distributed Shared Memory 1.
Logical Clocks. Topics r Logical clocks r Totally-Ordered Multicasting.
Event Ordering. CS 5204 – Operating Systems2 Time and Ordering The two critical differences between centralized and distributed systems are: absence of.
Lecture 4-1 Computer Science 425 Distributed Systems (Fall2009) Lecture 4 Chandy-Lamport Snapshot Algorithm and Multicast Communication Reading: Section.
COMP 655: Distributed/Operating Systems Summer 2011 Dr. Chunbo Chu Week 6: Synchronyzation 3/5/20161 Distributed Systems - COMP 655.
6.2 Logical Clocks Kranthi Koya09/23/2015. Overview Introduction Lamport’s Logical Clocks Vector Clocks Research Areas Conclusion.
Fault Tolerance (2). Topics r Reliable Group Communication.
CS 425 / ECE 428 Distributed Systems Fall 2015 Indranil Gupta (Indy) Lecture 9: Multicast Sep 22, 2015 All slides © IG.
Logical Clocks event ordering, happened-before relation (review) logical clocks conditions scalar clocks  condition  implementation  limitation vector.
Block 14 Group Communication (Multicast)
Group Communication 11/3/2018.
Computer Science 425 Distributed Systems CS 425 / ECE 428 Fall 2013
CS 425 / ECE 428 Distributed Systems Fall 2017 Indranil Gupta (Indy)
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS
Lecture 9: Ordered Multicasting
CSE 486/586 Distributed Systems Reliable Multicast --- 2
COT 5611 Operating Systems Design Principles Spring 2014
Presentation transcript:

2015/6/ Correctness criteria for protocols

2015/6/272 Delivery using different clocks

2015/6/273 ISIS message delivery

2015/6/ Group Communication

2015/6/275 IPv4 multicast addresses Class D (starts with bit sequence1110) to (about 2 28  268 million) is for “all systems on this subnet” ~ are for multimedia conference calls

2015/6/276 Java multicast sender String msg = “This is a test msg.”; InetAddress group=InetAddress.getByName(" "); MulticastSocket s = new MulticastSocket(3456); s.joinGroup(group); DatagramPacket msgOut = new DatagramPacket(msg.getBytes(), msg.length(), group, 3456); s.send(msgOut);

2015/6/277 Java multicast receiver byte[ ] buf = new byte[1000]; InetAddress group=InetAddress.getByName(" "); MulticastSocket s = new MulticastSocket(3456); s.joinGroup(group); DatagramPacket msgIn = new DatagramPacket(buf, buf.length); s.receive(msgIn);

2015/6/278 How to run

2015/6/279 Formal description of ISIS clock ICi P i initializes its clock IC i = [0,…,0]. For each msg sending event by P i  IC i [i]++  P i attaches IC i to message it sends. Upon receiving msg M from P j with M. ts, P i checks if  1) M.ts[j] == IC i [j] + 1 (M is next msg expected from P j )  2) IC i [k]  M.ts[k] for all other k (all msgs from P k that sender P j has received have been received by P i )  If both are satisfied, P i delivers M after IC i [j]++  Otherwise, P i puts M in hold-back Q until they are satisfied.

2015/6/2710 Comments 1) M.ts[j] == IC i [j] + 1 (M is next msg expected from P j ) 2) IC i [k]  M.ts[k] for all other k (all msgs from P k that sender P j has received have been received by P i )  If IC i [k] < M.ts[k], then before sending M, sender P j received msg M’ from P k that causally precedes M but M’ hasn’t been received by P i yet. ISIS delivers M before any other msg that is causally preceded by M  delivery respects causality order.

2015/6/2711 Example Violation check: M 3.ts[j] > IC 2 [j] for some j (j!=3)? Is there msg that sender knows about but receiver doesn’t? If so, receiver (P 2 ) delays delivery of M 3. M 3. ts[1] = 2 > 0 = IC 2 [1] in above example. “foo to P 2 ” “Do you have foo?” “Given to P 2 (=M 2 )” P1P1 P2P2 P3P3 Time M1M1 “Do you have foo?”(=M3)

2015/6/2712 continued… Migrate foo to P 2 “Where is foo?” “foo is at P 2 ” P1P1 P2P2 P3P3 Time M1M1 M2M2 M 2.ts[1] > IC 3 [1]+1 Put M 2 in Hold-back Q M1.ts[1] = IC 3 [1]+1 IC 3  101; deliver M 1 IC 3  201; deliver M 2 Note: j th component of M.ts is sequence number of latest msg sent by P j that is known to sender of M

2015/6/2713 M’  M if and only if M’.ts < M.ts Assume M’ (M) was sent by P k (P j ), where j=k is possible. [If M’  M then M’.ts < M.ts] is easy to show  P j received M’ before sending M : M’.ts < IC j [ ] < M.ts To show [If M’.ts < M.ts then M’  M], we show instead ![M’  M] then ![M’.ts < M.ts] Assume ![M’  M]  Sender of M ( P j ) didn’t know about M’ at time of sending M.  Thus, M’.ts[k] > M.ts[k], i.e., ![M’.ts < M.ts]

2015/6/2714 Safety Sufficient to show that msgs are delivered in timestamp order. Suppose not  Let m (m’) be event of sending message M (M’)  Assume P i delivered msg M (from P k ) before M’ (from P j ), even though M’.ts (= IC j (m’)) < M.ts (=IC k (m)) …….(A) (a) Just before P i delivered M’: IC i [j]+1 = IC j (m’)[j] hence IC i [j] < IC j (m’)[j] (b) Delivery of M would have resulted in IC i [j]* = IC k (m)[j] at time of delivery  (a) and (b) contradict (A) since (b) took place before (a), hence IC i [j]*  IC i [j]

2015/6/2715 Liveness

2015/6/2716 continued … Assume IC i [k] < M.ts[k] for some k (!=j), i.e., condition (2) is violated; want to derive contradiction from this. Let M’ be latest msg from P k that P j delivered prior to sending M so that M’.ts < M.ts and M’.ts[k] = M.ts[k]. If P i hasn’t delivered copy of msg M’ from P k, then M’ with M’.ts < M.ts is in holdback Q of P i, contradicting assumption that M is not causally preceded by any other msg in holdback Q of P i. So P i must have delivered copy of msg M’ from P k.Thus IC i [k]  M’.ts[k] = M.ts[k], contradicting IC i [k] < M.ts[k] Must give up assumption that P i cannot deliver M.

2015/6/2717 Proof illustration PjPj PkPk PiPi M’ M M.ts>M’.ts P i already delivered M’  IC i [k]  M.ts[k]