Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1 Project Reference Some slides are in courtesy of Dr. Erciyes,

Slides:



Advertisements
Similar presentations
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.
Advertisements

Last Class: Clock Synchronization
Logical Clocks (2).
CS4231 Parallel and Distributed Algorithms AY 2006/2007 Semester 2 Lecture 4 Instructor: Haifeng YU.
Virtual Time “Virtual Time and Global States of Distributed Systems” Friedmann Mattern, 1989 The Model: An asynchronous distributed system = a set of processes.
SES Algorithm SES: Schiper-Eggli-Sandoz Algorithm. No need for broadcast messages. Each process maintains a vector V_P of size N - 1, N the number of processes.
Theoretical Aspects Logical Clocks Causal Ordering
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.
Distributed Systems Spring 2009
CMPT 431 Dr. Alexandra Fedorova Lecture VIII: Time And Global Clocks.
Group Communications Group communication: one source process sending a message to a group of processes: Destination is a group rather than a single process.
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.
1 Distributed Process Management: Distributed Global States and Distributed Mutual Exclusion.
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.
Dr. Kalpakis CMSC 621, Advanced Operating Systems. Fall 2003 URL: Logical Clocks and Global State.
Synchronization Chapter 6 Part I Clock Synchronization & Logical clocks Part II Mutual Exclusion Part III Election Algorithms Part IV Transactions.
Chapter 17 Theoretical Issues in Distributed Systems
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.
CSE 486/586, Spring 2013 CSE 486/586 Distributed Systems Logical Time Steve Ko Computer Sciences and Engineering University at Buffalo.
Fall 2014 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1.
Distributed Mutex EE324 Lecture 11.
Fall 2015 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1.
Fall 2015 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1.
Logical Clocks n event ordering, happened-before relation (review) n logical clocks conditions n scalar clocks condition implementation limitation n vector.
Fall 2015 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1.
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.
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.
Fall 2015 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1.
“Virtual Time and Global States of Distributed Systems”
CSE 486/586 CSE 486/586 Distributed Systems Logical Time Steve Ko Computer Sciences and Engineering University at Buffalo.
Communication & Synchronization Why do processes communicate in DS? –To exchange messages –To synchronize processes Why do processes synchronize in DS?
Fall 2015 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1.
Event Ordering Greg Bilodeau CS 5204 November 3, 2009.
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.
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.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
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.
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.
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.
CSE 486/586, Spring 2014 CSE 486/586 Distributed Systems Logical Time Steve Ko Computer Sciences and Engineering University at Buffalo.
SYNCHORNIZATION Logical Clocks.
Time and Clock Primary standard = rotation of earth
Outline Theoretical Foundations - continued Vector clocks - review
Logical Clocks and Casual Ordering
Time And Global Clocks CMPT 431.
Event Ordering.
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
Basics of Distributed Systems
Lecture 8 Processes and events Local and global states Time
Outline Theoretical Foundations - continued
Distributed algorithms
Outline Theoretical Foundations
Presentation transcript:

Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1 Project Reference Some slides are in courtesy of Dr. Erciyes, CSU San Marcos / Dr. Prabhakaran, UT-Dallas Fall 2014 COMP 4605 / CISG 5605 Computer Networks

Fall 2012 CISG 5500 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University Inherent Limitation of Distributed Systems Absence of a global clock (system-wide common clock) Difficult to decide which event occurred first inside a distributed system Absence of shared memory No individual process has an up-to-date state of the entire system A view of a system is coherent if all the observations of different processes are made at the same physical time A process in a distributed system can be obtain a coherent but partial view of the system or a complete but incoherent view of the system. A complete view is also referred to as a global state. 2

Fall 2012 CISG 5500 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University Impact of Lack of Global View 3 $500$200 $450$200 $500$250

Fall 2012 CISG 5500 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University Lamport’s Logical Clocks 4

Fall 2012 CISG 5500 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University Lamport’s Logical Clocks – cont’ Space-time Diagram 5 Time Space Internal Events Messages

Fall 2012 CISG 5500 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University Lamport’s Logical Clocks – cont’ 6

Fall 2012 CISG 5500 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University Lamport’s Logical Clocks – cont’ Example of Logical Clocks 7 (1) (2) (3) (4) (5=max(4+1,2+1) (6) (7=max(6+1,4+1) (1) (2) (3=max(2+1,2+1)) (4) (7=max(6+1,4+1))

Fall 2012 CISG 5500 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University Limitation of Lamport’s Logical Clocks 8 (1) (2) (3) (4) (6) (1) (2) (3) (4) (7) (5)(7)

Fall 2012 CISG 5500 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University Vector Clocks Keep track of transitive dependencies among processes for recovery purposes. is a “vector” clock at process whose entries are the “assumed”/”best guess” clock values of different processes. is the best guess of for ’s clock for Vector clock rules: 1. for successive events in 2.For all k,, when a message m with time stamp is received by from. 9

Fall 2012 CISG 5500 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University 10 (1,0,0) (2,0,0) (3,4,1) (0,1,0) (2,2,0) (2,4,1) (2,3,1) (0,0,1) (0,0,2) Equal: iff Not equal: iff Less than or equal: iff Not less than or equal: iff Less than: iff and Not less than: iff ( and ) Concurrent: iff and Vector Clocks – cont’

Fall 2012 CISG 5500 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University Causal Ordering of Messages 11 Events a and b are causally related if or. Otherwise, these events are concurrent. In the system of vector clocks, iff. Casual ordering of messages If, then every recipient of both messages must receive before. (Otherwise, postpones to process until is received) (2) (1)

Fall 2012 CISG 5500 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University BSS Protocol for Causal Ordering of Messages 12 BSS: Birman-Schiper-Stephenson Protocol Broadcast based: a message sent is received by all other processes. Deliver a message to a process only if the message preceding it immediately, has been delivered to the process. Otherwise, buffer the message. Accomplished by using a vector accompanying the message.

Fall 2012 CISG 5500 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University BSS Protocol for Causal Ordering of Messages – cont’ 13 1.Process increments the vector time, timestamps, and broadcasts the message m. denotes the number of messages preceding m. 2.A process receives m. m is delivered when: a. b. for all k in, n is the total number of processes. Delayed message are queued in a sorted manner. c.Concurrent messages are ordered by time of receipt. 3.When m is delivered at, updated according Rule 2 of vector clocks. a. has received all ’s messages preceding m. b. has received all other messages received by before sending m.

Fall 2012 CISG 5500 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University BSS Protocol for Causal Ordering of Messages – cont’ 14 (buffer) (0,0,1) (0,1,1) (0,0,1)(0,1,1) (0,0,1)(0,1,1) deliver from buffer (0,0,0)