Lecture 1: Logical and Physical Time with some Applications Anish Arora CSE 6333 Notes include material from Dr. Jeff Brumfield.

Slides:



Advertisements
Similar presentations
Lecture 1: Logical, Physical & Casual Time (Part 2) Anish Arora CSE 763.
Advertisements

Time, Clocks, and the Ordering of Events in a Distributed System
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
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.
Lecture 13 Synchronization (cont). EECE 411: Design of Distributed Software Applications Logistics Last quiz Max: 69 / Median: 52 / Min: 24 In a box outside.
Issues with Clocks. Problem Lack of global time –Need to compare different events in a distributed system.
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.
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.
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.
Chapter 17 Theoretical Issues in Distributed Systems
Logical Clocks (2). Topics r Logical clocks r Totally-Ordered Multicasting r Vector timestamps.
Chapter 5.
CSE 486/586, Spring 2013 CSE 486/586 Distributed Systems Logical Time Steve Ko Computer Sciences and Engineering University at Buffalo.
EECS 262a Advanced Topics in Computer Systems Lecture 14 Lamport Clocks and OCC October 20 th, 2014 John Kubiatowicz Electrical Engineering and Computer.
Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1 Project Reference Some slides are in courtesy of Dr. Erciyes,
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.
Lamport’s Logical Clocks & Totally Ordered Multicasting.
CSE 486/586 CSE 486/586 Distributed Systems Logical Time Steve Ko Computer Sciences and Engineering University at Buffalo.
Synchronization Chapter 5.
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.
Synchronization Chapter 5. Clock Synchronization When each machine has its own clock, an event that occurred after another event may nevertheless be assigned.
, F’04 Lamport clocks Dave Eckhardt L36_Lamport.
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.
6.2 Logical Clocks Kranthi Koya09/23/2015. Overview Introduction Lamport’s Logical Clocks Vector Clocks Research Areas Conclusion.
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.
CSE 486/586, Spring 2014 CSE 486/586 Distributed Systems Logical Time Steve Ko Computer Sciences and Engineering University at Buffalo.
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.
CSE 486/586 Distributed Systems Logical Time
Lecture 3: State, Detection
CSE 486/586 Distributed Systems Logical Time
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
COT 5611 Operating Systems Design Principles Spring 2012
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
TIME, CLOCKS AND THE ORDERING OF EVENTS IN A DISTRIBUTED SYSTEM
Chapter 5 (through section 5.4)
Basics of Distributed Systems
CSE 542: Operating Systems
Proof of liveness: an example
COT 5611 Operating Systems Design Principles Spring 2014
Outline Theoretical Foundations
Presentation transcript:

Lecture 1: Logical and Physical Time with some Applications Anish Arora CSE 6333 Notes include material from Dr. Jeff Brumfield

Required Reading Time, Clocks, and the Ordering of Events in a Distributed System  by Leslie Lamport  research.microsoft.com/users/lamport/pubs/time-clocks.pdf research.microsoft.com/users/lamport/pubs/time-clocks.pdf Chapter 5 in Paul Sivilotti's book

Why Time Is Important Scheduling of Requests  Time-dependent policies such as FCFS Prearranged Synchronization  Set of processes perform action at give time  Each process has time slice for activity  One process begins at time another finishes Multi-version Objects  Latest timestamp implies newest version Interpretation of Data  Data that is a function of time (e.g., seismic data) Timestamping Events

Motivation Observer A: “star 1 exploded before star 2” Observer B: “star 2 exploded before star 1” Can the observers determine the truth? What if the speed of light is not constant?

Ordering Events What do we mean when we say that: event A happened before event B? Answer: A happened at an earlier time than B Problem: This definition requires clocks. Clocks aren't perfectly accurate and don't keep precise physical time Can we define the notion of “happened before” without using clocks?

The “Happened Before” Relation Event A happened before event B if  1) A and B are events in the same process and A came before B  2) A is the sending of a message by one process and B is the receipt of that message by another process  3) A happened before C, and C happened before B This definition assumes that a process is a set of events with an a priori total ordering If event A happened before event B then it is possible for event A to causally affect event B

Concurrent Events Events A and B are concurrent if  1) A did not happen before B, and  2) B did not happen before A If two events are concurrent, then neither can causally affect the other Note that concurrency is not transitive. If A and B are concurrent and B and C are concurrent, it does not necessarily follow that A and C are concurrent

Space-Time Diagrams

Logical Clocks A clock is a way of assigning a number to an event, where the number is thought of as the time at which the event occurred Assume each process has a clock that assigns a number to any event in that process. A clock could simply be a counter A system of clocks is said to be correct if it satisfies the following condition:  For any two events A and B, if A happened before B then the time of event A is less than the time of event B

Implementing Logical Clocks Each process maintains its own logical clock, which assigns times to events in that process Each process increments its logical clock between successive events Each message contains a timestamp whose value is the time at which the message was sent Upon receiving a message, a process sets its clock greater than or equal to its present value and greater than the timestamp

Logical Clocks

Ordering Events Totally A system of logical clocks can be used to totally order the set of all system events:  Order the events by the times at which they occur  Break ties using any total ordering of the processes (e.g., unique process numbers) The total ordering depends on the system of clocks and the tie breaking scheme. It is not unique

Anomalous Behavior B's message may be given an earlier timestamp than A's, even though A and B both know that A's message was sent first