Figure 10.1 Skew between computer clocks in a distributed system

Similar documents
Slides for Chapter 14: Time and Global States

Chapter 11 Time and Global States

Time is an important issue in DS

Snapshots. Chandy-Lamport Algorithm for the determination of consistent global states <$1000, 0> <$50, 2000> mark. (order 10, $100) mark

Agreement. Today. l Coordination and agreement in group communication. l Consensus

A subtle problem. An obvious problem. An obvious problem. An obvious problem. No!

Cuts. Cuts. Consistent cuts and consistent global states. Global states and cuts. A cut C is a subset of the global history of H

Our Problem. Model. Clock Synchronization. Global Predicate Detection and Event Ordering

Today. Vector Clocks and Distributed Snapshots. Motivation: Distributed discussion board. Distributed discussion board. 1. Logical Time: Vector clocks

Chandy-Lamport Snapshotting

Crashed router. Instructor s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 3 Pearson Education

Ordering and Consistent Cuts Nicole Caruso

Clocks in Asynchronous Systems

Consistent Global States of Distributed Systems: Fundamental Concepts and Mechanisms. CS 249 Project Fall 2005 Wing Wong

CptS 464/564 Fall Prof. Dave Bakken. Cpt. S 464/564 Lecture January 26, 2014

CS505: Distributed Systems

Distributed Systems Time and Global State

Distributed Algorithms Time, clocks and the ordering of events

7680: Distributed Systems

Distributed Computing. Synchronization. Dr. Yingwu Zhu

Time. To do. q Physical clocks q Logical clocks

Distributed Systems Fundamentals

Clock Synchronization

Distributed Algorithms (CAS 769) Dr. Borzoo Bonakdarpour

CS505: Distributed Systems

Distributed Algorithms

Time. Today. l Physical clocks l Logical clocks

CS 347 Parallel and Distributed Data Processing

Absence of Global Clock

DISTRIBUTED COMPUTER SYSTEMS

Distributed Systems. 06. Logical clocks. Paul Krzyzanowski. Rutgers University. Fall 2017

Causality and Time. The Happens-Before Relation

Causality & Concurrency. Time-Stamping Systems. Plausibility. Example TSS: Lamport Clocks. Example TSS: Vector Clocks

Information System Design IT60105

Systems of Linear Equations

Distributed Systems Principles and Paradigms. Chapter 06: Synchronization

Distributed Systems 8L for Part IB

Distributed Systems Principles and Paradigms

Exclusive Access to Resources in Distributed Shared Memory Architecture

CS5412: REPLICATION, CONSISTENCY AND CLOCKS

416 Distributed Systems. Time Synchronization (Part 2: Lamport and vector clocks) Jan 27, 2017

AGREEMENT PROBLEMS (1) Agreement problems arise in many practical applications:

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

MODELING TIME AND EVENTS IN A DISTRIBUTED SYSTEM

Section 6 Fault-Tolerant Consensus

Agreement Protocols. CS60002: Distributed Systems. Pallab Dasgupta Dept. of Computer Sc. & Engg., Indian Institute of Technology Kharagpur

SDS developer guide. Develop distributed and parallel applications in Java. Nathanaël Cottin. version

MAD. Models & Algorithms for Distributed systems -- 2/5 -- download slides at

Distributed Consensus

6.852: Distributed Algorithms Fall, Class 24

Formal Methods for Monitoring Distributed Computations

Logical Time. 1. Introduction 2. Clock and Events 3. Logical (Lamport) Clocks 4. Vector Clocks 5. Efficient Implementation

CS 425 / ECE 428 Distributed Systems Fall Indranil Gupta (Indy) Oct. 5, 2017 Lecture 12: Time and Ordering All slides IG

S1 S2. checkpoint. m m2 m3 m4. checkpoint P checkpoint. P m5 P

Variations on Itai-Rodeh Leader Election for Anonymous Rings and their Analysis in PRISM

CS505: Distributed Systems

Reliable Broadcast for Broadcast Busses

A Communication-Induced Checkpointing Protocol that Ensures Rollback-Dependency Trackability

Using Happens-Before Relationship to debug MPI non-determinism. Anh Vo and Alan Humphrey

Fault-Tolerant Consensus

Do we have a quorum?

Distributed Mutual Exclusion Based on Causal Ordering

Monitoring Functions on Global States of Distributed Programs. The University of Texas at Austin, Austin, Texas June 10, 1994.

Determining Consistent States of Distributed Objects Participating in a Remote Method Call

Time in Distributed Systems: Clocks and Ordering of Events

An Asynchronous Message-Passing Distributed Algorithm for the Generalized Local Critical Section Problem

Clock Synchronization

Overview: Synchronous Computations

cs/ee/ids 143 Communication Networks

On Stabilizing Departures in Overlay Networks

Coordination. Failures and Consensus. Consensus. Consensus. Overview. Properties for Correct Consensus. Variant I: Consensus (C) P 1. v 1.

Minimal Spanning Tree

Distributed systems Lecture 4: Clock synchronisation; logical clocks. Dr Robert N. M. Watson

Modeling Concurrent Systems

inpg O MB No Special Technical May 1991 Using Consistent Subcuts for Detecting Stable Properties Keith Marzullo, Laura Sabel

Distributed Termination Detection for Dynamic Systems

Interplay of security and clock synchronization"

1 Lamport s Bakery Algorithm

Efficient Notification Ordering for Geo-Distributed Pub/Sub Systems


Causality and physical time

Simulation of Spiking Neural P Systems using Pnet Lab

Real Time Operating Systems

INF Models of concurrency

Unreliable Failure Detectors for Reliable Distributed Systems

Distributed Deadlock-Avoidance. IMDEA Software Institute, Spain

On Equilibria of Distributed Message-Passing Games

CSC501 Operating Systems Principles. Deadlock

Efficient Dependency Tracking for Relevant Events in Concurrent Systems

Causal Broadcast Seif Haridi

Chapter 7 HYPOTHESIS-BASED INVESTIGATION OF DIGITAL TIMESTAMPS. 1. Introduction. Svein Willassen

Applications of Petri Nets

7. Queueing Systems. 8. Petri nets vs. State Automata

CS145: Probability & Computing Lecture 24: Algorithms

Distributed Systems. Time, Clocks, and Ordering of Events

Benchmarking Model Checkers with Distributed Algorithms. Étienne Coulouma-Dupont

Outline F eria AADL behavior 1/ 78

Distributed Systems. Time, clocks, and Ordering of events. Rik Sarkar. University of Edinburgh Spring 2018

6.852: Distributed Algorithms Fall, Class 25

Socket Programming. Daniel Zappala. CS 360 Internet Programming Brigham Young University

Transcription:

Figure 10.1 Skew between computer clocks in a distributed system Network Instructor s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 3 Pearson Education 2001 1

Figure 10.2 Clock synchronization using a time server m r m r Pp m t m t Time Server, server,ss Instructor s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 3 Pearson Education 2001 2

Figure 10.3 An example synchronization subnet in an NTP implementation 1 2 2 3 3 3 Note: Arrows denote synchronization control, numbers denote strata. Instructor s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 3 Pearson Education 2001 3

Figure 10.4 Messages exchanged between a pair of NTP peers Server B T i 2 T i 1 Time m m' Server A T i 3 T i Time Instructor s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 3 Pearson Education 2001 4

Figure 10.5 Events occurring at three processes p 1 a b m 1 c d m 2 Physical time p 3 e f Instructor s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 3 Pearson Education 2001 5

Figure 10.6 Lamport timestamps for the events shown in Figure 10.5. 1 2 p 1 a b m 1 3 4 c d m 2 Physical time p 3 1 e f 5 Instructor s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 3 Pearson Education 2001 6

Figure 10.7 Vector timestamps for the events shown in Figure 10.5 (1,0,0) (2,0,0) p 1 a b m 1 (2,1,0) (2,2,0) c d m 2 Physical time p 3 (0,0,1) e f (2,2,2) Instructor s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 3 Pearson Education 2001 7

Figure 10.8 Detecting global properties p 1 a. Garbage collection object reference message garbage object p1 wait-for b. Deadlock wait-for p1 c. Termination passive activate passive Instructor s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 3 Pearson Education 2001 8

Figure 10.9 Cuts e 1 0 e 1 1 e 1 2 e 1 3 p 1 m 1 m 2 e 2 0 e 2 1 e 2 2 Physical time Inconsistent cut Consistent cut Instructor s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 3 Pearson Education 2001 9

Figure 10.10 Chandy and Lamport s snapshot algorithm Marker receiving rule for process On p i s receipt of a marker message over channel c: if ( p i has not yet recorded its state) it records its process state now; records the state of c as the empty set; turns on recording of messages arriving over other incoming channels; else p i records the state of c as the set of messages it has received over c since it saved its state. end if Marker sending rule for process p i After p i has recorded its state, for each outgoing channel c: p i sends one marker message over c (before it sends any other message over c). p i Instructor s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 3 Pearson Education 2001 10

Figure 10.11 Two processes and their initial states p c 1 2 c 1 $1000 (none) $50 2000 account widgets account widgets Instructor s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 3 Pearson Education 2001 11

Figure 10.12 The execution of the processes in Figure 10.11 1. Global state S 0 2. Global state S 1 3. Global state S 2 4. Global state S 3 c 2 <$1000, 0> p 1 (empty) <$50, 2000> c 1 c 2 (empty) <$900, 0> p 1 (Order 10, $100), M <$50, 2000> c 1 c 2 (empty) <$900, 0> p 1 (Order 10, $100), M <$50, 1995> c 1 c 2 (five widgets) <$900, 5> p 1 (Order 10, $100) <$50, 1995> c 1 (empty) (M = marker message) Instructor s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 3 Pearson Education 2001 12

Figure 10.13 Reachability between states in the snapshot algorithm actual execution e 0,e 1,... S init recording begins recording ends S final S snap pre-snap: e' 0,e' 1,...e' R-1 post-snap: e' R,e' R+1,... Instructor s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 3 Pearson Education 2001 13

Figure 10.14 Vector timestamps and variable values for the execution of Figure 10.9 p 1 (1,0) (2,0) (3,0) (4,3) x 1 = 1 x 1 = 100 x 1 = 105 x 1 = 90 m 1 m 2 x 2 = 100 x 2 = 95 x 2 = 90 (2,1) (2,2) (2,3) Cut C 2 Physical time Cut C 1 Instructor s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 3 Pearson Education 2001 14

Figure 10.15 The lattice of global states for the execution of Figure 10.14 Level 0 S 00 1 S 10 2 3 S 30 S 20 S 21 S ij = global state after i events at process 1 and j events at process 2 4 5 S31 S 32 S 22 S 23 6 S 33 7 S 43 Instructor s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 3 Pearson Education 2001 15

Figure 10.16 Algorithms to evaluate possibly φ and definitely φ 1. Evaluating possibly φ for global history H of N processes L := 0; States := { s 0 1 s 0 0 (, 2,, s N )}; while ( φ( S) = False for all S States) L := L + 1; Reachable := { S : S reachable in H from some S States level( S ) = L}; States := Reachable end while output "possibly φ"; 2. Evaluating definitely φ for global history H of N processes L := 0; if (φ s 0 1 s 0 0 (, 2,, s N )) then States := {} else States := { s 0 1 s 0 0 (, 2,, s N )}; while (States {}) L := L + 1; Reachable := { S : S reachable in H from some S States level( S' ) = L}; States := { S Reachable: φ( S) = False} end while output "definitely φ"; Instructor s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 3 Pearson Education 2001 16

Figure 10.17 Evaluating definitely φ Level 0 F 1 F 2 F F = (φ(s) = False); T = (φ(s) = True) 3 4 5 F F T? Instructor s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 3 Pearson Education 2001 17