7- global_states

7- global_states - CSE 486/586 Distributed Systems Global...

Info iconThis preview shows pages 1–9. Sign up to view the full content.

View Full Document Right Arrow Icon
CSE 486/586, Spring 2012 CSE 486/586 Distributed Systems Global Snapshots Steve Ko Computer Sciences and Engineering University at Buffalo
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CSE 486/586, Spring 2012 Last Time Ordering of events Many applications need it, e.g., collaborative editing, distributed storage, etc. Logical time Lamport clock: single counter Vector clock: one counter per process Happens-before relation shows causality of events (causal ordering) 2
Background image of page 2
CSE 486/586, Spring 2012 Today’s Question Distributed debugging How do you debug this? Log in to one machine and see what happens Collect logs and see what happens Taking a global snapshot ! 3 P0 P1 P2 Deadlock! Both waiting…
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CSE 486/586, Spring 2012 Today’s Question What’s the whole system’s global state at this point? Global state: a collection of local process states Can we evaluate a stable predicate ? Predicate : a function: (a global state)  {true, false} Stable predicate : once it’s true, it stays true the rest of the execution, e.g., a deadlock. 4 P1 P2 P3 e1 0 e11 e1 2 e1 3 e2 0 e2 1 e2 2 e3 0 e3 1 e3 2
Background image of page 4
CSE 486/586, Spring 2012 Obvious First Try Synchronize clocks of all processes Ask all processes to record their states at known time t Problems? Time synchronization possible only approximately Another issue? Does not record the state of messages in the channels Again: synchronization not required – causality is enough! What we need: logical global snapshot The state of each process Messages in transit in all communication channels 5 P0 P1 P2 msg
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CSE 486/586, Spring 2012 How to Do It? Definitions For a process Pi , where events ei0, ei1, … occur, history(Pi) = hi = <ei0, ei1, … > prefix history(Pik) = hik = <ei0, ei1, …,eik > Sik : Pi ’s state immediately after kth event For a set of processes P1 , …, Pi , …. : Global history: H = i (hi) Global state: S = i (Siki) A cut C  H = h1c1  h2c2  …  hncn The frontier of C = {eici, i = 1,2, … n} 6 P1 P2 P3 e1 0 e11 e1 2 e1 3 e2 0 e2 1 e2 2 e3 0 e3 1 e3 2
Background image of page 6
CSE 486/586, Spring 2012 Consistent States A cut C is consistent if and only if e  C (if f  e then f  C) A global state S is consistent if and only if it corresponds to a consistent cut 7 P1 P2 P3 e1 0 e11 e1 2 e1 3 e2 0 e2 1 e2 2 e3 0 e3 1 e3 2 Inconsistent cut Consistent cut
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CSE 486/586, Spring 2012 Why Consistent States?
Background image of page 8
Image of page 9
This is the end of the preview. Sign up to access the rest of the document.

This document was uploaded on 02/27/2012.

Page1 / 22

7- global_states - CSE 486/586 Distributed Systems Global...

This preview shows document pages 1 - 9. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online