Aa!r[}  0 p@` P  0@p@HH $ @d HHHH̀̀̀ff@  d Footnote TableFootnote**.\t.\t/ - :;,.!?4e+eTOCHeading1Heading2   ;EquationVariablesf ;`<<=7=P=i=@E@F@;@=@?@A  <$lastpagenum><$monthname> <$daynum>, <$year>"<$monthnum>/<$daynum>/<$shortyear>J<$hour>:<$minute00> <$ampm> on <$dayname>, <$monthname> <$daynum>, <$year>"<$monthnum>/<$daynum>/<$shortyear><$monthname> <$daynum>, <$year>"<$monthnum>/<$daynum>/<$shortyear> <$fullfilename> <$filename> <$paratext[Title]> <$paratext[Heading1]> <$curpagenum> <$marker1> <$marker2> (Continued)+ (Sheet <$tblsheetnum> of <$tblsheetcount>)Heading & Page <$paratext> on page<$pagenum>Pagepage<$pagenum>See Heading & Page%See <$paratext> on page<$pagenum>. Table All7Table<$paranumonly>, <$paratext>, on page<$pagenum>Table Number & Page'Table<$paranumonly> on page<$pagenum>Heading <$paratext>HTML Headings++A88::33557QAHHA+;b;d;f;h;j;l;n;p;r;t;v;x;z;|;~;;;;;;;;;;;;;;;;;;;;;LFL;;;;;;;;;LGL;;;;;;;;;;;;;;;;;;;LGEL;;;;;;;;;<<<<<< < <<<<<<<<M;GM=<"<$<&<(<*<,<.<0<2<4<6<8<:<<MoGMq:aI:aN:aW:a\:acOc.agOal:aq:cccc3c3c3cc3c3d3d2das:dd3d3d3d$d&3d'3d(3a~:e:dd(1.e:d2.a:a:a:d.a:a:a:a:a:a:aOaOa:a:b:[7[.[[.[8[8[8[8[8[.[11.b:[$2.[%a.[-b.[$3.[%a.[-b.b:[$4.[%a.[-b.[2[:b:bObObC:bH:bS:dddd3d3d3e:e+e+e+dd3d3d3e+e+e+e+e+e+e+e+e+e+`:e+f+cEvExEzE|E~EEEEEEEEEEEEEEEEEFFFHHHHHHHHHHHHHHHHHHHHHHHHHHHHOHHHHNHHHHHHHIIIIII I IIIIINIIII I"I$I&I(I*I,I.I0I2I4I6I8I:I<I>I@IBIDIFIHIJILINIPIRNSIVIXIZNUIeNINJOJ%JJJJJJKTKVGKXQdq5+dXb d;]d;L HmR;MHmRHRHRFootnote Hr@;NHr@HzHz Single LineH;O Footnote ;P  HD;Q HDHH Double LineH;R Double Line;S ;T H;U  Single Line;V HZ;W  TableFootnoted5p77 EGxR;XEGxREPwEPw TableFootnoted;^dEl d;_d'00zupkfa\WRMHC>vCFILORUX[^adgjmpsy| %).12/,)&#W/Bm }d ;ad WeHTML Mapping Table }Hd ;cHd We }Hd ;eHd We }Hd ;gHd We }Hd ;iHd We }H&;kH&g% FrameMaker E Source Item }H ;mH We XML Item }H ;oH We }H&;qH& W eInclude Auto# } H&;s H& W e Comments }H;uH W e }HH;w HH W eElement }H;y#Hg %New Web EPage? }H;{H We } H;} H We }H ; $H We P:Date Line }HH ;#%HH WeP }H ;$&H WeN }H ;%'H WeN } H ;&( H We }EH ;')EH We P:Reading }HEH ;(*HEH WeP }EH ;)+EH WeN }EH ;*,EH WeN } EH ;+- EH We }QH ;,.QH WeP:Title }HQH ;-/HQH WeH* }QH ;.0QH WeN }QH ;/1QH WeN } QH ;02 QH We }]H ;13]H WeP:Body }H]H ;24H]H W eP }]H ;35]H W!eN }]H ;46]H W"eN } ]H ;57 ]H W#e }iH(;68iH( W$e P:Numbered1 }HiH(;79HiH((&eLI %e Parent = OL A'e Depth = 0 }iH(;8:iH( W(eN }iH(;9;iH( W)eY } iH(;:< iH( W*e }H ;;=H  W+e P:Heading1 }HH ;<>HH  W,eH* }H ;=?H  W-eN }H ;>@H  W.eN } H ;?A H  W/e }H(;@BH(  W0e P:Numbered }HH(;ACHH(( 2eP 1e Parent = OL A3e Depth = 0 }H(;BDH(  W4eN }H(;CEH(  W5eY } H(;DF H(  W6e }H ;EGH  W7e P:CellBody }HH ;FHHH  W8eP }H ;GIH  W9eN }H ;HJH  W:eN } H ;IK H  W;e }H ;JLH  W<eP:CellHeading }HH ;KMHH  W=eP }H ;LNH  W>eN }H ;MOH  W?eN } H ;NP H  W@e }H ;OQH  WAe P:Footnote }HH ;PRHH  WBeP }H ;QSH  WCeN }H ;RTH  WDeN } H ;SU H  WEe }H(;TVH( WFe P:Bulleted }HH(;UWHH((HeLI Ge Parent = UL AIe Depth = 0 }H(;VXH( WJeN }H(;WYH( WKeN } H(;XZ H( WLe }H ;Y[H WMe P:Heading2 }HH ;Z\HH WNeH* }H ;[]H WOeN }H ;\^H WPeN } H ;]_ H WQe }H;^`HgR% P:HeadingRuEnIn }HH;_aHH WSeP }H<`bH WTeN }H<acH WUeN } H<bd H WVe }7H <ce7H WWe P:Indented }H7H < dfH7H WXeP }7H < eg7H WYeN }7H < fh7H WZeN } 7H <gi 7H W[e }CH<hjCHg\% P:TableFootEnote }HCH<ikHCH W]eP }CH<jlCH W^eN }CH<kmCH W_eN } CH<ln CH W`e }]H(<mo]H( Wae P:TableTitle }H]H(<npH]H((ceLI be Parent = OL Ade Depth = 0 }]H( H "W4e }©H <=?©H #W5e P:Answer }H©H <>@H©H #W6eP }©H <?A©H #W7eN }©H <@B©H #W8eN } ©H <A ©H #W9e }Td <D=FTd F$W:eHTML Options Table }DTd <DDTd F$W;e }Td <DTd F$W<e }dD <DCGdD F%W=eControl }DdH <DFHDdH F%W>eValue }dH <DGIdH F%W?e Comments }pD6<DHJpD6 F&W@e Image Format }DpH6<DIKDpH66F&A2% 0001IMAGGIF  MACP0001GIPdEF }pH6<DJLpH6 F&WBe }D <DKMD F'WCeBanners }DH <DLNDH F'WDeN }H <DMOH F'WEe }D<DNPDF(F% Banner ReferPE ence Frame }DH<DOQDH F(WGe }H<DPRH F(WHe }D(<DQSD((F)I$% Copy Files  Imported by PE Rerefernce }DH(<DRTDH( F)WJe }H(<DSUH( F)WKe }D(<DTVD((F*L$% Copy Files  Imported by PE Reference }DH(<DUWDH( F*WMeN }H(<DVH( F*WNe }Vd <D[Vd F+WOeSystem Macros }?Vd <D?Vd F+WPe }Vd <DVd F+WQe }f? <DX\f? F,WRe Macro Name }?fH <D[?fH F,WSe Replace With }fH <D^fH F,WTe Comments }r? =D]_r? F-WUe StartOfDoc }?rH =D^?rH F-WVe }rH =DarH F-WWe }~? =D`b~? F.WXe EndOfDoc }?~H = Da5?~H F.WYe }~H = D5d~H F.WZe }Š?= DceŠ?F/[% StartOfSubPEDoc }?ŠH=Dd6?ŠH F/W\e }ŠH=D6gŠH F/W]e }¤?=Dfh¤?F0^% EndOfSubPEDoc }?¤H=Dg7?¤H F0W_e }¤H=D7j¤H F0W`e }¾?=Dik¾?F1a% StartOfFirstPESubDoc }?¾H=Dj8?¾H F1Wbe }¾H=D8m¾H F1Wce }?=Dln?F2d% EndOfFirstPESubDoc }?H=!Dm9?H F2Wee }H=#D9pH F2Wfe }?=%Doq?F3g% StartOfLastPESubDoc }?H='Dp:?H F3Whe }H=)D:H F3Wie }?=+t?4j% EndOfLastPESubDoc }?H=-s;?H 4Wke }H=/;yH 4Wle }BH HDBwBH F5Wme C:Wingding }HBH HDvxHBH F5WneEM }BH HDw<BH F5WoeN }y}L? 7Wse Macro Name }?LH =@|~?LH 7Wte Replace With }LH =B}LH 7Wue Comments }X?=D~X? 8Wve See Also }?XH=F?XH8w% See Also: PE <$paratext> }XH=HXH 8Wxe }Vd EDVd F+Wye }fH ED\]fH F,WzeHead }rH ED_`rH F-W{e }xd =Q xd :WeGeneral Macros }?xd =S?xd :We }xd =Uxd :We }xd =Wxd :We }? =Y"? ;We Macro Name d= d= d l d= d  WBm }d = d  <W|eHeadings Table }Hd = Hd  <W}e }Hd = Hd  <W~e }H= H  =WeHeading Level }HH= HH =g%Paragraph ForEmat }H= H  =We Comments }H= H >W e2 }HH= HH  >We Heading1 }H= H  >We }KH = KH  ?We3 }HKH = HKH  ?We Heading2 }KH = KH  ?We }WH = WH  @We4 }HWH = HWH  @W e Lettereda }WH = WH  @W e }cH = cH  AW e5 }HcH = HcH  AW e LineComment }cH = cH  AW e HHˆXcHHˆRE'' * `!Suzuki-Kasami Broadcast Protocol +,` Introduction , vThis is a token-based protocol. Unlike non-token-based ones, it uses the tokens being possessed by a site to provide I@]ordering of requests. Clocks and virtual time do not play a role; but order of arrival does. -b` Notation .t`n  processes /*`p i  process 0`xR i [ j ] largest sequence number  p i  has received in a REQUEST message from  p j 1`aL [ i ] sequence number of request that  p i  has most recently executed 2UU`2Q  queue (sequence) of sites requesting token 3*`T  = (Q, L) token 4` Protocol 5** To request entry, if  p i  does not have the token, it increments its sequence number  R i [ i ] and then sends @eREQUEST( i ,  s ),  s  =  R i [ i ], to all other sites. 6 " -When  p i  receives REQUEST( i ,  s ) from  p j ,  p i  sets  R i [ j ] = max( R i [ j ],  s ). If  p i  has the token and  R i [ j ] =  L [ j ] + 1, it ]@&sends the token to  p j . 7({`kIf  p i  is requesting entry and it has or receives the token, it enters the critical section. 8`@When  p i  finishes executing the critical section: 9`Cit sets  L [ i ] =  R i [ i ]; :R3 `0for every  j  not in  Q  and for which  R i [ j ] =  L [ j ] + 1,  p i  appends  j  to  Q ; and ;`if  Q  is not empty,  p i  deletes the first element  f  of  Q  and sends the token to  p f . <{3`Example =*ݭ`5There are three processes,  p 1 ,  p 2 , and  p 3 .  p 1  and  p 3  seek mutually exclusive access to a shared resource. UU QInitially:the token is at p2 and the tokens state is L = [0, 0, 0] and Q empty; @vp1s state is C1 = 0, R1 = [0, 0, 0]; p3s state is C1 = 0, R2 = [0, 0, 0]; and p3s state is C3 = 0, R3 = [0, 0, 0]  `Fp1 sends R(1, 1) to p2 and p3; p1s state is C1 = 1, R1 = [ 1, 0, 0 ]  `Fp3 sends R(3, 1) to p1 and p2; p3s state is C3 = 1, R3 = [ 0, 0, 1 ]  `Sp2 receives R(1, 1) from p1; p2s state is C2 = 1, R2 = [ 1, 0, 0 ], holding token >`p2 sends the token to p1  `Dp1 receives R(3, 1) from p3; p1s state is C1 = 1, R1 = [ 1, 0, 1 ] `Dp3 receives R(1, 1) from p1; p3s state is C3 = 1, R3 = [ 1, 0, 1 ] `p1 receives the token from p2 `p1 enters the critical section `dp1 exits the critical section  and sets the tokens state to L = [ 1, 0, 0 ] and Q = ( 3 )  `}p1sends the token to p3; p1s state is C1 = 2, R1 = [ 1, 0, 1 ], holding token, tokens state is L = [ 1, 0, 0 ] and Q empty `Up3 receives the token from p1; p3s state is C3 = 1, R3 = [ 1, 0, 1 ], holding token `p3 enters the critical section `]p3 exits the critical section  and sets the tokens state to L = [ 1, 0, 1 ] and Q empty C` HHˆXeHHˆ7t ld@48H}?H =[ #?H ;We Replace With }H =]"$H ;W eHead }H =_#%H ;W!e Comments }? =a$&? CW"e }?H =c%'?H CW#e }H =e&(H CW$e }H =g')H CW%e }d =j(.d DW&eCharacter Macros HHˆ;"HHˆ+Ge HHˆ;$3HHˆ**l}?d =l?d DW'e }d =nd DW(e }? =p)/? EW)e Character }?H =r.0?H EW*e Replace With }H =t/1H EW+e Comments }? =v0B? FW,e HUV ;.HUV 3Ge HUV ;05+HUV 22l H$ ;1H$ 5Ge H$ ;33H$ 44l HHˆ;4HHˆ[37  `Outline for February 13, 2001 `Greetings and felicitations! du`#Suzuki-Kasamis broadcast protocol e` token-based fOD?`"uses sequence numbers, not clocks g`-token has sequence numbers, associated queue h`?how to handle stale requests? tokens sequence number too high is`Raymonds tree-based protocol j` token-based k`5think of token as at root of tree, root moves around `.Distributed Agreement Protocols: system model `synchronous vs. asynchronous `8different types of failure (crash, omission, malicious) 0`authentication `AClassification: agreement (on value), validity (the right value) 1`[Byzantine problem (all agree, initial value of source); review Byzantine Generals problem 2``consensus problem (all agree, if initial value of nodes is same, the final value is that value) !3 interactive consistency problem (all agree on same vector, if  i th processor non-faulty,  i th element of vector is @the value of that node) 4` relationship 5`Solution to Byzantine Problem 6`jCan show: if 3 m +1 processors, at most  m  can be faulty or agreement cannot be reached. 7`!Demonstration with 3 processors. 8` Lamport-Shostak-Pease algorithm `9Application: clock synchronization in the face of faults `"interactive convergence algorithm A`"interactive consistency algorithm HHˆ;6HHˆ 66 lH$ @5!:H$ 99l H$ @6!H$ 8WlV Fault-Tolerant Clock SynchronizationECS 251 Winter 2001Page  8  HUV @7!8HHUV GGldZb== HHˆZc;HHˆF$00= `Example  * DThere are six processes,  p 1  through  p 6 .  p 1  and  p 5  seek mutually exclusive access to a shared resource, and later  p 3  will UU@ request it. 1 Initially: p4 has the token; .p1s state is C1 = 0, HOLDER2 = p3, Q1 empty .p2s state is C2 = 0, HOLDER2 = p3, Q2 empty .p3s state is C3 = 0, HOLDER3 = p4, Q3 empty =p4s state is C4 = 0, HOLDER4 = p4, Q4 empty, holding token .p5s state is C5 = 0, HOLDER5 = p4, Q5 empty @.p6s state is C6 = 0, HOLDER6 = p5, Q6 empty )`Dp1 sends Q(1) to p3; p1s state is C1 = 1, HOLDER2 = p3, Q1 = Q(1). `Dp5 sends Q(5) to p4; p5s state is C5 = 1, HOLDER5 = p4, Q5 = Q(5). `Hp3 receives Q(1) from p1; p3s state is C3 = 0, HOLDER3 = p4, Q3 empty. %`Dp3 sends Q(3) to p4; p3s state is C3 = 1, HOLDER3 = p4, Q3 = Q(1). &`Wp4 receives Q(5) from p5; p4s state is C4 = 0, HOLDER4 = p4, Q4 empty, holding token. ?`Dp4 sends token to p5; p4s state is C4 = 1, HOLDER4 = p5, Q4 empty. @`Hp4 receives Q(3) from p3; p4s state is C4 = 1, HOLDER4 = p5, Q4 empty. A`Dp4 sends Q(4) to p5; p4s state is C4 = 2, HOLDER4 = p5, Q4 = Q(3). B`Jp5 receives token from p4; p5s state is C5 = 1, HOLDER5 = p4, Q5 = Q(5). C`Bp5 resets state to C5 = 1, HOLDER5 = p4, Q5 empty, holding token. D`p5 enters the critical section F`p5 leaves the critical section G`Wp5 receives Q(4) from p4; p5s state is C5 = 1, HOLDER5 = p4, Q5 empty, holding token. U`Dp5 sends token to p4; p5s state is C5 = 2, HOLDER5 = p4, Q5 empty. H`Ip3 sends Q(3) to p4; p3s state is C3 = 2, HOLDER3 = p4, Q3 = Q(1) Q(3). ^`Ip4 receives Q(3) from p3; p4s state is C4 = 2, HOLDER4 = p5, Q4 = Q(3). d`ep4s state is C4 = 3, HOLDER4 = p5, Q4 = Q(3)Q(3) [it sends nothing as it is waiting for a response] e`^p4 receives token from p5; p4s state is C4 = 3, HOLDER4 = p5, Q4 = Q(3) Q(3), holding token. f`Ep4 sends token to p3; p4s state is C4 = 3, HOLDER4 = p3, Q4 = Q(3). h`Dp4 sends Q(4) to p3; p4s state is C4 = 3, HOLDER4 = p3, Q4 = Q(3). ~`^p3 receives token from p4; p3s state is C3 = 2, HOLDER3 = p4, Q3 = Q(1) Q(3), holding token. i`Ep3 sends token to p1; p3s state is C3 = 3, HOLDER3 = p1, Q3 = Q(3). j`Dp3 sends Q(3) to p1; p3s state is C3 = 4, HOLDER3 = p1, Q3 = Q(3). l`Yp1 receives token from p3; p1s state is C1 = 1, HOLDER1 = p3, Q1 = Q(1), holding token. m`Bp1 resets state to C1 = 1, HOLDER1 = p3, Q1 empty, holding token. n`p1 enters the critical section o`p1 leaves the critical section p`Wp1 receives Q(3) from p4; p1s state is C1 = 1, HOLDER1 = p3, Q1 empty, holding token. q`Dp1 sends token to p3; p1s state is C1 = 2, HOLDER1 = p3, Q1 empty. r`Yp3 receives token from p1; p3s state is C3 = 4, HOLDER3 = p1, Q3 = Q(3), holding token. `Np3 receives Q(4) from p4; p3s state is C3 = 4, HOLDER3 = p1, Q3 = Q(3) Q(4).  `4p3 resets state to C3 = 4, HOLDER3 = p1, Q3 = Q(4).  `p3 enters the critical section  `p3 leaves the critical section k`Sp3 sends token to p4; p3s state is C3 = 5, HOLDER3 = p4, Q3 empty, holding token. `Xp4 receives token from p3; p4s state is p4s state is C4 = 3, HOLDER4 = p3, Q4 = Q(3). `Dp4 sends token to p3; p4s state is C4 = 4, HOLDER4 = p3, Q4 empty. A`Ip3 receives token from p4; p3s state is C3 = 5, HOLDER5 = p4, Q3 empty. HHˆZe;HHˆt@<< ldb@@ HHˆb>HHˆ.r%%@: ` Lamport-Shostak-Pease Algorithm ;,` Introduction < This is a recursive protocol. It requires 3 m +1 processors where at most  m  are faulty. It consists of two protocols, the I@}base protocol and the inductive protocol. To run it, determine  m  from  n  and invoke OM( m ).  =b` Notation >t`n  processes ?*`p i  process @O`Protocol OM(0) A`5The source process sends its value to all processes. C`hEach process uses the value it receives from the source. If it receives no value, it uses a value of 0. BM`/Protocol OM( m ),  m  > 0  D`5The source process sends its value to all processes. E* 1Let  v i  be the value process  p i  receives from the source. (If it receives no value, then take  v i  = 0.) Process  p i  iniUU@ltiates OM( m 1) with itself as the source and the other  n 2 processes as the recipients. * 3Process  p i  uses the the value majority( v 1 , ,  v n 1 ), where  v i  is the value received in step 2 from the source proUU1@Dcess and the others are the values received from OM( m 1). N5`Example 9F0 yThere are four processes, p0 through p3. They wish to agree on a value 0 or 1. Let p0 be the initiator, and it has value R/@)1. Assume all processes are non-faulty. H`p0 invokes OM(1) F`p0 sends 1 to p1, p2, and p3. I`*p1 receives 1 from p0 and invokes OM(0). J`p1 sends 1 to p2 and p3. K`p2 receives value 1. L`p3 receives value 1. M`*p2 receives 1 from p0 and invokes OM(0). O`p2 sends 1 to p1 and p3. P`p1 receives value 1. Q`p3 receives value 1. R`*p3 receives 1 from p0 and invokes OM(0). S`p3 sends 1 to p1 and p2. T`p1 receives value 1. U`p2 receives value 1. V`Kp1 computes majority (1, 1, 1) and takes the value at the source to be 1. W`Kp2 computes majority (1, 1, 1) and takes the value at the source to be 1. X`Kp3 computes majority (1, 1, 1) and takes the value at the source to be 1. AG` HHˆb>HHˆ=K?? ldbKK }?H =x1C?H FW-e¢ }H =zB2H FW.e d=~EEd=DdFF l d=Dd& zrE zupkfa\WRMHC>vCFILORUX[^adgjmpsy| %).12/,)&# HUV @8!HUV :WlCLast modified at 3:59 pm on Thursday, February 15, 2001 HHˆ@9!:HHˆII l HHˆ@:!HHˆHW` HHˆbAHHˆ&&KY`5Now assume p2 is faulty and will send a bogus value. [`p0 invokes OM(1) \`p0 sends 1 to p1, p2, and p3. ]`*p1 receives 1 from p0 and invokes OM(0). ^`p1 sends 1 to p2 and p3. _`p2 receives value 1. ``p3 receives value 1. a`*p2 receives 1 from p0 and invokes OM(0). b`p2 sends 0 to p1 and p3. c`p1 receives value 0. l`p3 receives value 0. m`*p3 receives 1 from p0 and invokes OM(0). n`p3 sends 1 to p1 and p2. o`p1 receives value 1. p`p2 receives value 1. q`Kp1 computes majority (1, 0, 1) and takes the value at the source to be 1. r`Kp2 computes majority (1, 1, 1) and takes the value at the source to be 1. s`Kp3 computes majority (1, 0, 1) and takes the value at the source to be 1. ` t`6Now assume p0 is faulty and will send a random value. u`p0 invokes OM(1) v`&p0 sends 1 to p1 and 0 to p2 and p3. w`*p1 receives 1 from p0 and invokes OM(0). x`p1 sends 1 to p2 and p3. y`p2 receives value 1. z`p3 receives value 1. {`*p2 receives 0 from p0 and invokes OM(0). |`p2 sends 0 to p1 and p3. }`p1 receives value 0. ~`p3 receives value 0. `*p3 receives 0 from p0 and invokes OM(0). `p3 sends 0 to p1 and p2. `p1 receives value 0. `p2 receives value 0. `Kp1 computes majority (1, 0, 0) and takes the value at the source to be 0. `Kp2 computes majority (1, 0, 0) and takes the value at the source to be 0. `Kp3 computes majority (1, 0, 0) and takes the value at the source to be 0. AZ`XIn this case agreement is reached, but as the source is faulty the result is not valid. HHˆbAHHˆ@NJJ ldcNN HHˆcLHHˆ7$$N `%Fault-Tolerant Clock Synchronization ,` Introduction  uThe goal is to synchronize the time of clocks on different systems. The protocol includes both faulty and non-faulty 0Iclocks. The assumptions are that initially all clocks are synchronized to within some small value  d , that non-faulty {clocks run at the correct rate (that is, one tick per second), and a nonfaulty process can read a non-faulty clock with an @Perror of at most  e . In what follows, we shall assume  e  = 0. $z` Notation '`n  processes (*`p i  process  M`!Interactive Convergence Protocol !`This assumes that no two non-faulty clocks differ by more than  d . All processes execute this protocol simultaneously. "* p i  obtains the value of the other processes clocks (for example, by using the OM( m ) protocol). Call these values UH@$v 1 , ,  v n . #`2For all  j  <  n , if | v j   v i | > d, set  v j  =  v i . Otherwise,  v j  =  v j . )`PSet  p i s clock to ( j   v j )/ n . E*`Example I*->`vSuppose  p 0 ,  p 1 ,  p 2 , and  p 3  wish to synchronize their clocks. Take  d  = 10,  C 0  = 2,  C 1  = 5, C 2  = 8, and  C 3  = 10. Then: JUU;`Vafter this protocol is used, all the clocks are set to (2 + 5 + 8 + 10)/4 = 25/4 = 6. K*G`\Now suppose  p 3 s clock is faulty and drifts to  C 3  = 25. Then: LU`,C 0  = (2 + 5 + 8 + 2)/4 = 17/4 = 4 M`,C 1  = (2 + 5 + 8 + 5)/4 = 20/4 = 5 N`,C 2  = (2 + 5 + 8 + 8)/4 = 23/4 = 6 O`After the next round, assuming  p 3  reports any value  d  away from  C 0 ,  C 1 , and  C 2 : P`,C 0  = (4 + 5 + 6 + 4)/4 = 19/4 = 5 Q`,C 1  = (4 + 5 + 6 + 5)/4 = 20/4 = 5 R`,C 2  = (4 + 5 + 6 + 6)/4 = 21/4 = 5 T HNow assume  C 3  is a two-faced clock. The danger is that  p 3  will report a value within  d  of  C 1  to  p 1 , and not within  d  of @eC 0  and  C 2 . So, begin with the same values as above, except that  p 3  reports  C 3  = 1 to  p 1  and  C 3  = 25 to  p 0  and  p 2 : W`,C 0  = (2 + 5 + 8 + 2)/4 = 17/4 = 4 X`,C 1  = (2 + 5 + 8 + 1)/4 = 16/4 = 4 Y`,C 2  = (2 + 5 + 8 + 8)/4 = 23/4 = 6 V`At the next round,  p 3  reports  C 3  = 15 to  p 2  and  C 3  = 0 to  p 0  and  p 1 . [`,C 0  = (4 + 4 + 6 + 0)/4 = 14/4 = 4 \`,C 1  = (4 + 4 + 6 + 0)/4 = 14/4 = 4 ]`-C 2  = (4 + 4 + 6 + 15)/4 = 29/4 = 7 CZ`By continuing in this fashion,  p 3  can prevent the value of the clocks of the non-faulty processors from converging. HHˆcLHHˆKQMM lddQQ HHˆdOHHˆ##QS`!Interactive Consistency Protocol ``This assumes that no two non-faulty clocks differ by more than  d . All processes execute this protocol simultaneously. a* p i  obtains the value of the other processes clocks (for example, by using the OM( m ) protocol). Call these values @$v 1 , ,  v n . c`XSet  p i s clock to the median of  v 1 , ,  v n . g_`Example *q*`vSuppose  p 0 ,  p 1 ,  p 2 , and  p 3  wish to synchronize their clocks. Take  d  = 10,  C 0  = 2,  C 1  = 5, C 2  = 8, and  C 3  = 10. Then: UU~`eafter this protocol is used, all the clocks are set to  median (2,5, 8, 10) = (5 + 8)/2 = 6. *`\Now suppose  p 3 s clock is faulty and drifts to  C 3  = 25. Then: B`=C 0  =  median (2, 5, 8, 25) = (5 + 8)/2 = 6 `=C 1  =  median (2, 5, 8, 25) = (5 + 8)/2 = 6 `=C 2  =  median (2, 5, 8, 25) = (5 + 8)/2 = 6  0Now assume  C 3  is a two-faced clock. Begin with the same values as above, except that  p 3  reports  C 3  = 1 to  p 1  and @_C 3  = 25 to  p 0  and  p 2 . All apply an agreement protocol: _`p 3  invokes OM(1) b`T p 3  sends 1 to p1 and 25 to  p 0  and  p 2 . `I p 0  receives 25 from  p 3  and invokes OM(0).  `I p 0  sends 25 to  p 1  and  p 2 . !`' p 1  receives value 25. "`' p 2  receives value 25. `H p 1  receives 1 from  p 3  and invokes OM(0). `H p 1  sends 1 to  p 0  and  p 2 . `& p 0  receives value 1. `& p 2  receives value 1. #`:p2 receives 25 from  p 3  and invokes OM(0). $`I p 2  sends 25 to  p 0  and  p 1 . %`' p 0  receives value 25. &`' p 1  receives value 25. '`] p 0  computes majority (25, 1, 25) and takes the value at the source to be 25. (`] p 1  computes majority (25, 1, 25) and takes the value at the source to be 25. *`] p 2  computes majority (25, 1, 25) and takes the value at the source to be 25. `=C 0  =  median (2, 5, 8, 25) = (5 + 8)/2 = 6 `=C 1  =  median (2, 5, 8, 25) = (5 + 8)/2 = 6 `=C 2  =  median (2, 5, 8, 25) = (5 + 8)/2 = 6 K+UU`*Notice that all arrive at the same value. HHˆdOHHˆNPP l dXtt HHˆXrHHˆ!ts `Raymonds Tree-Based Protocol t,` Introduction u tThis is a token-based protocol. The nodes are arranged in a binary tree, and one acquires the token by going up the I@ytree. The token is always kept at the root, so the tree needs to rearrange itself as the token floats from site to site. vb` Notation wt`n  processes x*`p i  process y`TQ i  request queue (sequence) of sites associated with process  p i z`BH i  holder variable associated with process  p i {UU`T  token |` Protocol }** To request entry, if  p i  does not have the token, it sends a REQUEST( i ) message to the node named in  H i  unless Q i  is not empty (because then it has already sent a REQUEST( i ) but has not yet received the token). It adds the @request to  Q i .  ^`MWhen  p i  receives REQUEST( j ) from  p j :  if  p i  does not have the token, it places the REQUEST( j ) on  Q i  and sends a REQUEST( i ) message along (proUU&@Pvided that it is not waiting for a response to an earlier REQUEST( i ). *2`mif  p i  has the token, it sends the token to  p j  and sets  H i  to j. A`BIf  p i  is requesting entry and receives the token:  Iif  i  is not the first entry in  Q i , it deletes the first entry  j  from  Q i  and forwards the token to  p j . It then sets  H i  to ][@nj . If  Q i  is not empty,  p i  sends REQUEST( i ) to  p j . `if  i  is the first entry in  Q i ,  p i  deletes  i  from  Q i  and enters the critical section. x`@When  p i  finishes executing the critical section: `-if  Q i  is not empty, it deletes the first entry  j  from  Q i , sends the token to  p j , and sets  H i  to  j Q;`sif after step a  Q i  is not empty,  p i  sends REQUEST( i ) to  p j . HHˆXrHHˆ =ss l|.} ? Eu($ ? LWe }? H Ew#%? H LWe... } H Ey$ H LWe }? E{+'? MWe }?H E}&(?H MWe- }H E'#H MWe }? E.*? NWe }?H E)+?H NWe-- }H E*&H NWe }? E1-? OWe }?H E,.?H OWe° }H E-)H OWe }? E40? PWe }?H E/1?H PWe® }H E0,H PWe }? EC3? QWe }?H E24?H QWe© }H E3/H QW e }~H EDbc~H F.W!e }ŠHEDefŠH F/W"e }¤HEDhi¤H F0W#e }¾HEDkl¾H F1W$e }HEDnoH F2W%e }HFDqrH F3W&e }HFtuH 4W'e }BH HDx=BH F5W(eN } BH HD@H6H F9W+eEM }6H HD?A6H F9W,eN }6H HD@B6H F9W-eN } 6H HDAv 6H F9W.e }*H HDLD*H FRW/eC:Superscript }H*H HDCEH*H FRW0eEM }*H HDDF*H FRW1eN }*H HDEG*H FRW2eN } *H HDF> *H FRW3e }H HDQIH FSW4e C:Subscript }HH HDHJHH FSW5eEM }H HDIKH FSW6eN }H HDJLH FSW7eN } H HDKC H FSW8e }H HDVNH FTW9e C:Emphasis }HH HDMOHH FTW:eEM }H HDNPH FTW;eN }H HDOQH FTW<eN } H HDPH H FTW=e }H HD[SH FUW>e C:Computer }HH HDRTHH FUW?eEM }H HDSUH FUW@eN }H HDTVH FUWAeN } H HDUM H FUWBe }H(HD`XH( FVWCe P:Romani }HH(HDWYHH((FV$eLI De Parent = OL Qe Depth = 0 }H(HDXZH( FVWEeN }H(HDY[H( FVWFeN } H(HDZR H( FVWGe }H(HDe]H( FWWHeP:Roman }HH(HD\^HH((FW$eLI Ie Parent = OL Qe Depth = 0 }H(HD]_H( FWWJeN }H(HD^`H( FWWKeN } H(HD_W H( FWWLe }HHDjbHFXM% P:LineComPEment }HHHDacHH FXWNeH* }HHDbdH FXWOeN }HHDceH FXWPeN } HHDd\ H FXWQe }H IDogH FYWReP:Line }HH IDfhHH FYWSeP }H IDgiH FYWTeN }H IDhjH FYWUeN } H I Dia H FYWVe }H I DtlH FZWWe P:Lettereda }HH I DkmHH FZWXeH* }H IDlnH FZWYeN }H IDmoH FZWZeN } H IDnf H FZW[e }\H(IDyq\H( F[W\e P:Lettered }H\H(IDprH\H((F[$eLI ]e Parent = OL Qe Depth = 0 }\H(IDqs\H( F[W^eN }\H(IDrt\H( F[W_eN } \H(IDsk \H( F[W`e }PH ID~vPH F\WaeP:CodeN }HPH I!DuwHPH F\WbeP }PH I#DvxPH F\WceN }PH I%DwyPH F\WdeN } PH I'Dxp PH F\Wee }6HI)D{6HF]f% P:CodeComPEment }H6HI+Dz|H6H F]WgeP }6HI-D{}6H F]WheN }6HI/D|~6H F]WieN } 6HI1D}u 6H F]Wje }H I3H ^GkeP:CodeC }H I5H ^GleP }H I7H ^GmeN }H I9H ^GneN }H I;H ^Goe }H I= H _Gpe P:CodeASM }H I?H _GqeP }H IAH _GreN }H ICH _GseN }H IEH _Gte }H IG H `Gue P:BodyIndent }H II H `GveP }H IK H `GweN }H IM H `GxeN }H IO H `Gye }H(IQBH( aGze P:Answer1 }H(ISH((aeLI {e Parent = UL Ae Depth = 0 }H(IUH( aG|eN }H(IWH( aG}eN }H(IY H( aG~e dIf" dIgds%sy| %).12/,)&#dIidE l}6DJD6DFb% CSS Export PE Encoding }D6HJDD6H FbWe ISO-8859-1 }6HJDX6H FbW e }DJDWDFc % Export EnPEcoding }DHJDDH FcW e ISO-8859-1 }HJDH FcW e }HKS H  dG e1 }HKU H dG* eTitle }HKW H  dGe dLeftd!Rightd ReferenceddHTMLd"DHTMLd" Headingsd d rd ;d >d Ad Ld OdHTML%@@ <Mapping Table Title. @@ <Body. f@ < Answer1ItalicAnswer: . f@ <Body. @@ <Footer. f@T < TableTitleT:Table : . f@ < BodySpaced. f@N < Numbered N:.< =1>. f@ <...Date. mf@ <l. DateProject. @@ <Header Double Line. f@  $.6.Z.~..CodeC. f@T <Heading1Body. $f@ < Answer. f@ < NumberedSpaced. f@ <Body. @@ <Header Double Line. f@ < CellFooting. f@ < CellHeading. f@ < CellBody. @@ <Mapping Table Cell. f@ <.Reading. @@Mapping Table Cell.  f@P<TitleBody. @@ Mapping Table Cell. @@ <Mapping Table Cell. f@$<.Line Single Line.  f@P<TitleBody. f@ <CellBody. f@ < CellHeading. f@ < Footnote. f@T <Heading2Body. f@T < HeadingRunInBody. f@ < Indented. f@ < TableFootnote. L̀Lf@N < Numbered N:.< =1>. $f@L <$. Lettereda L:.. $f@LE <$. Lettereda L:.Lettered. f@NE < Numbered1 N:. Lettereda. f@NE < Numbered1 N:. Lettereda. f@T < TableTitleT:Table : . f@ <$HBody. $f@LE <$. Lettereda L:.Lettered. $f@L <$. LetteredL:.. f@T <Heading1Body. f@ <$Body. f@NE < Numbered1 N:.Numbered. f@T <Heading1Body. f@ < Bulleted\t. f@ < Bulleted\t. f@N < Numbered N:.< =1>.  f@P<TitleBody. f@ < Bulleted\t. $f@L <$. LetteredL:.. f@ <$Body. 6$f@R <6. Romani R:.. 6$f@R <6. RomanR:.. f@ < BodyIndent. f@  $.6.Z.u..CodeASM. Hf@ <H.. CodeComment. f@   .$.H.l..... .D.h.CodeN. Hf@ <H. LineComment. @@ <Mapping Table Cell. @@<*Mapping Table Cell. f@ <$Body.  < <<Emphasis <  < ڝ<<<EquationVariables   BoldItalic <Italic < ڝ< < < < < < <Bold8 Symbol   Computer 8  Symbol < < Subscript < Superscript B  Wingding<ZZThinMediumDoubleThick@ Very Thin HHHHHFormat A HHHHHFormat BH Mapping TableH Mapping Tableh65HHHHH$bDHH+4?HHH68?HH :C?HHHTDL?HH*H ? @ h( A B C D E h  F G H I J h  K L M N O h  P Q R S T h( UVWXYh Z[\]^h_`abc7h defghChijklm]h(nopqrh stuvwh xyz{|h(}~h h    h  h h h)h  !"#$5h%&'()Oh  *+,-.[h!/ 0 1 2 3 uh "4!5!6!7!8!h!#9":";"<"="©h "a>#?#@#A#B#Td %FC$D$E$d $&FF%G%H%p6%'FI&J&K& &(FL'M'N'')FO(P(Q(((*FR)S)T)()cFU*V*W*Vd ,FX+Y++Z+f +-F[,\,,],r ,.F^-_--`-~ -/Fa.b.5.c.Š.0Fd/e/6/f/¤/1Fg0h070i0¾02Fj1k181l113Fm2n292o224Fp3q3:3r33s4t4;4u4Bh 9Fv5w5x5<5=59?9@9A9B9xd ;:::: :C ;";#;$; =  <<<<> ====? >>>K >@ ???W ?A @@@c @d AAA ;%C&C'C(Cd E)D,D-D DF.E/E0E EQ1FBFCF M#L$L%L NL&M'M(M OM)N*N+N PN,O-O.O QO/P0P1P FP2Q3Q4Q*h S9FCRDRERFRGRh TRFHSISJSKSLSh USFMTNTOTPTQTh VTFRUSUTUUUVUh(WUFWVXVYVZV[Vh(XVF\W]W^W_W`WhYWFaXbXcXdXeXh ZXFfYgYhYiYjYh [YFkZlZmZnZoZ\h(\ZFp[q[r[s[t[Ph ][Fu\v\w\x\y\6h^\Fz]{]|]}]~]h _]^^^^^h `^_____h a_ ` ` ` ` `h(#`aaaaa6cFbbb*bFcccA dddComment @D @<@@ d@ BlackT!WhiteddARedddGreendd BluedCyandMagentad Yellowd PICT Color 1Header/Footer $1Header/Footer $1Header/Footer $2Header/Footer $2IndexIndexCommentCommentSubjectSubjectAuthorAuthorGlossaryGlossaryEquationEquation Hypertext Hypertext  Cross-Ref Cross-Ref Conditional TextConditional TextPositionFMPrivatePositionFMPrivateRangeEndFMPrivateRangeEndFMPrivate HTML Macro HTML Macro M.Times.P Times-Roman FrameRoman M.Times.B Times-Bold FrameRoman M.Courier.PCourier FrameRoman M.Helvetica.BHelvetica-Bold FrameRoman M.Times.BITimes-BoldItalic FrameRomanM.Helvetica.BIHelvetica-BoldOblique FrameRoman M.Times.I Times-Italic FrameRoman FrameRoman FrameRoman M.Symbol.PSymbol FrameRoman M.Wingdings.P Wingdings FrameRomanHCourier Helvetica7Symbol;TimesA Wingdings#Regular#Roman MediumBoldRegular ObliqueItalic~ p˃Mτk6 \I|#KPtq0_A_sR\|k=Y]/O4򪖛(J5eumbܧGz:D E|B*3jD"Y0W6z}طI&:ݜWBCh%6_Iٜq.٠QpSWJ 8ொ-w^="U@:T=_H)FS=Z+[ٖs|П߫TjmR@ mn-Pў