6.2 Logical Clocks Kranthi Koya09/23/2015. Overview Introduction Lamport’s Logical Clocks Vector Clocks Research Areas Conclusion.

Slides:



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

Last Class: Clock Synchronization
Logical Clocks (2).
Logical Clocks.
Time and Global States Part 3 ECEN5053 Software Engineering of Distributed Systems University of Colorado, Boulder.
Distributed Computing
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.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED.
Distributed Systems Spring 2009
20101 Synchronization in distributed systems A collection of independent computers that appears to its users as a single coherent system.
Centralized Architectures
Lecture 13 Synchronization (cont). EECE 411: Design of Distributed Software Applications Logistics Last quiz Max: 69 / Median: 52 / Min: 24 In a box outside.
Time, Clocks and the Ordering of Events in a Distributed System - by Leslie Lamport.
CSE 486/586, Spring 2012 CSE 486/586 Distributed Systems Logical Time Steve Ko Computer Sciences and Engineering University at Buffalo.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
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.
Synchronization Chapter 6 Part I Clock Synchronization & Logical clocks Part II Mutual Exclusion Part III Election Algorithms Part IV Transactions.
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.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Chapter 5.
Synchronization in Distributed Systems Chapter 6.
Page 1 Logical Clocks Paul Krzyzanowski Distributed Systems Except as otherwise noted, the content of this presentation is.
Synchronization CSCI 4900/6900. Importance of Clocks & Synchronization Avoiding simultaneous access of resources –Cooperate to grant exclusive access.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
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.
“Virtual Time and Global States of Distributed Systems”
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.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
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.
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.
Synchronization CSCI 4900/6900. Importance of Clocks & Synchronization Avoiding simultaneous access of resources –Cooperate to grant exclusive access.
Logical Clocks. Topics Logical clocks Totally-Ordered Multicasting Vector timestamps.
DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S
D ISTRIBUTED S YSTEM UNIT-2 Theoretical Foundation for Distributed Systems Prepared By: G.S.Mishra.
Feb 15, 2001CSCI {4,6}900: Ubiquitous Computing1 Announcements.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
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.
6 SYNCHRONIZATION. introduction processes synchronize –exclusive access. –agree on the ordering of events much more difficult compared to synchronization.
Ordering of Events in Distributed Systems UNIVERSITY of WISCONSIN-MADISON Computer Sciences Department CS 739 Distributed Systems Andrea C. Arpaci-Dusseau.
COMP 655: Distributed/Operating Systems Summer 2011 Dr. Chunbo Chu Week 6: Synchronyzation 3/5/20161 Distributed Systems - COMP 655.
11-Jun-16CSE 542: Operating Systems1 Distributed systems Time, clocks, and the ordering of events in a distributed system Leslie Lamport. Communications.
Prof. Leonardo Mostarda University of Camerino
CSC 8320 Advanced Operating System
SYNCHORNIZATION Logical Clocks.
Time and Clock Primary standard = rotation of earth
Time and Clock.
Distributed Systems CS
Distributed Systems CS
Time and Clock.
DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S
Outline Theoretical Foundations
ITEC452 Distributed Computing Lecture 10 Time in a Distributed System
Distributed Systems CS
Distributed Systems CS
Lecture 9: Ordered Multicasting
Distributed Systems CS
Jenhui Chen Office number:
CSE 542: Operating Systems
Outline Theoretical Foundations
Presentation transcript:

6.2 Logical Clocks Kranthi Koya09/23/2015

Overview Introduction Lamport’s Logical Clocks Vector Clocks Research Areas Conclusion

Introduction Clock Synchronization Working of Unix make program If time in source file input. c > object file input.o make knows that input.c has been changed since input.o was created, and thus input.c must be re- compiled. If output.c has time < output.o, no compilation is needed.

Introduction Implications of the lack of global time on the UNIX make program When each machine has its own clock, an event that occurred after another event may nevertheless be assigned an earlier time.

Lamport’s Logical Clocks ‘happens-be-fore’ relation to synchronize logical clocks a ~ b is read "a happens before b" and means that all processes agree that first event a occurs, then event b occurs. a~ b is true when a and b are events in the same process, and a occurs before b. a ~ b is true if a is the event of a message being sent by one process, and b is the event of the message being received by another process

Lamport’s Logical Clocks To implement Lamport's logical clocks, each process Pi maintains a local counter G. 1. Before executing an event Pi executes Gf= G When process Pi sends a message m to Pj it sets timestamp ts (m) equal to G after having executed the previous step. 3. Upon the receipt of a message m, process lj adjusts its own local counter as 0f=max{0,ts(m)}, after which it then executes the first step and delivers the message to the application.

Lamport’s Logical Clocks

Totally Ordered Multicasting

Vector Clocks 1. Before executing an event (i.e., sending a message over the network, delivering a message to an application, or some other internal event), Pi executesVCj[I] ~ VCj[i] When process Pi sends a message m to lj, it sets m's (vector) time- stamp ts(m) equal to VCj after having executed the previous step. 3. Upon the receipt of a message m, process ij adjusts its own vector by setting VCj [k] ~ max {VCj [k], ts (m )[k]} for each k, after which it executes the first step and delivers the message to the application.

Vector Clocks Enforcing Casual Communication

Research Areas Logical Clocks in Distributed Systems

Research Areas Middle ware dealing with message ordering. Middle ware cannot tell what a message actually contains, only potential causality is captured. Example : Two messages from the same sender that are completely independent will always be marked as causally related by the middleware layer. Not all causality may be captured. Consider an electronic bulletin board. Suppose Alice posts an article. If she then phones Bob telling about what she just wrote, Bob may post another article as a reaction without having seen Alice's posting on the board. In other words, there is a causality between Bob's posting and that of Alice due to external communication. This causality is not captured by the bulletin board system.

Questions?

Thank you