| di(init, n, in) = ((active, n, in), {(Pi, n, Pi+1)}) | |
| di(q, n, in) = | ((q, n, Ø), Ø) |
| if q=leader or q=follower or (q=active and in=Ø) | |
| di(active, n, in) = | |
| if done Î data(in) then ((follower, n, Ø), {(Pi, done, Pi+1)}) | |
| else if n Î data(in) then ((leader, n, Ø),{(Pi, done, Pi+1)}) | |
| else if n > max(in) then ((active, n, Ø), Ø) | |
| else if n < max(in) then ((active, n, Ø, {(Pi, max(in), Pi+1)}) | |
| where | data(in) is the set of data in the message set in, |
| and | max(in) is the largest integer in that set (and in ¹ Ø) |
/~\
| |
| v
init -> active -> leader <-\
| \__/
v
follower <-\ [mmmm, ASCII]
\__/
There are two kinds of event:
| init | = | c!n active |
| leader | = | ?in leader |
| follower | = | ?in follower |
| active | = | ?in IF ( |
| done Î data(in): s:=follower c?done follower | ||
| n Î data(in) : s:= leader c!done leader | ||
| n < max(in) : c!max(in) active | ||
| n > max(in) : active) |
We derive an evolution of a system S''. Each Pi'' has a vector clock, an array variable vi[1..n], initially vi[j]=0 for 1 £ j £ n. If P performs eh then Pi'' performs eh'' by carrying out the non-sending actions of eh, then executing(7147,2085)(76,-3961) (1201,-2161)150 (1801,-3661)150 (2101,-2161)150 (2401,-3661)150 (2701,-3661)150 (3301,-2161)150 (3901,-2161)150 (4501,-2161)150 (6301,-3661)150 (5326,-3661)150 (5776,-2161)150 (601,-2161)( 1, 0)6600 (601,-3661)( 1, 0)6600 (2401,-3661)( 1, 1)1425 (1276,-2236)( 1,-3)450 (2776,-3586)( 1, 3)450 (3976,-2236)( 1,-1)1275 (4426,-2011)(0,0)[lb]1214.4pt7 (5701,-2011)(0,0)[lb]1214.4pt8 (1726,-3961)(0,0)[lb]1214.4pt2 (2326,-3961)(0,0)[lb]1214.4pt3 (2626,-3961)(0,0)[lb]1214.4pt4 (1126,-2011)(0,0)[lb]1214.4pt1 (2026,-2011)(0,0)[lb]1214.4pt2 (3226,-2011)(0,0)[lb]1214.4pt5 (3826,-2011)(0,0)[lb]1214.4pt6 (5251,-3961)(0,0)[lb]1214.4pt7 (6301,-3961)(0,0)[lb]1214.4pt8 (2101,-2461)(0,0)[lb]1214.4pte (2251,-3511)(0,0)[lb]1214.4ptf (296,-2236)(0,0)[lb]1214.4ptP1 (296,-3736)(0,0)[lb]1214.4ptP2
| vi[i] | := | vi[i] + 1 and for j ¹ i, |
| vi[j] | := | max{vi[j], max{tj | (Pk'',(d,á t1..tnñ),Pi'') is consumed in eh''}} |
A configuration is consistent if it is the configuration determined by a consistent cut.Example
(8422,2562)(601,-3811) (1501,-1561)150 (2251,-3061)150 (2851,-1561)150 (3751,-3061)150 (4201,-3061)150 (6901,-3061)150 (7651,-1561)150 (8251,-3061)150 (4801,-1561)150 (5926,-1561)150 (5326,-1561)150 (901,-1561)( 1, 0)8100 (901,-3061)( 1, 0)8100 (1501,-1636)( 1,-2)675 (3751,-3061)( 3, 2)2025 (4276,-2986)( 1, 3)450 (5476,-1636)( 1,-1)1350 (4051,-3361)( 0, 1)825 (4051,-2536)( 3, 2)900 (4951,-1936)( 1, 4)150 (5551,-3361)( 0, 1)2100 (3976,-3586)(0,0)[lb]1012.0ptcut 1 (3976,-3811)(0,0)[lb]1012.0pt(inconsistent) (5551,-3661)(0,0)[lb]1012.0ptcut 2 (consistent) (601,-1636)(0,0)[lb]1012.0ptP_1 (601,-3136)(0,0)[lb]1012.0ptP_2
This document was translated from LATEX by HEVEA.