1 15-410, F’04 Lamport clocks Dave Eckhardt L36_Lamport.

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

Time, Clocks, and the Ordering of Events in a Distributed System
Synchronization.
Virtual Time “Virtual Time and Global States of Distributed Systems” Friedmann Mattern, 1989 The Model: An asynchronous distributed system = a set of processes.
D u k e S y s t e m s Time, clocks, and consistency and the JMM Jeff Chase Duke University.
Synchronization Chapter clock synchronization * 5.2 logical clocks * 5.3 global state * 5.4 election algorithm * 5.5 mutual exclusion * 5.6 distributed.
Distributed Systems Dinesh Bhat - Advanced Systems (Some slides from 2009 class) CS 6410 – Fall 2010 Time Clocks and Ordering of events Distributed Snapshots.
Distributed Systems Spring 2009
Ordering and Consistent Cuts Presented By Biswanath Panda.
CMPT 431 Dr. Alexandra Fedorova Lecture VIII: Time And Global Clocks.
Ordering and Consistent Cuts
Synchronization in Distributed Systems. Mutual Exclusion To read or update shared data, a process should enter a critical region to ensure mutual exclusion.
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 of events in Distributed Systems & Eventual Consistency Jinyang Li.
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.
Lecture 12 Synchronization. EECE 411: Design of Distributed Software Applications Summary so far … A distributed system is: a collection of independent.
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.
Lecture 2-1 CS 425/ECE 428 Distributed Systems Lecture 2 Time & Synchronization Reading: Klara Nahrstedt.
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.
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.
© Oxford University Press 2011 DISTRIBUTED COMPUTING Sunita Mahajan Sunita Mahajan, Principal, Institute of Computer Science, MET League of Colleges, Mumbai.
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.
Lamport’s Logical Clocks & Totally Ordered Multicasting.
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.
Distributed Coordination. Turing Award r The Turing Award is recognized as the Nobel Prize of computing r Earlier this term the 2013 Turing Award went.
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.
Distributed Process Coordination Presentation 1 - Sept. 14th 2002 CSE Spring 02 Group A4:Chris Sun, Min Fang, Bryan Maden.
DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S
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.
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.
Lecture 7- 1 CS 425/ECE 428/CSE424 Distributed Systems (Fall 2009) Lecture 7 Distributed Mutual Exclusion Section 12.2 Klara Nahrstedt.
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
Process Synchronization Presentation 2 Group A4: Sean Hudson, Syeda Taib, Manasi Kapadia.
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.
Logical time Causality between events is fundamental to the design of parallel and distributed systems. In distributed systems, it is not possible to have.
Distributed Computing
Overview of Ordering and Logical Time
Distributed Systems CS
Logical Clocks and Casual Ordering
Chien-Liang Fok Distribution Seminar Chien-Liang Fok
TIME, CLOCKS AND THE ORDERING OF EVENTS IN A DISTRIBUTED SYSTEM
Basics of Distributed Systems
Distributed Systems CS
CSE 542: Operating Systems
Outline Theoretical Foundations
Presentation transcript:

, F’04 Lamport clocks Dave Eckhardt L36_Lamport

, F’04 Synchronization ● Project 4 due today ● Homework 2 due Friday ● Book report due Friday ● FCE reminder – I will read (and take seriously) every word of what you write

, F’04 Outline ● Lamport clocks – Covered in 17.1, 17.2 (different focus from today) – Time, Clocks, and the Ordering of Events in a Distributed System ● CACM 21:7 (1978) ● Leslie Lamport also famous for...?

, F’04 Overview ● Light cones ● Meeting for beer ● “Happened before” partial order ● Logical clocks ● Advanced techniques

, F’04 Light cones ● Concept – Effects propagate at or below speed of light ● Objects, light/radio/X-rays, gravity – Knowledge of events limited the same way – Event propagation modeled by expanding sphere ● Four-dimensional “cone”

, F’04 Light cones

, F’04 Light cones

, F’04 Light cones

, F’04 Light cones

, F’04 Light cones

, F’04 Light cones

, F’04 Light cones

, F’04 Light cones

, F’04 Light cones ● Future light cone – The part of spacetime potentially influenced by an event ● Past light cone – The part of spacetime that could have influenced an event

, F’04 Meeting for Beer ● P1 transmits “Panther Hollow Inn” to blackboard

, F’04 Meeting for Beer ● P1 transmits “Panther Hollow Inn” to blackboard ● P1 transmits to P2 – Hey, P2, let's go have a beer. – I have transmitted the bar's name to the blackboard. – See you there!

, F’04 Meeting for Beer ● P1 transmits “Panther Hollow Inn” to blackboard ● P1 transmits to P2 – Hey, P2, let's go have a beer. – I have transmitted the bar's name to the blackboard. – See you there! ● P2 receives P1's message

, F’04 Meeting for Beer ● P1 transmits “Panther Hollow Inn” to blackboard ● P1 transmits to P2 – Hey, P2, let's go have a beer. – I have transmitted the bar's name to the blackboard. – See you there! ● P2 receives P1's message ● P2 queries blackboard

, F’04 Meeting for Beer ● P1 transmits “Panther Hollow Inn” to blackboard ● P1 transmits to P2 – Hey, P2, let's go have a beer. – I have transmitted the bar's name to the blackboard. – See you there! ● P2 receives P1's message ● P2 queries blackboard ● It says “Squirrel Cage” - how???

, F’04 Meeting for Beer

, F’04 Meeting for Beer

, F’04 Meeting for Beer

, F’04 Meeting for Beer

, F’04 Meeting for Beer

, F’04 Meeting for Beer

, F’04 What went wrong? ● P1 thought – Blackboard update happened before invitation ● P2 thought – Invitation happened before blackboard update ● When does an event “happen”? – When its effects propagate “everywhere relevant” ● What does “happen before” mean? ● Could that green node really be so slow?

, F’04 Universe Model ● System = set of processes ● Process = sequence of events ● Event – Internal: ++x; – Message transmission – Message reception

, F’04 “Happened before” partial order ● A happens before B (A   B) – If A and B happen inside a process, in (A, B) order – If A = transmission, B = reception, of same message – If A   B and B   C, then A   C ● A and B are concurrent when – A !   B and B   A ● Observe: A !   A

, F’04 Space-time Diagram ●   – inside a process, or – follow a message ● p0   r2 ● concurrent – p0, q0, r0 – p1, q1 – q1, r0 – p1, r0

, F’04   means “possibly causes” ● p0 possibly causes p1 –...by storing something in P's memory ● p0 possibly causes q1 – Message could trigger q1 ● Concurrent events –...cannot cause each other

, F’04 Logical clocks ● Can we assign timestamps to events? ● Want – If A   B then C(A) < C(B) ● Events inside P i – a   b  C i (a) < C i (b) ● Message from P i to P j – a=P i 's send, b=P j 's receive  C i (a) < C j (b)

, F’04 Logical clocks ● Events inside P i – Increment C i () between successive events ● Message from P i to P j – Sender: place timestamp T in message: C i (send) – Receiver: ensure C j (receive) > T

, F’04 Meeting for Beer

, F’04 Meeting for Beer

, F’04 Meeting for Beer

, F’04 Meeting for Beer

, F’04 Meeting for Beer

, F’04 Meeting for Beer

, F’04 What this means ● P1 wants – happened before ● Equivalent to “59 < 57” (oops) ● The events were concurrent ● “PHI” could not cause P2's bar trip

, F’04 Space-time Diagram ● P1 wants – happened before ● Equivalent to “59 < 57” (oops) ● The events were concurrent ● “PHI” could not cause P2's bar trip

, F’04 Fixing the problem ● P1 should wait for board to acknowledge ● “PHI” causes ACK ● ACK causes “Meet me at...” ● “Meet me at...” causes bar trip ● Then: “PHI” causes bar trip

, F’04 Extensions ● Define total ordering of system events – Typical (timestamp, process #) tuple comparison ● Process # used to break timestamp ties ● Distributed agreement algorithms – Such as “fair distributed mutual exclusion” ● Requests must be granted “in order” ● See text: 17.2 ● Adding physical (real-time) clocks

, F’04 Summary ● Light cones ● “Happened before” partial order ● Potential causality ● Another definition of concurrency – You've dealt with single-clock race conditions ● (one memory bus provides one global clock) – In distributed systems there is no global clock ● Timestamps track message causality