1
Time and global states Time and global states
Jerry Eriksson, VT-01 Jerry Eriksson, VT-01
Important issues in distributed systems Important issues in distributed systems
Timestamping
Timestamping
files, transactions
Time and global states Time and global states Jerry Eriksson, VT-01 - - PDF document
Time and global states Time and global states Jerry Eriksson, VT-01 Jerry Eriksson, VT-01 Important issues in distributed Important issues in distributed systems systems Timestamping Timestamping files, transactions files,
files, transactions
International standard. Radio waves. GPS!
Network
mr mt p Time server,S
t+min, t + tround - min
1 2 3 2 3 3
Note: Arrows denote synchronization control, numbers denote strata.
Ti Ti-1 Ti-2 Ti- 3 Server B Server A Time m m' Time
If two events occured at the same process, then
The event of sending occured before the
p1 p2 p3 a b c d e f m1 m2 Physical time
LC1: Li is incremented before each event is
LC2a: When p
i.
LC2b: On receiving (m, t), p
j computes L
a b c d e f m1 m2 2 1 3 4 5 1 p1 p2 p3 Physical time
Use identifiers of the processes
a b c d e f m1 m2 (2,0,0) (1,0,0) (2,1,0) (2,2,0) (2,2,2) (0,0,1) p1 p2 p3 Physical time
p2 p1 message garbage object
reference
p 2 p1 wait-for wait-for
p2 p1 activate passive passive
m1 m2 p1 p2 Physical time e1 Consistent cut Inconsistent cut e 1
1
e 1
2
e 1
3
e 2 e 2
1
e 2
2
neither channels nor processes fail
channels are unidirectional and provide FIFO-ordering
processes strongly connected
any process may initiate a global snapshot at any time
the process may continue their execution and send and
Sinit Sfinal Ssnap actual execution e 0,e1,... recording recording begins ends pre-snap: e '0,e'1,...e'R-1 post-snap: e ' R,e'R+1 ,...
Each process records its state and also for each incoming
The process records, for each channel, any messages that
Message may belong to a channel
Marker receiving rule for process pi On p
i’s receipt of a marker message over channel c:
if (pi 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 pi 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 pi After pi has recorded its state, for each outgoing channel c: pi sends one marker message over c (before it sends any other message over c).
p 1 p 2 c 2 c 1 account widgets $1000 (none) account widgets $50 2000
p1 p2 (empty) <$1000, 0> <$50, 2000> (empty) c2 c1
p1 p2 (Order 10, $100), M <$900, 0> <$50, 2000> (empty) c2 c1 p1 p2 (Order 10, $100), M <$900, 0> <$50, 1995> (five widgets) c2 c1 p1 p2 (Order 10, $100) <$900, 5> <$50, 1995> (empty) c2 c1 (M = marker message)
Transitory state occurred in an actual execution.
Marzullo and Neiger: centralized algorithm: A monitor,
Definitely true: For all linearization L of H there is a GCS
Possibly true: There is a CGS through which an L of H
m
1
m2 p1 p2 Physical time Cut C1 (1,0) (2,0) (4,3) (2,1) (2,2) (2,3) (3,0) x1= 1 x1= 100 x1= 105 x2= 100 x2= 95 x2= 90 x1= 90 Cut C2
Sij= global state after i events at process 1 and j events at process 2 S00 S10 S20 S21 S30 S31 S32 S22 S23 S33 S43 Level 0 1 2 3 4 5 6 7
F = (φ(S) = False); T = (φ(S ) = True) ? – Level 0 1 2 3 4 5 F F F F T F