Distributed Snapshots 1 Goals of the lecture Consistent - - PowerPoint PPT Presentation

distributed snapshots 1 goals of the lecture consistent
SMART_READER_LITE
LIVE PREVIEW

Distributed Snapshots 1 Goals of the lecture Consistent - - PowerPoint PPT Presentation

Distributed Snapshots 1 Goals of the lecture Consistent State Algo rithm Co rrectness Stable Prop erties Reference: Chandy and Lamp ort Vija c y K. Ga rg Distributed Systems Sp ring 96


slide-1
SLIDE 1 Distributed Snapshots 1 Goals
  • f
the lecture
  • Consistent
State
  • Algo
rithm
  • Co
rrectness
  • Stable
Prop erties Reference: Chandy and Lamp
  • rt
c Vija y K. Ga rg Distributed Systems Sp ring 96
slide-2
SLIDE 2 Distributed Snapshots 2 Case
  • f
the dubious dolla rs $400 $300
  • A
B picture tak en here ($400) Send $ 100 fr
  • m
A to B picture tak en here ($400) The total amount b ecomes $800 c Vija y K. Ga rg Distributed Systems Sp ring 96
slide-3
SLIDE 3 Distributed Snapshots 3 Problem T
  • determine
global system state Each p ro cess can reco rd its
  • wn
state and messages it sends and receives. No sha red clo ck
  • r
memo ry Analogy: group
  • f
photographers c Vija y K. Ga rg Distributed Systems Sp ring 96
slide-4
SLIDE 4 Distributed Snapshots 4 Mo del
  • f
a Distributed System
  • Finite
set
  • f
p ro cesses
  • Finite
set
  • f
channels
  • p
  • q
  • r
@ @ @ @ @ @ @ @ @ I c 3
  • c
4 c 1 c 2 Channel := FIF O, erro r free, and innite buer c Vija y K. Ga rg Distributed Systems Sp ring 96
slide-5
SLIDE 5 Distributed Snapshots 5 Denition
  • f
a p ro cess Pro cess P = (S; I ; E )
  • ?
H H H H H H H H j Set
  • f
States Initial State Set
  • f
Events An event can change the state
  • f
P and at most
  • ne
channel. e = h p; s; s ; m; c i
  • )
  • P
P P P P P P P P q @ @ @ R ? p
  • st-state
p ro cess p re-state channel message c Vija y K. Ga rg Distributed Systems Sp ring 96
slide-6
SLIDE 6 Distributed Snapshots 6 Global state and global sequence state(D ) =
  • i
state(p i )
  • i
state(c j ): next (s; e) = global state immediately after e seq = (e i :
  • i
  • n)
is a computation
  • f
D i s = initial global state s i+1 = next(s i ; e i )
  • i
  • n
c Vija y K. Ga rg Distributed Systems Sp ring 96
slide-7
SLIDE 7 Distributed Snapshots 7 Example 1
  • q
  • p
c 1 c 2 p q h h
  • r
ecv t q sendt q s s 1 h h
  • sendt
p r ecv t p s 1 s c Vija y K. Ga rg Distributed Systems Sp ring 96
slide-8
SLIDE 8 Distributed Snapshots 8 Example 1 [Contd.]
  • q
  • p
c 1 c 2
  • s
  • s
1 hi hi state(p) = s 1
  • s
  • s
htok eni hi state(c 1 ) = htok eni state(c 2 ) = hi state(q ) = s c Vija y K. Ga rg Distributed Systems Sp ring 96
slide-9
SLIDE 9 Distributed Snapshots 9 Global State Detection Algo rithm Sending Rule : F
  • r
all channels c directed a w a y from p, p sends
  • ne
ma rk er after p reco rds its state and b efo re it sends further messages along c. Receiving Rule : On receiving a ma rk er along c if q has not reco rded its state then reco rds its state ma rks c as empt y else state(c) = h seq
  • f
messages i received along c after the state w as reco rded and b efo re ma rk er is received. c Vija y K. Ga rg Distributed Systems Sp ring 96
slide-10
SLIDE 10 Distributed Snapshots 10 Example 2
  • q
  • p
c 1 c 2 p q h h
  • recv
M send M B A h h
  • recv
M send M D C c Vija y K. Ga rg Distributed Systems Sp ring 96
slide-11
SLIDE 11 Distributed Snapshots 11 Example 2 [contd.]
  • q
  • p
hi hi C A S
  • q
  • p
hM i hi C B S 1
  • q
  • p
hM i hM i D B S 2
  • q
  • p
hM i hi D A S 3 c Vija y K. Ga rg Distributed Systems Sp ring 96
slide-12
SLIDE 12 Distributed Snapshots 12 Prop ert y
  • f
the reco rded global state S
  • S
  • S
  • =
snapshot
  • S
  • is
reachable from S
  • S
  • is
reachable from S
  • q
  • p
hi hM i D A Reco rded global state (S
  • )
c Vija y K. Ga rg Distributed Systems Sp ring 96
slide-13
SLIDE 13 Distributed Snapshots 13 Prop ert y
  • f
the reco rded global state [Contd.] Theorem 1 Ther e exists a c
  • mputation
seq = (e i ;
  • i)
wher e 1. F
  • r
al l i, wher e i <
  • r
i
  • :
e i = e i , and 2. the subse quenc e (e i ;
  • i
< ) is a p ermutation
  • f
the subse quenc e (e i ;
  • i
< ), and 3. for al l i wher e i
  • r
i
  • :
S i = S i , and 4. ther e exists some k ;
  • k
< , such that S
  • =
S k . c Vija y K. Ga rg Distributed Systems Sp ring 96
slide-14
SLIDE 14 Distributed Snapshots 14 Colo rful description (due to Dijkstra)
  • Each
machine, atomic action and message is either white
  • r
red
  • S
) Snapshot (SS) ) S 1 white red c Vija y K. Ga rg Distributed Systems Sp ring 96
slide-15
SLIDE 15 Distributed Snapshots 15 Colo r Assignm ent A tomic Action : same colo r as the machine Message : same colo r as the machine that sends it Snapshot state SSS consists
  • f
  • state
when it made the transition from white to red
  • the
sequence
  • f
white messages accepted b y a red machine c Vija y K. Ga rg Distributed Systems Sp ring 96
slide-16
SLIDE 16 Distributed Snapshots 16 Pro
  • f
c Vija y K. Ga rg Distributed Systems Sp ring 96
slide-17
SLIDE 17 Distributed Snapshots 17 Summa ry
  • Beautiful
pap er Beautiful algo rithm
  • Example
  • f
generalization
  • f
a p roblem c Vija y K. Ga rg Distributed Systems Sp ring 96