11-Jun-16CSE 542: Operating Systems1 Distributed systems Time, clocks, and the ordering of events in a distributed system Leslie Lamport. Communications.

Slides:



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

Virtual Time “Virtual Time and Global States of Distributed Systems” Friedmann Mattern, 1989 The Model: An asynchronous distributed system = a set of processes.
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.
Dr. Kalpakis CMSC 621, Advanced Operating Systems. Logical Clocks and Global State.
Ordering and Consistent Cuts Presented By Biswanath Panda.
Distributed Operating Systems CS551 Colorado State University at Lockheed-Martin Lecture 7 -- Spring 2001.
Ordering and Consistent Cuts
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.
EEC-681/781 Distributed Computing Systems Lecture 11 Wenbing Zhao Cleveland State University.
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.
Computer Science Lecture 10, page 1 CS677: Distributed OS Last Class: Clock Synchronization Physical clocks Clock synchronization algorithms –Cristian’s.
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.
Dr. Kalpakis CMSC 621, Advanced Operating Systems. Fall 2003 URL: Logical Clocks and Global State.
Logical Clocks (2). Topics r Logical clocks r Totally-Ordered Multicasting r Vector timestamps.
Chapter 5.
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.
EECS 262a Advanced Topics in Computer Systems Lecture 14 Lamport Clocks and OCC October 20 th, 2014 John Kubiatowicz Electrical Engineering and Computer.
© Oxford University Press 2011 DISTRIBUTED COMPUTING Sunita Mahajan Sunita Mahajan, Principal, Institute of Computer Science, MET League of Colleges, Mumbai.
Page 1 Logical Clocks Paul Krzyzanowski Distributed Systems Except as otherwise noted, the content of this presentation is.
Lamport’s Logical Clocks & Totally Ordered Multicasting.
“Virtual Time and Global States of Distributed Systems”
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.
CS603 Clock Synchronization February 4, What is Clock Synchronization? All nodes agree on time What do we mean by time? –Monotonic –Any observation.
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.
, F’04 Lamport clocks Dave Eckhardt L36_Lamport.
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.
IMPLEMENTATION OF LAMPORT’S SCALAR CLOCKS Surekha Busa.
Ordering of Events in Distributed Systems UNIVERSITY of WISCONSIN-MADISON Computer Sciences Department CS 739 Distributed Systems Andrea C. Arpaci-Dusseau.
Logical time Causality between events is fundamental to the design of parallel and distributed systems. In distributed systems, it is not possible to have.
John Kubiatowicz and Anthony D. Joseph
Time, Clocks, and Global State Part-2
CSC 8320 Advanced Operating System
Distributed Mutex EE324 Lecture 11.
SYNCHORNIZATION Logical Clocks.
EECS 498 Introduction to Distributed Systems Fall 2017
Distributed Systems CS
Outline Theoretical Foundations - continued Vector clocks - review
DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S
John Kubiatowicz Electrical Engineering and Computer Sciences
Logical Clocks and Casual Ordering
Outline Theoretical Foundations - continued Lab 1
Event Ordering.
Outline Theoretical Foundations
Chien-Liang Fok Distribution Seminar Chien-Liang Fok
TIME, CLOCKS AND THE ORDERING OF EVENTS IN A DISTRIBUTED SYSTEM
Distributed Systems CS
Chapter 5 (through section 5.4)
Basics of Distributed Systems
Outline Theoretical Foundations - continued
Distributed Systems CS
Distributed algorithms
John Kubiatowicz Electrical Engineering and Computer Sciences
CSE 542: Operating Systems
Outline Theoretical Foundations
Presentation transcript:

11-Jun-16CSE 542: Operating Systems1 Distributed systems Time, clocks, and the ordering of events in a distributed system Leslie Lamport. Communications of the ACM, 21(7): , July 1978 –Formal description of distributed systems concepts The ABCDs of Paxos, Butler W. Lampson, PODC 2001 –Consensus among a group of unreliable processors

Partial ordering Assume that the system is made of a number of processes. Each process consists of a sequence of events. “happens before” relationship: –If a and b are events in the same process, a comes before b, then a happens before b. –If a is the sending a message and b is the receipt of it, then a happens before b. –If a happens before b and b happens before c, then a happens before c If a does not happen before b and b does not happen before a, a and b are concurrent

Partial Ordering p3 and q3 are concurrent. Process PProcess QProcess R p4 p3 p2 p1 q7 q6 q5 q4 q3 q2 q1 r4 r3 r2 r1

Logical clocks Clock is just a way of assigning a number to an event, number is thought of the time at which the event occurred. Clock C for each process P is a function that assigns a number Ci to any event a. Clock condition: –For any event a, b: if a happens before b, then C(a)<C(b) Happens before condition holds if: –a and b are events in process P, and a comes before b, then C(a) < C(b) –a is the sending of a message and b is the receipt then C(a)<C(b)

Implementable clock condition 1.Each process P, increments C between any two successive events 2.If event a is the sending of a message m by process Pi, then the message m contains a timestamp Tm=Ci(a). Upon receiving a message m, process Pj sets Cj greater than or equal to its present value and greater than Tm.

Total ordering of events We can use a system of clocks satisfying the clock condition to place a total ordering on the set of all system events. We order events by the times at which they occur. To break ties, we use any arbitrary total ordering of the processes –If a is an event in Pi and b is an event in Pj, then a  b iff Ci(a) < Cj(b) or Ci(a) = Ci(b) and Pi < Pj Total ordering depends on the clocks (C). Partial ordering is absolute

Application Algorithm for granting a resource which satisfies: 1.A process which has been granted the resource must release it before it can be granted to another process 2.Different requests for the resource must be granted in the order in which they are made 3.If event process which is granted the resource eventually releases it, then every request is eventually granted Central server based approaches that use the time received to grant resources does not work if two request take different times to reach the service

Physical clocks To synchronize clocks: –Sender sends message with time stamp –Receiver receives responses. The difference in expected and unexpected delay is the clock drift. They derive a bound on time taken to synchronize clocks.