Concurrent events If a, b are concurrent, LT(a) and LT(b) may have arbitrary values! Thus, logical time lets us determine that a potentially happened before.

Slides:



Advertisements
Similar presentations
Time, Clocks, and the Ordering of Events in a Distributed System
Advertisements

Time and Global States Part 3 ECEN5053 Software Engineering of Distributed Systems University of Colorado, Boulder.
Time and synchronization (“There’s never enough time…”)
Distributed Systems Spring 2009
Ordering and Consistent Cuts Presented By Biswanath Panda.
CMPT 431 Dr. Alexandra Fedorova Lecture VIII: Time And Global Clocks.
CPSC 668Set 12: Causality1 CPSC 668 Distributed Algorithms and Systems Fall 2009 Prof. Jennifer Welch.
CS514: Intermediate Course in Operating Systems Professor Ken Birman Vivek Vishnumurthy: TA.
Logical Clocks Ken Birman. Time: A major issue in distributed systems  We tend to casually use temporal concepts  Example: “p suspects that q has failed”
Time, Clocks and the Ordering of Events in a Distributed System - by Leslie Lamport.
Lecture 12 Synchronization. EECE 411: Design of Distributed Software Applications Summary so far … A distributed system is: a collection of independent.
Reliable Distributed Systems More on Group Communication.
Time, Clocks, and the Ordering of Events in a Distributed System Leslie Lamport (1978) Presented by: Yoav Kantor.
Distributed Systems Foundations Lecture 1. Main Characteristics of Distributed Systems Independent processors, sites, processes Message passing No shared.
CSE 486/586, Spring 2013 CSE 486/586 Distributed Systems Logical Time Steve Ko Computer Sciences and Engineering University at Buffalo.
Logical Clocks n event ordering, happened-before relation (review) n logical clocks conditions n scalar clocks condition implementation limitation n vector.
Page 1 Logical Clocks Paul Krzyzanowski Distributed Systems Except as otherwise noted, the content of this presentation is.
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.
Synchronization. Why we need synchronization? It is important that multiple processes do not access shared resources simultaneously. Synchronization in.
Logical Clocks. Topics Logical clocks Totally-Ordered Multicasting Vector timestamps.
Lamport’s Logical Clocks & Totally Ordered Multicasting.
CS514: Intermediate Course in Operating Systems Professor Ken Birman Krzys Ostrowski: TA.
“Virtual Time and Global States of Distributed Systems”
CSE 486/586 CSE 486/586 Distributed Systems Logical Time Steve Ko Computer Sciences and Engineering University at Buffalo.
Communication & Synchronization Why do processes communicate in DS? –To exchange messages –To synchronize processes Why do processes synchronize in DS?
Event Ordering Greg Bilodeau CS 5204 November 3, 2009.
Time, Clocks, and the Ordering of Events in a Distributed System Leslie Lamport Massachusetts Computer Associates,Inc. Presented by Xiaofeng Xiao.
CIS825 Lecture 2. Model Processors Communication medium.
9/14/20051 Time, Clocks, and the Ordering of Events in a Distributed System by L. Lamport CS 5204 Operating Systems Vladimir Glina Fall 2005.
D u k e S y s t e m s Asynchronous Replicated State Machines (Causal Multicast and All That) Jeff Chase Duke University.
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 1: Logical and Physical Time with some Applications Anish Arora CSE 6333 Notes include material from Dr. Jeff Brumfield.
Logical Clocks event ordering, happened-before relation (review) logical clocks conditions scalar clocks  condition  implementation  limitation vector.
CSE 486/586, Spring 2014 CSE 486/586 Distributed Systems Logical Time Steve Ko Computer Sciences and Engineering University at Buffalo.
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
Logical time Causality between events is fundamental to the design of parallel and distributed systems. In distributed systems, it is not possible to have.
Time and Clock Primary standard = rotation of earth
CSE 486/586 Distributed Systems Logical Time
Mathematical Structures for Computer Science Chapter 6
CSE 486/586 Distributed Systems Logical Time
Routing: Distance Vector Algorithm
Overview of Ordering and Logical Time
SYNCHORNIZATION Logical Clocks.
Time and Clock Primary standard = rotation of earth
EECS 498 Introduction to Distributed Systems Fall 2017
Time and Clock.
Intercultural Communication
Chapter 7 Deadlock.
Time and Clock.
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS
Quantum One.
Time And Global Clocks CMPT 431.
Event Ordering.
EEC 688/788 Secure and Dependable Computing
Non-Distributed Excercises
Outline Theoretical Foundations
CS 425 / ECE 428  2013, I. Gupta, K. Nahrtstedt, S. Mitra, N. Vaidya, M. T. Harandi, J. Hou.
ITEC452 Distributed Computing Lecture 10 Time in a Distributed System
Numerical Analysis Lecture 17.
Chapter 5 (through section 5.4)
EEC 688/788 Secure and Dependable Computing
EEC 688/788 Secure and Dependable Computing
Logical time (Lamport)
CSE 486/586 Distributed Systems Reliable Multicast --- 2
CSE 486/586 Distributed Systems Logical Time
Proof of liveness: an example
Outline Theoretical Foundations
Vector timestamps (auxiliary material from optional text [Bir05])
Presentation transcript:

Concurrent events If a, b are concurrent, LT(a) and LT(b) may have arbitrary values! Thus, logical time lets us determine that a potentially happened before b, but not that a definitely did so! Example: processes p and q never communicate. Both will have events 1, 2, ... but even if LT(e)<LT(e’) e may not have happened before e’

Vector timestamps Extend logical timestamps into a list of counters, one per process in the system Again, each process keeps its own copy Event e occurs at process p: p increments VT(p)[p] (p’th entry in its own vector clock) q receives a message from p: q sets VT(q)=max(VT(q),VT(p)) (element-by-element)

Illustration of vector timestamps [1,0,0,0] [2,0,0,0] [2,1,1,0] [2,2,1,0] [0,0,1,0] [0,0,0,1]

Vector timestamps accurately represent happens-before relation Define VT(e)<VT(e’) if, for all i, VT(e)[i]<VT(e’)[i], and VT(e)VT(e’) Example: if VT(e)=[2,1,1,0] and VT(e’)=[2,3,1,0] then VT(e)<VT(e’) Notice that not all VT’s are “comparable” under this rule: consider [4,0,0,0] and [0,0,0,4]

Vector timestamps accurately represent happens-before relation Now can show that VT(e)<VT(e’) if and only if e  e’: If e  e’, then there exists a chain e0  e1  ...  en on which vector timestamps increase “hop by hop” If VT(e)<VT(e’) suffices to look at VT(e’)[proc(e)], where proc(e) is the place that e occured. By definition, we know that VT(e’)[proc(e)] is at least as large as VT(e)[proc(e)], and by construction, this implies a chain of events from e to e’

Examples of VT’s and happens-before Example: suppose that VT(e)=[2,1,0,1] and VT(e’)=[2,3,0,1], so VT(e)<VT(e’) How did e’ “learn” about the 3 and the 1? Either these events occured at the same place as e’, or Some chain of send/receive events carried the values! If VT’s are not comparable, the corresponding events are concurrent

Vector timestamps require an agreed notion of system membership For vector to make sense, must agree on the number of entries and the process that owns each entry Later will see that vector timestamps are useful within groups of processes Will also find ways to compress them and to deal with dynamic group membership changes