CS603 Clock Synchronization February 4, 2002. What is Clock Synchronization? All nodes agree on time What do we mean by time? –Monotonic –Any observation.

Slides:



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

COS 461 Fall 1997 Time and Clocks u uses of time in distributed systems: –time-based algorithms (e.g. in security) –distributed make –gathering event traces.
Prepare for Test 2. Synchronization Define semaphore and give algorithm Based on the traditional semaphore algorithms in the notes, show the value of.
Time and Clock Primary standard = rotation of earth De facto primary standard = atomic clock (1 atomic second = 9,192,631,770 orbital transitions of Cesium.
Distributed Systems Spring 2009
Ordering and Consistent Cuts Presented By Biswanath Panda.
Ordering and Consistent Cuts
Distributed Systems CS Synchronization – Part II Lecture 8, Sep 28, 2011 Majd F. Sakr, Vinay Kolar, Mohammad Hammoud.
EEC 693/793 Special Topics in Electrical Engineering Secure and Dependable Computing Lecture 13 Wenbing Zhao Department of Electrical and Computer Engineering.
Lecture 13 Synchronization (cont). EECE 411: Design of Distributed Software Applications Logistics Last quiz Max: 69 / Median: 52 / Min: 24 In a box outside.
Ordering and Consistent Cuts Presented by Chi H. Ho.
Time, Clocks and the Ordering of Events in a Distributed System - by Leslie Lamport.
EEC-681/781 Distributed Computing Systems Lecture 10 Wenbing Zhao Cleveland State University.
EEC-681/781 Distributed Computing Systems Lecture 10 Wenbing Zhao Cleveland State University.
Lecture 12 Synchronization. EECE 411: Design of Distributed Software Applications Summary so far … A distributed system is: a collection of independent.
Computer Science Lecture 10, page 1 CS677: Distributed OS Last Class: Clock Synchronization Physical clocks Clock synchronization algorithms –Cristian’s.
Lecture 9: Time & Clocks CDK4: Sections 11.1 – 11.4 CDK5: Sections 14.1 – 14.4 TVS: Sections 6.1 – 6.2 Topics: Synchronization Logical time (Lamport) Vector.
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.
TIME, CLOCKS AND THE ORDERING OF EVENTS IN A DISTRIBUTED SYSTEM L. Lamport Computer Science Laboratory SRI International.
Logical Clocks (2). Topics r Logical clocks r Totally-Ordered Multicasting r Vector timestamps.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Chapter 5.
Logical Clocks n event ordering, happened-before relation (review) n logical clocks conditions n scalar clocks condition implementation limitation n vector.
Computer Science Lecture 10, page 1 CS677: Distributed OS Last Class: Naming Name distribution: use hierarchies DNS X.500 and LDAP.
Page 1 Logical Clocks Paul Krzyzanowski Distributed Systems Except as otherwise noted, the content of this presentation is.
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.
Chapter 5 Synchronization Clocks and Synchronization Algorithms Lamport Timestamps and Vector Clocks Distributed Snapshots Termination Detection Election.
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.
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.
Logical Clocks. Topics Logical clocks Totally-Ordered Multicasting Vector timestamps.
DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S
CS 3471 CS 347: Parallel and Distributed Data Management Notes13: Time and Clocks.
CS 347Notes 121 CS 347: Parallel and Distributed Data Management Notes12: Time and Clocks Hector Garcia-Molina.
Feb 15, 2001CSCI {4,6}900: Ubiquitous Computing1 Announcements.
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.
Synchronization Chapter 5. Clock Synchronization When each machine has its own clock, an event that occurred after another event may nevertheless be assigned.
Lecture 1: Logical and Physical Time with some Applications Anish Arora CSE 6333 Notes include material from Dr. Jeff Brumfield.
Ordering of Events in Distributed Systems UNIVERSITY of WISCONSIN-MADISON Computer Sciences Department CS 739 Distributed Systems Andrea C. Arpaci-Dusseau.
CS533 Concepts of Operating Systems Class 8 Time, Clocks, and the Ordering of Events in a Distributed System By Constantia Tryman.
COMP 655: Distributed/Operating Systems Summer 2011 Dr. Chunbo Chu Week 6: Synchronyzation 3/5/20161 Distributed Systems - COMP 655.
IMPLEMENTATION OF LAMPORT’S SCALAR CLOCKS Surekha Busa.
1 Lamport clocks Dave Eckhardt
11-Jun-16CSE 542: Operating Systems1 Distributed systems Time, clocks, and the ordering of events in a distributed system Leslie Lamport. Communications.
Logical Clocks event ordering, happened-before relation (review) logical clocks conditions scalar clocks  condition  implementation  limitation vector.
Ordering of Events in Distributed Systems UNIVERSITY of WISCONSIN-MADISON Computer Sciences Department CS 739 Distributed Systems Andrea C. Arpaci-Dusseau.
John Kubiatowicz and Anthony D. Joseph
Overview of Ordering and Logical Time
SYNCHORNIZATION Logical Clocks.
Logical time (Lamport)
John Kubiatowicz Electrical Engineering and Computer Sciences
Event Ordering.
Chien-Liang Fok Distribution Seminar Chien-Liang Fok
Chapter 5 Synchronization
TIME, CLOCKS AND THE ORDERING OF EVENTS IN A DISTRIBUTED SYSTEM
Distributed Systems CS
Chapter 5 (through section 5.4)
CDK: Sections 11.1 – 11.4 TVS: Sections 6.1 – 6.2
Logical time (Lamport)
Logical time (Lamport)
John Kubiatowicz Electrical Engineering and Computer Sciences
Logical time (Lamport)
CSE 542: Operating Systems
Outline Theoretical Foundations
Presentation transcript:

CS603 Clock Synchronization February 4, 2002

What is Clock Synchronization? All nodes agree on time What do we mean by time? –Monotonic –Any observation increases –When sun is overhead, time is “noon” What do we mean by agree? –Clocks on different nodes give same reading when time requested simultaneously –Can’t distinguish readings from above definition

Event-based definition (Lamport ’78) Define partial order of processes A  B: A “happened before” B: Smallest relation such that: 1.If A and B in same process and A occurs first, A  B 2.If A is sending a message and B is receipt of a message, A  B 3.If A  B and B  C, then A  C Clock: C(x) is time x occurs: –C(x) = C i (x) where x running on node i. –Clocks correct if  a,b: a  b  C(a) < C(b)

Event-based clocks: Example PQR p1p1 q1q1 p3p3 p2p2 r1r1 q2q2 q3q3 q4q4 q5q5 q6q6 p4p4 r2r2 r3r3 r4r4

Time in a Distributed System PQR p1p1 q1q1 p3p3 p2p2 r1r1 q2q2 q3q3 q4q4 q5q5 q6q6 p4p4 r2r2 r3r3

Event-based definition (Lamport ’78) Define partial order of processes A  B: A “happened before” B: Smallest relation such that: 1.If A and B in same process and A occurs first, A  B 2.If A is sending a message and B is receipt of a message, A  B 3.If A  B and B  C, then A  C

Anomalous Events PQR p1p1 q1q1 p3p3 p2p2 r1r1 q2q2 q3q3 q4q4 q5q5 q6q6 p4p4 r2r2 r3r3 r4r4

Event-based definition (Lamport ’78) Define partial order of processes A  B: A “happened before” B: Smallest relation such that: 1.If A and B in same process and A occurs first, A  B 2.If A is sending a message and B is receipt of a message, A  B 3.If A  B and B  C, then A  C Clock: C(x) is time x occurs: –C(x) = C i (x) where x running on node i. –Clocks correct if  a,b: a  b  C(a) < C(b)

Event-based clocks PQR p1p1 q1q1 p3p3 p2p2 r1r1 q2q2 q3q3 q4q4 q5q5 q6q6 p4p4 r2r2 r3r3

Lamport Clock Implementation Node i Increments C i between any two successive events If event a is sending of a message m from i to j, –m contains timestamp T m = Ci(a) –Upon receiving m, set C j ≥ current C j and > T m Can now define total ordering. a  b iff: –C i (a) < C j (b) –C i (a) = C j (b) and P i < P j

What if we want “wall clock” time? C i must run at correct rate: –  κ << 1 such that | dC i (t)/dt – 1 | < κ Synchronized: –  small ε such that  i,j: | C i (t) – C j (t) | < ε Assume transmission time between μ and μ+ξ Algorithm: Upon receiving message m, set C j (t) = max(C j (t), T m +μ) Theorem: Assume every τ seconds a message with unpredictable delay ξ is sent over every arc. Then  t ≥ t 0 + τd, ε ≈ d(2κτ + ξ)

Is this it? What if we don’t know maximum delay ξ? What if a clock goes “bad” –Runs much too fast/slow –Gives wrong answers What about network faults? Can we do better in practice? –Probabilistic algorithms