Slides for Chapter 11: Time and Global State

Slides:



Advertisements
Similar presentations
1DT066 D ISTRIBUTED I NFORMATION S YSTEM Time, Coordination and Agreement 1.
Advertisements

Slides for Chapter 18: Distributed Shared Memory From Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edition 4, © Pearson Education.
From Coulouris, Dollimore, Kindberg and Blair Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Slides for Chapter 14: Time and.
Last Class: Clock Synchronization
Logical Clocks (2).
Virtual Time “Virtual Time and Global States of Distributed Systems” Friedmann Mattern, 1989 The Model: An asynchronous distributed system = a set of processes.
Synchronization Chapter clock synchronization * 5.2 logical clocks * 5.3 global state * 5.4 election algorithm * 5.5 mutual exclusion * 5.6 distributed.
From Coulouris, Dollimore, Kindberg and Blair Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Exercises for Chapter 14: TIME.
Distributed Systems Spring 2009
Slides for Chapter 10: Time and Global State
Teaching material based on Distributed Systems: Concepts and Design, Edition 3, Addison-Wesley Copyright © George Coulouris, Jean Dollimore, Tim.
Time and Global States Chapter 11. Why time? Time is an Important and interesting issue in distributes systems. One we can measure accurately. Can use.
Logical Time and Logical Clocks
1 Slides for Chapter 10: Time (and Global State) From Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edition 3, © Addison-Wesley.
Slides for Chapter 1 Characterization of Distributed Systems From Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edition 3,
Time, Clocks and the Ordering of Events in a Distributed System - by Leslie Lamport.
Distribuerede systemer – 5. marts 2001 Presentation based on slides by Coulouris et al.
Computer Science Lecture 10, page 1 CS677: Distributed OS Last Class: Clock Synchronization Physical clocks Clock synchronization algorithms –Cristian’s.
Distributed Systems Foundations Lecture 1. Main Characteristics of Distributed Systems Independent processors, sites, processes Message passing No shared.
PHYSICAL AND LOGICAL TIME EE324 Lecture 11 Last Time– RPC  Why remote procedure calls?  Simple way to pass control and data  Elegant transparent way.
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.
Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1 Project Reference Some slides are in courtesy of Dr. Erciyes,
Distributed Mutex EE324 Lecture 11.
From Coulouris, Dollimore, Kindberg and Blair Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Slides for Chapter 18: Replication.
Slides for Chapter 14: Replication From Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edition 3, © Addison-Wesley 2001.
Slides for Chapter 12: Coordination and Agreement From Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edition 4, © Pearson.
Exercises for Chapter 18: Replication From Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edition 3, © Addison-Wesley 2001.
Page 1 Logical Clocks Paul Krzyzanowski Distributed Systems Except as otherwise noted, the content of this presentation is.
From Coulouris, Dollimore, Kindberg and Blair Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Slides for Chapter 2: Architectural.
CSE 486/586 CSE 486/586 Distributed Systems Logical Time Steve Ko Computer Sciences and Engineering University at Buffalo.
From Coulouris, Dollimore, Kindberg and Blair Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Slides for Chapter 21: Designing.
Slides for Chapter 2: Architectural Models
Fault Tolerant Services
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.
Time and global states Chapter 11. Outline Introduction Clocks, events and process states Synchronizing physical clocks Logical time and logical clocks.
Feb 15, 2001CSCI {4,6}900: Ubiquitous Computing1 Announcements.
From Coulouris, Dollimore, Kindberg and Blair Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Indirect Communication.
Exercises for Chapter 20: Distributed Multimedia Systems From Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edition 3, © Addison-Wesley.
Logical Clocks. Topics r Logical clocks r Totally-Ordered Multicasting.
Exercises for Chapter 2: System models From Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edition 4, © Pearson Education 2005.
Event Ordering. CS 5204 – Operating Systems2 Time and Ordering The two critical differences between centralized and distributed systems are: absence of.
Exercises for Chapter 9: Name Services From Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edition 4, © Pearson Education 2005.
Lecture 1: Logical and Physical Time with some Applications Anish Arora CSE 6333 Notes include material from Dr. Jeff Brumfield.
From Coulouris, Dollimore, Kindberg and Blair Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Slides for Chapter 15: Coordination.
6.2 Logical Clocks Kranthi Koya09/23/2015. Overview Introduction Lamport’s Logical Clocks Vector Clocks Research Areas Conclusion.
Exercises for Chapter 1: Characterization of Distributed Systems From Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edition.
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.
Slides for Chapter 11: Coordination and Agreement From Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edition 3, © Addison-Wesley.
Exercises for Chapter 14: Replication
Distributed Mutex EE324 Lecture 11.
Slides for Chapter 2: Architectural Models
Time and Clock Primary standard = rotation of earth
Slides for Chapter 2: Architectural Models
Slides for Chapter 14: Time and Global States
CS 425 / ECE 428  2013, I. Gupta, K. Nahrtstedt, S. Mitra, N. Vaidya, M. T. Harandi, J. Hou.
Exercises for Chapter 11: TIME AND GLOBAL STATES
Slides for Chapter 15: Replication
Basics of Distributed Systems
Slides for Chapter 1 Characterization of Distributed Systems
Slides for Chapter 11: Time and Global State
Slides for Chapter 14: Time and Global States
Lecture 8 Processes and events Local and global states Time
Slides for Chapter 18: Replication
Slides for Chapter 14: Time and Global States
CSE 542: Operating Systems
Exercises for Chapter 15: Distributed Multimedia Systems
Presentation transcript:

Slides for Chapter 11: Time and Global State From Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edition 4, © Pearson Education 2005

Logical time and clocks (11.4) can't synchronize physical clocks perfectly absolute time might not be necessary, just need ordering of events logical clocks: Lamport, 1978 happened-before relationship among events potential causal ordering Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005

Happen-before relation e -> e' two events occur in the same process a message is sent between two processes Happened-before relation: HB1: if e -> e' in process i, then e -> e' HB2: for any message m, send(m) -> receive(m) HB3: if e -> e' and e' -> e'', then e -> e'' Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005

Events occurring at three processes Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005

Happen-before vs. causality e || e' if the two events aren't in a particular order (concurrent) potential causality: e -> e’ doesn't mean that e causes e' naturally, if e causes e’, e -> e’ Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005

Logical clocks (Lamport) each process i keeps a local clock Li updating logical clocks: LC1: Li := Li + 1 for each event in process i LC2: When a process i sends a message m it piggybacks on m the value of t = Li Upon receiving (m,t), process j computes Lj := max( Lj, t ) and then applies LC1 before timestamping the event receive(m) if e -> e', then L(e) < L(e') but L(e) < L(e') doesn't imply e -> e'. Why? (Fig. 11.6) Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005

Lamport timestamps (Fig 11.6) Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005

Totally ordered logical clocks different processes, same Lamport time Time: (Ti, i ) (Ti, i ) < (Tj, j ) iff Ti < Tj or Ti = Tj and i < j Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005

Vector clocks Lamport clocks: L(e) < L(e') doesn't imply e -> e' each process keeps its own vector clock Vi piggyback timestamps on messages updating vector clocks: VC1: Initially, Vi[ j ] := 0 for pi, j=1.. N (N processes) VC2: before pi timestamps an event, Vi[ i ] := Vi[ i ]+1 VC3: pi piggybacks t = Vi on every message it sends VC4: when pj receives a timestamp t, it sets Vj[ k ] := max(Vj[ k ] , t[ k ]) for k=1..N (merge operation) Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005

Vector timestamps (Fig 11.7) Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005

Vector clocks At pi Vi[i] is the number of events pi timestamped locally Vi[j] is the number of events that have occurred at pj (that has potentially affected pi ) Could more events than Vi[j] have occurred at pj? Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005

Comparing vector timestamps V = V’ iff V[j] = V’[j], j = 1 .. N V <= V’ iff V[j] <= V’[j], j = 1 .. N V < V' iff V <= V' and V != V‘ Different from < in all elements Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005

if e -> e', then V(e) < V(e') Vector timestamps if e -> e', then V(e) < V(e') if V(e) < V(e'), then e -> e'. (Exercise 11.13) Figure 11.7 neither V(c) <= V(e) nor V(c) >= V(e) c || e Disadvantage compared to Lamport timestamps? Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005