Dan Deng 10/30/11 Ordering and Consistent Cuts 1.

Slides:



Advertisements
Similar presentations
Numbers Treasure Hunt Following each question, click on the answer. If correct, the next page will load with a graphic first – these can be used to check.
Advertisements

1 Concurrency: Deadlock and Starvation Chapter 6.
AP STUDY SESSION 2.
1
Chapter 3 Demand and Behavior in Markets. Copyright © 2001 Addison Wesley LongmanSlide 3- 2 Figure 3.1 Optimal Consumption Bundle.
Copyright © 2003 Pearson Education, Inc. Slide 1 Computer Systems Organization & Architecture Chapters 8-12 John D. Carpinelli.
Processes and Operating Systems
Copyright © 2011, Elsevier Inc. All rights reserved. Chapter 6 Author: Julia Richards and R. Scott Hawley.
Author: Julia Richards and R. Scott Hawley
1 Copyright © 2013 Elsevier Inc. All rights reserved. Chapter 3 CPUs.
Properties Use, share, or modify this drill on mathematic properties. There is too much material for a single class, so you’ll have to select for your.
UNITED NATIONS Shipment Details Report – January 2006.
RXQ Customer Enrollment Using a Registration Agent (RA) Process Flow Diagram (Move-In) Customer Supplier Customer authorizes Enrollment ( )
Business Transaction Management Software for Application Coordination 1 Business Processes and Coordination. Introduction to the Business.
We need a common denominator to add these fractions.
DCV: A Causality Detection Approach for Large- scale Dynamic Collaboration Environments Jiang-Ming Yang Microsoft Research Asia Ning Gu, Qi-Wei Zhang,
1 RA I Sub-Regional Training Seminar on CLIMAT&CLIMAT TEMP Reporting Casablanca, Morocco, 20 – 22 December 2005 Status of observing programmes in RA I.
Properties of Real Numbers CommutativeAssociativeDistributive Identity + × Inverse + ×
Custom Statutory Programs Chapter 3. Customary Statutory Programs and Titles 3-2 Objectives Add Local Statutory Programs Create Customer Application For.
Custom Services and Training Provider Details Chapter 4.
CALENDAR.
FACTORING ax2 + bx + c Think “unfoil” Work down, Show all steps.
1 Click here to End Presentation Software: Installation and Updates Internet Download CD release NACIS Updates.
REVIEW: Arthropod ID. 1. Name the subphylum. 2. Name the subphylum. 3. Name the order.
Time, Clocks, and the Ordering of Events in a Distributed System
Break Time Remaining 10:00.
Turing Machines.
Table 12.1: Cash Flows to a Cash and Carry Trading Strategy.
PP Test Review Sections 6-1 to 6-6
Bright Futures Guidelines Priorities and Screening Tables
EIS Bridge Tool and Staging Tables September 1, 2009 Instructor: Way Poteat Slide: 1.
Bellwork Do the following problem on a ½ sheet of paper and turn in.
CS 6143 COMPUTER ARCHITECTURE II SPRING 2014 ACM Principles and Practice of Parallel Programming, PPoPP, 2006 Panel Presentations Parallel Processing is.
Exarte Bezoek aan de Mediacampus Bachelor in de grafische en digitale media April 2014.
How to convert a left linear grammar to a right linear grammar
Copyright © 2012, Elsevier Inc. All rights Reserved. 1 Chapter 7 Modeling Structure with Blocks.
1 RA III - Regional Training Seminar on CLIMAT&CLIMAT TEMP Reporting Buenos Aires, Argentina, 25 – 27 October 2006 Status of observing programmes in RA.
Factor P 16 8(8-5ab) 4(d² + 4) 3rs(2r – s) 15cd(1 + 2cd) 8(4a² + 3b²)
Basel-ICU-Journal Challenge18/20/ Basel-ICU-Journal Challenge8/20/2014.
1..
CONTROL VISION Set-up. Step 1 Step 2 Step 3 Step 5 Step 4.
© 2012 National Heart Foundation of Australia. Slide 2.
Adding Up In Chunks.
1 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt Synthetic.
Note to the teacher: Was 28. A. to B. you C. said D. on Note to the teacher: Make this slide correct answer be C and sound to be “said”. to said you on.
1 hi at no doifpi me be go we of at be do go hi if me no of pi we Inorder Traversal Inorder traversal. n Visit the left subtree. n Visit the node. n Visit.
Analyzing Genes and Genomes
©Brooks/Cole, 2001 Chapter 12 Derived Types-- Enumerated, Structure and Union.
Essential Cell Biology
Clock will move after 1 minute
PSSA Preparation.
Essential Cell Biology
Distributed Snapshots: Determining Global States of Distributed Systems - K. Mani Chandy and Leslie Lamport.
Global States.
Immunobiology: The Immune System in Health & Disease Sixth Edition
Physics for Scientists & Engineers, 3rd Edition
From Coulouris, Dollimore, Kindberg and Blair Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Slides for Chapter 14: Time and.
Energy Generation in Mitochondria and Chlorplasts
Select a time to count down from the clock above
Murach’s OS/390 and z/OS JCLChapter 16, Slide 1 © 2002, Mike Murach & Associates, Inc.
Distributed Computing 9. Sorting - a lower bound on bit complexity Shmuel Zaks ©
1 Decidability continued…. 2 Theorem: For a recursively enumerable language it is undecidable to determine whether is finite Proof: We will reduce the.
Distributed Computing 5. Snapshot Shmuel Zaks ©
1 © R. Guerraoui The Limitations of Registers R. Guerraoui Distributed Programming Laboratory.
Distributed Systems Dinesh Bhat - Advanced Systems (Some slides from 2009 class) CS 6410 – Fall 2010 Time Clocks and Ordering of events Distributed Snapshots.
Ordering and Consistent Cuts Presented By Biswanath Panda.
Ordering and Consistent Cuts
Ordering and Consistent Cuts Presented by Chi H. Ho.
Ordering of Events in Distributed Systems UNIVERSITY of WISCONSIN-MADISON Computer Sciences Department CS 739 Distributed Systems Andrea C. Arpaci-Dusseau.
Presentation transcript:

Dan Deng 10/30/11 Ordering and Consistent Cuts 1

Introduction Distributed systems Loosely coupled processes cooperating to solve a bigger problem Novelty of distributed systems Lamport published his paper in 1978 ARPANET was just “operational” in 1975 Temporal characteristics poorly understood Need a mechanism for processes to agree on time 2

Distributed System Model Distributed system of sets of processes and channels Processes communicate by sending and receiving messages A process can observe: Its own state Messages it sends Messages it receives Must enlist other processes to determine global state 3

Time, Clocks, and the Ordering of events in a Distributed System – PODC influential paper award (2000) Leslie Lamport (Massachusetts Computer Associates) B.S. in math from MIT (1960) Ph.D. in math from Brandeis (1972) Microsoft Research (2001-Current) Distributed systems, LaTeX “a distributed system is one in which the failure of a computer you didn’t even know existed can render your own computer unusable” 4

Takeaways Happened-before using logical clocks to totally order events Logical clocks used to implement mutual exclusion Physical clocks for anomalous behavior Discussion points: Useful model for reasoning about temporal events Logical clock overflow not considered Does not answer precisely questions of concurrency or dependency 5

Outline Motivation Partial ordering Logical clocks Total ordering Mutual exclusion Anomalous behavior Physical clocks 6

Motivation Our notion of event ordering is derived using time Time is implemented on machines using clocks Local clocks on machines may not be accurate Need another mechanism to agree on time 7

Partial Ordering P0P0 P1P1 A B D C E F A  B, B  E, A  E A  D, D  A, A and D are concurrent / / 8

Logical Clocks Used to implement the happened-before relation Between successive events in a process: Each process increments its logical clock On event A of sending of a message from process P i P i sends T m = C i (A) with message On event B of receiving of a message by process P j B advances C j (B) to MAX(T m, C j (B))+1 A BC i (A) < C i (B) 9

Total Ordering Happens-before gives only a partial ordering of events Can totally order events by Ordering events by the logical times they occur Break ties using an arbitrary total ordering of processes Specifically A happens before B if C i (A) < C j (B) C i (A) == C j (B) and P i < P j 10

Total Ordering Can be used to solve the mutual exclusion problem in a fully distributed fashion Problem description: Fixed number of processes A single resource Processes must synchronize to avoid conflict Requests must be granted in order 11

Mutual Exclusion Each process maintains its own request queue Process P i – To request the resource Add Request T m :P i to its queue Send Requests T m :P i to all P j Process P j – On receiving Request T m :P i Add Request T m :P i to its queue Send Acknowledge message to P i Process P i is granted resource when Request T m :P i is earliest in request queue Acknowledge is received from all P j 12

Mutual Exclusion Step 1: P i Sends Request Resource P i puts Request T m :P i on its request queue P i sends Request T m :P i to P j P1P1 P2P2 P3P3 T 0 :P 1 request 13 Source: Nicole Caruso’s F09 CS6410 Slides

Step 2: P j Adds Message P j puts Request T m :P i on its request queue P j sends Acknowledgement T m :P j to P i P1P1 P2P2 P3P3 T 1 :P 2 T 1 :P 3 T 0 :P 1 ack Mutual Exclusion 14

Step 3: P i Sends Release Resource P i removes Request T m :P i from request queue P i sends Release T m :P i to each P j P1P1 P2P2 P3P3 T 2 :P 1 T 0 :P 1 release Mutual Exclusion 15

Step 4: P j Removes Message P j receives Release T m :P i from P i P j removes Request T m :P i from request queue P1P1 P2P2 P3P3 Mutual Exclusion 16

Can occur if some messages are not observed P1P1 P2P2 P3P3 T 1 :P 2 T 3 :P 3 T 1 :P 2 T 3 :P 3 T2:P 2 Anomalous Behavior 17

Physical Clocks A physical clock (C) must run at about the right rate |dC i (t) / dt – 1 | < k where k << 1 Physical clocks must be somewhat synchronized | Ci(t) – Cj(t) | < ε Let μ < shortest transmission time for interprocess messages To prevent anomalous behavior C i (t + μ) - C j (t) > 0 ε < μ * (1 – k) 18

Distributed snapshots: determining global states of distributed systems K. Mani Chandy (UT-Austin) Indian Institute of Technology (B.E. 1965) Polytechnic Institute of Brooklyn (M.S. 1966) MIT (Ph.D. 1969) CS Department at UT-Austin ( ) (department chair and ) CS Professor at CalTech (1989-Current) Leslie Lamport (SRI, ) 19

Takeaways Distributed algorithm to determine global state Detect stable conditions such as deadlock and termination Defines relationships among local process state, global system state, and points in a distributed computation Discussion points: Scheme accurately captures state Algorithm introduces communication overheads Related to Vector clocks 20

21

Outline Motivation Distributed system model Consistent cuts Global state detection Stable state detection 22

Motivation Algorithms for determining global states are incorrect Relationships among local process states, global system states, and points in a distributed computation are not well understood Attempt to define those relationships Correctly identify stable states in a distributed system 23

Distributed system model Processes Defined in terms of states; states change on events Channels State changes when messages are sent along the channel Events e defined by Process P in which event occurs State S of P before event State S’ of P after event Channel C altered by event Message M sent/received along c 24

Consistent Cuts Snapshot of global state in a distributed system Defined as snapshots where no event after the cut happened before an event before the cut Forbids situations where effect is seen without its cause Useful for debugging, deadlock detection, termination detection, and global checkpoints 25

Global State Detection Superimposed on the computation Each process records its own state Processes of a channel cooperate on recording channel state Use a marker to synchronize global state recording 26

Global State Detection Process decides to take a snapshot Save its state and sends marker through its outgoing channels Save messages it receives on its in channels Process receives a marker for the first time Save state and send marker on out channels Save messages it receives on its in channels Algorithm terminates when: Each node received markers through all its incoming channels 27

28 Global State Detection p q r s t u v w x y z A network Source: Professor Hakim Weatherspoon’s CS4410 F08 Lectures

29 Global State Detection p q r s t u v w x y z A network I want to start a snapshot

30 Global State Detection p q r s t u v w x y z A network p records local state

31 Global State Detection p q r s t u v w x y z A network p starts monitoring incoming channels

32 Global State Detection p q r s t u v w x y z A network “contents of channel p- y”

33 Global State Detection p q r s t u v w x y z A network p floods message on outgoing channels…

34 Global State Detection p q r s t u v w x y z A network

35 Global State Detection p q r s t u v w x y z A network q is done

36 Global State Detection p q r s t u v w x y z A network q

37 Global State Detection p q r s t u v w x y z A network q

38 Global State Detection p q r s t u v w x y z A network q z s

39 Global State Detection p q r s t u v w x y z A network q v z x u s

40 Global State Detection p q r s t u v w x y z A network q v w z x u s y r

41 Global State Detection p q r s t u v w x y z A snapshot of a network q x u s v r t w p y z Done!

Stable State Detection Input: A stable property function Y Output: A Boolean value definite: (Y(S i ) -> definite) and (Y(S Φ ) -> definite) Implications of “definite” definite == false:cannot say YES/NO stability definite == true:stable property at termination Correctness – Initial state -> recorded state -> terminating state – for all j: y(S j ) = y(S j +1) – state is stable 42

Takeaways Temporal characteristics of distributed systems was poorly understood Lamport proposed logical clocks for ordering Chandy/Lamport proposed a distributed snapshot algorithm Snapshot algorithm can be used to accurately detect stable events 43