WordProLWP7.a YƤ1rWord Pro Text File/DFBAB@PPPPP-PPP@Jeffab?G<LH @@@d*plC|@@@"q!@@ @@P@c xpp  @@@PppP @@@ fqcP`R@d H@dZZ Z Z Z pH@PZ  pH@P pH@P pH@P pH@PZZZZ(( /!("(# ($(%(&('Z(3Z)Z*Z+!Z,Z-fZ.cZ/dZ0eZ17Z2$Z3Z4?Z5Z6nZ7*Z8 #Z9 %Z:Z;Z Z Z >H@@ ??X@P`@@P`@@Pp@P`@@Hx``@@Hx``PC q@@P@A!@B?Bp=  xA % x@@@Q $$ %yy A&PHPH q %@@@@Q  yx@Hx@Hx@Hx@Hx`'ABBBBRBBB A]Ay- }Ex$ ?}pExP:An@P@P@@@ P@@@P @@@ X@@@Pp>!A*@EH@ Default Textlq@@@@P |C@@@P !"AO@@ @@P@3 &tB?!xBz$Bp= 7@-@<@Pc@P c@P c@P |p@@@P *>pEH @ Heading 1 #Ox@@@P@A@Aj& $ p`@x@%]A$Az&A3Bz$Bz*&  p`@x@ ABff4]A%AHHPHA s-ExP:A@P@P@@@ P@@@P @@@ P@@@PpO!A #@@ @@P@ A%@p@ q@AJBABffbff,7q@P@P@@@ P@@@P @@@PpP@@@  Aff, ABffbff€BBBH$@P@P P P  DADxQE @QDs%D@@EBodytBPP@EBody@p F   yPu .A +AV@@ Default PageQA@JIXA @CPageH@@Default Page Styleh$@@ Default TextIxAA~AyAc@ iAfAdAe@ @Printer Folder SettingH$@@@ CA =AT@iH@IAAuP@CPageIAu+ A p@ &d@Q ,@FStory D mt q@@P#AyU@@Default FooterXA@BQJA +AP@EFooter %A@@@Default Footer Styleh$@aAAAyA@ @YAfAdAe@ XQ$@c CU =@pH@B PRy =P@EFooterI HA#A %Iyy@ @Y XQ@cT AxpA@P H*8A Byd@Q C @@FStory8A BY IA IAmq#yU@@Default HeaderXA@BQJPA#AP@EHeader A@@@Default Header Styleh$@aAAAyA@ @YAfAdAe@ XQ@c =Wq Cy@pH@B PRPA CA .P@EHeaderI BAA Iyy@ @Y XQ@c B* HA /yd@Q = @@FStory HA /Y KA KAmrm AmTأ8A@B1. Problem 5.18 page 126. You can assume that the input for each processor is 0 or 1. Consider an asynchronous shared memory system in which there are only @ @ @ test&set registers (as defined in Chapter 4) and two processors. Show that it is possible to solve consensus in this system even if one processor can crash.SSEnd KsPAmT(A B@B Jeff Absher @ @ @ FDistE @ @ @ FAlgsE @ @ @ DHWD 3.SSEnd/d A8x @mzqk@ Default TextP@@@i@@Default Text Style@@@pE A@x`aAnD}AA"x@@@PP@@@  r H@@a  IPAmT(A H@ASSEndm:pAHamT(A@BConsensus is defined as:SSEndpsAmH PAmT(A@BTerm: For every non-faulty @ @ @ proc@ @ @ C,* eventually the output is assigned a valueSSEnds]vApHPAmT(A@BAgreement: All non-faulty @ @ @ Gprocs agree.SSEndvHsHPAmT(A@BValidity: all non-faulty @ @ @ Gprocs7 must output an input given to at least one non-faulty.SSEndH "AvHamT(A@ASSEndR^  'HPAmT(A@D@ @ @ EAlg for @ @ @ p(x)@ @ @ B:SSEndb2 A 5HamT(A@AJ If output = 0SSEnd 2 \A SHamT(A@AJ If output = 1SSEnd|A HPAmT(A@B4 cases (assume @ @ @ Ealg is AND of @ @ @ GP1,P2& (P1 * P2) ... 1 if all ones, else 0):SSEnd?A|HamT(A@BInitialize shared memory = 1.SSEndAHamT(A@ASSEndBAHamT(A@B!P1 is given an input of A H1C SSEndBAHamT(A@B!P2 is given an input of A H1C SSEnd7 [HamT(A@BP2 fails somewhere...SSEnd A AB  PP  ZHZOZIYmZGttzuZutt ZLZP:ZNZ~V uAuxpA@PU AxpA@PW AxpA@PX AxpA@P\[u^_`abZJZKZQb(Ru(S CM;(e(f8c(g(h(i(j]##AyU@@ Default FrameQ A@IQXAAP@DFrameH@@Default Frame Styleh$@@ Default TextIAAAAc@ @YAfAdAe@ A]@ .Y +u@pA@B PRA =A +P@EFooterI /A#A %Iyy@ @Y XQ@c +Xq .yu@pA@B PRPA .A#P@EHeaderI ,AA Iyy@ @Y XQ@c 'Ayd@d@FStoryAYAAm 8"q Hyd@d@DStoryq HY9A9AmU@@Default Drop CapQ A@IQXAAP @FDropCapIAxH@@Default Drop Cap Styleh$@@ Default TextI&AAAyA@!AfAdAe@ X@Dzb%@@ /* BA ,yd@Q . $@FStory BA ,Y 0A 0Amk0mAo@ Note Initials`P@Y@x`al2 F AB  PP  KLAJH#amT(A@ASSEnd F 9AB 4 PP  Z :1@Engineering NumberingI8@ OXj3@Viewed Anchor (A)P@@@@Y@x`Affj~.B @ ClickHereP@@@@Y@x`A)\mqW@@ Default TableQH@@RB0PAAP @ SuperTableH@@Default Table StyleAy@. A@_X@@Default Right ColumnQ@H@@@QH0@AAP@CCellX$@@ Default Texty@!qyX@@ Default CellQAA@@@R@0@AAP@CCellH@@Default Table Cell Styleh$@ @ Table TextI3AAAA@7Ay[AyX@@Default ColumnQ@H@@@QH0@AAP@CCellX$@@ Default Texty@!`AyX@@Default Left ColumnQ@H@@@QH0@AAP@CCellX$@@ Default Texty@!1b@Default Headingsa;'y:qAu ,, /Bqd@Q + $@FStory /BQ -A -Am 'Ayd@d@FStoryAYAAmaSm@D@@ap@PT@@apE.@@ap@PT@@apE.@@ap@PT@@apE.@@ap@PT@@apE.@@ap@PT@@apE.@@ap@PT@@apE)@@ap@PT@@apE)@@ap@PT@@apE)@@apE(@@ap@P T@@apB)SSEnd9RSm8@D@@ap@PT@@apF.0@@apE.@@ap@PT@@apE.@@ap@PT@@apE.@@ap@PT@@apE.@@ap@PT@@a?pE.@@a?p@PT@@apE.@@ap@PT@@apE.@@ap@PT@@apE.@@ap@P QSSEnd *yd@Q $@StoryYAAm 0PAm /@ASSEndo,kA @ Note Date`P@Y@x`al2 LMAKH$amT(A@ASSEndJMKAIH"amT(A@B+Read sections 6.1 and 6.2 of DC and handoutSSEndQ ?PA)R 5 m@B4. Modify the 3-Phase Commit algorithm from the handout so it permits processes to decide and halt quickly in the failure-free case. Your algorithm should use a small constant number of rounds and O(n) messages, in the failure-free case.SSEnd.A:@Legal NumberingI@ OXj/~ @ Anchor (A)P@@@@Y@x`A+B~ @Outline (Not Indented)P@@@i@"@ Left Justified Outline Numbering@@@pE A@A+@D  O @@@QP Za'  ;#  ) ,Bqd@d@FStory ,BWm -PAm ,@ASSEndTSm@D@@@Px@PT@@@PxE.@@@Px@PT@@@PxE.@@@Px@PT@@@PxE.@@@Px@PT@@@PxE.@@@Px@PT@@@P?xE.@@@P?x@PT@@@PxE.@@@Px@PT@@@PxE.@@@Px@PT@@@QpE.@@@Qp@P QSSEnd 'yd@d@Story_mPAm@ASSEndGoA @ Body Singlep@i@P@@@pE A@Am@D= ; @ =HamT(A@ASSEnd=;  # @@@  c  b ZB( @GBullet 2p@i@P@@@pE A@Am@D  " @@@RH c P  @ @amT(A@ASSEnd;d # @@@   c (S2 @First Line Indentp@i@P@@@pE A@Am@D-# c P   @amTQA@Bo@IA Om not sure that I understand how the generalA Os input is any different than an initial condition here.SSEnd:;A9HamT(A@ASSEnd2[(D @ Heading 1P@@@i@P@@@pEAm@D B}t> # @@@     *  @amT(A@BRound 0SSEnd9:B l@amT(A@ASSEnd   >  @amT(A@AJRead generalA Os inputSSEnd }Q  @PAmT(A@AJ=Send generalA Os input to everyone else as status data for @ @ @ EalgC CSSEndQ *]  @amT(A@BRound 1SSEndIB @amT(A@ASSEnd] ' Q @PAmT(A@AJRun @ @ @ Ealg C among @ @ @ lieuts! to concur on generalA Os inputSSEnd 8@amT(A@ASSEnd' ,] R  Am@DE    EAlg2 c guarantees all 3 properties. If the general is @ @ @ FByz, then all @ @ @ lieuts will agree on X something as provided by @ @ @ Ealg= C regardless of differences in the generalA Os input. The @ @ @ EalgL will terminate because C will terminate. If the general is not faulty, and @ @ @ Ealg C guarantees to maintain validity, All source data was non-faulty in round 1, so validity is maintained through round 1 into the start of @ @ @ Ealg C. @ @ @ EAlg5 C will maintain that validity through to completion.SSEnd8(@amT(A@BFRun GSSEnd,1' @amT(A@ASSEndE8@PAmT(A@BSet general to @ @ @ CpnSSEnd1,@PAmT(A@B](b) Assume that you have an algorithm G for the general's problem (with Byzantine failures). SSEnd(@amT(A@BFRun GSSEndG1@amTQA@BkDesign an algorithm C for the consensus problem (with Byzantine faults) using algorithm G as a subroutine..SSEndI@PAmT(A@BSet general to @ @ @ Gp(n-1)SSEndG @PAmT(A@BPretty much Phase-king with H@@ Fwith1 the general being the king in each set of roundsSSEnd&F@amT(A@BD...SSEndF+@amTQA@BRun G //if p1 is non-faulty we will agree with him, if he is faulty we will agree with each other (carried fwd from last round)SSEnd4 @amT(A@BSet general to p0SSEnd+4F@amT(A@BSet general to p1SSEnd+@amT(A@BbRun G //if p0 is non-faulty we will agree with him, if he is faulty we will agree with each otherSSEnd "Q 0BH@PAmT(A@B Initialize @ @ @ outputlockE = 0SSEnd 'R 0HamT(A@ASSEnd 0O 'A "HPAmT(A@B Initialize @ @ @ sharedmemE = 1SSEnd 5b '@PAmT(A@AJWhile @ @ @ testandset(1,@ @ @ outputlock@ @ @ C) = 1 ; @ @ @ F//@ @ @ spinwait on @ @ @ outputlockE = 0SSEnd At SA JHPAmT(A@AIL@ @ @ Testandset(@ @ @ output,E @ @ @ sharedmem)SSEnd J- AA HamT(A@AIJF:loopSSEnd SB AHPAmT(A@AIL@ @ @ FGotoF loopSSEnd \s eB @PAmT(A@AIJGIf @ @ @ Testandset( 1, @ @ @ sharedmem ) = 0;SSEnd e6 wA \HamT(A@AIIJ Output := 0SSEnd wU A eHPAmT(A@AIIL@ @ @ FGotoE @ @ @ Floop2SSEnd t A HPAmT(A@AIL@ @ @ Testandset(output,E @ @ @ sharedmem@ @ @ B)SSEnd b JA HPAmT(A@AIL@ @ @ Testandset(0,E @ @ @ outputlock);SSEnd -|B @PAmT(A@AIIIISSEnd < Bb@PAmT(A@AIL@ @ @ G:loop2SSEnd /  wHPAmT(A@AIJFElse SSEnd $ B @PAmT(A@AISSEnd d  HPAmT(A@AIIL@ @ @ testandset(0,E @ @ @ outputlock)SSEnd E  @PAmT(A@AIIL@ @ @ FGotoE topSSEnd 6 'R@amT(A@AJOutput := input;SSEnd '* 5B @amT(A@AJE:topSSEnd [ eHPAmT(A@B[P1 is assigned output of 1 initially, and if it never obtains the lock, the output of 1 is @ @ @ maintianed.SSEnd e x [@PAmTQA@BIf it does obtain the lock that means it obtained it before p2 did and will output a 1 still, or that p2 completed updating the Ă@ @ @ sharedmem1 with a 1 prior to failure. P1 still outputs a 1.SSEnd x  e@amT(A@ASSEnd <  x@amT(A@BP1 is given an input of 0SSEnd H  @amT(A@B%P2 is given an input of either 1 or 0SSEnd 5  @amT(A@BP2 fails somewhereSSEnd |  R  AmT(A@B&Output is never reassigned for P1, so @ @ @ AP1A Ks output is correctSSEnd r HBA@      @amT(A@ASSEnd <  @amT(A@BP1 is given an input of 1SSEnd <  @amT(A@BP2 is given an input of 1SSEnd /  @amT(A@B No one failsSSEnd }  @PAmT(A@BThe @ @ @ sharedmem is never set to 0 so neither will ever reset outputSSEnd Q  @amT(A@B/Output is immediately assigned for both PA JsSSEnd   @amT(A@ASSEnd <  @amT(A@BP1 is given an input of 0SSEnd < , @amT(A@BP2 is given an input of 1SSEnd  $ :@PAmT(A@BEventually P1 will get the @ @ @ outputlock and assign @ @ @ sharedmemG to 0.SSEnd $z 4 @PAmT(A@BThen release the @ @ @ outputlock' and P2 will eventually get it. P2 willSSEnd ,/ : @amT(A@B No one failsSSEnd 4 B $@PAmT(A@BSee @ @ @ sharedmem" = 0 and will immediately updated @ @ @ sharedmem back to 0SSEnd :8  ,@amT(A@BP1 assigns output :=0SSEnd B | 4@PAmT(A@B#And will set its output to 0, both @ @ @ Gprocs will spin forever updating @ @ @ sharedmem to 0 andSSEnd J P |@amT(A@ASSEnd P d J@amT(A@ASSEnd d l P@amT(A@ASSEnd l$9B d@PAmT(A@AISSEnd |= J B@amT(A@BBoth will have output = 0.SSEnd G@amT(A@ASSEnd   @PAmTQA@B5Eventually we will hit at least 1 general who is not @ @ @ Gbyz@ @ @ C, from that point on, all @ @ @ non-faultys: will agree with each other on the correct value. (valid) SSEnd u' 3BA@     @PAmT(A@BCG will terminate by definition, this just runs G n times so this @ @ @ Ealg will terminate.SSEnd  @amT(A@ASSEnd   mT(A@ASSEndZ    @PAmT(A@D@ @ @ EB@ @ @ ecuase& G will guarantee that all non-faulty @ @ @ lieuts agree on something, all @ @ @ non-faultys will agree.SSEnd  MH%PAmT(A@BProve that the @ @ @ Ealg for finding a maCximal consistent cut is correct.SSEnd   @%amT(A@ASSEnd   @%PAmTQA@BConsistent: for all I and j... @ @ @ DKi + 1 of pi is prior to @ @ @ Dkj of @ @ @ Fpj@ @ @ G...@ @ @ EakaE @ @ @ DpjC does not depend on any processorA Os action from after the cut. SSEnd  3 @%PAmTأ8A@BAWhen told to cut, Every processor starts scanning its history of @ @ @ timestampq vectors, it finds the maximum entry (m) that is < the cut vector (k). Each subsequent entry m in the processors @ @ @ timestamp= vector array is such that m > m-1 so no event x could occur @ @ @ dependant/ on (after) the cut in any dimension such that @ @ @ time(x) => @ @ @ Fp(m)" by the definition of A H>A J.SSEnd 3OB @%amT(A@ASSEnd 4qQPBA@F 5 4 9 FB  PP   ? |QI)YmT(A@ASSEnd E, O xA)YmT(A@BRound 1:SSEnd JD S OA)HAmT(A@AJIf 0 @ @ @ decide0SSEnd Oi J EAHAmT(A@AJSend @ @ @ Finit values to @ @ @ FprocC 1SSEnd S% X JA)HAmT(A@AISSEnd X, ] SA)YmT(A@BRound 2:SSEnd ]r b XA)HAmT(A@AL@ @ @ FRecv either @ @ @ decide0 or ready fFrom 1SSEnd b g ]A)HAmT(A@AJGIf @ @ @ FrecvE @ @ @ decide0... Become @ @ @ Decide0SSEnd gV  bA)HAmT(A@AJGIf @ @ @ Frecv ready become readySSEnd l7  |AHAmT(A@D@ @ @ GRound1SSEnd p t AYmT(A@ASSEnd t x pAYmT(A@ASSEnd xg E tAHAmT(A@D@ @ @ Pother@ @ @ E... Initially uncertain stateSSEnd |& l ?AhYmT(A@BCP1SSEnd   AYmT(A@ASSEnd ,  AYmT(A@BRound 2:SSEnd m  AHAmT(A@AJGIf @ @ @ decide0 Send @ @ @ decide0 to allSSEnd E  AYmT(A@AIJCollect values into vector.SSEnd Q  AHAmT(A@AIJ If vector is all 1 become ready.B SSEnd .  AHAmT(A@AJFElse SSEnd ,  AYmT(A@BRound 3:SSEnd 4  AYmT(A@AIJ send readySSEnd >  AHAmT(A@AIL@ @ @ Decide1SSEnd   AYmT(A@ASSEnd I  lAHAmT(A@AJIf 0 @ @ @ decide0B SSEnd   gA) YmT(A@ASSEnd ,  A) YmT(A@BRound 3:SSEnd e  A) HAmT(A@AJGIf @ @ @ FrecvE @ @ @ decide1 from 1SSEnd F  A) HAmT(A@AJBecome @ @ @ decide1SSEnd +  AYmT(A@AJEelseSSEnd r  AHAmT(A@AJGif @ @ @ decide1 then send @ @ @ decide1 to allSSEnd   AYmT(A@ASSEnd ,  AYmT(A@BRound 4:SSEnd   A) YmT(A@ASSEnd ,  A)YmT(A@BRound 4:SSEnd H  A)YmT(A@AIJSend status to new P1 (old p2)SSEnd 5  AHAmT(A@AJ If I am P2, SSEnd 7  AYmT(A@AIJ become new P1SSEnd f  AHAmT(A@AIL@ @ @ FRecv status from other @ @ @ FprocsSSEnd h  AHAmT(A@AIJ&If vector contains 0 and not decided, @ @ @ decide0SSEnd h  A HAmT(A@AIJ&If vector contains 1 and not decided, @ @ @ decide1SSEnd b  A$YmT(A@AIJ8If vector is all uncertain and I am not decided decide 0SSEnd N  &J  mT(A@AIJIf I am uncertain become ready.SSEnd s @BA@  t 9B  PP   (  A'HAmT(A@AIISSEnd +  A'YmT(A@AJEelseSSEnd J p AYmT(A@AJ#If vector was full send TERM to allSSEnd r HBA@ 9     AYmT(A@ASSEnd .  AHAmT(A@BRound 5 SSEnd `  AHAmT(A@AJGIf @ @ @ Frecv TERM from P1 then terminate.SSEnd   AHAmT(A@AJDIf receive @ @ @ decide0 or 1 and @ @ @ decide0 or @ @ @ decide1SSEnd _  A HAmT(A@AJGIf @ @ @ FrecvE reCady, go to ready.SSEnd f  A$HAmT(A@AJ'If I am P2 (new P1) and undecided then @ @ @ decide1SSEnd   A$YmT(A@ASSEnd +  A$YmT(A@BRound 6SSEnd   A$HAmT(A@AJIf I am JP2 and @ @ @ decided1 then send @ @ @ decide1 to allSSEnd u  A$HAmT(A@AJGIf @ @ @ FrecvE @ @ @ decide1E H@@ decide1SSEnd A  A$YmT(A@AJIf I am P2 continue as P1.SSEnd   A$YmT(A@ASSEnd   A$YmT(A@ASSEnd   A$YmT(A@ASSEnd   A$YmT(A@ASSEnd u $J  mTz*A@BÿBasically this sends a TERM in round 4-5 if P1 thinks everything is Okay and there are no failures. And all processors obey it, but if they do not get a TERM, they continue into the failure mode.SSEnd  H$@P@P P P DFiEa H@H@@P@@P@@PPpPP`@p@P P wŮ<&DQGAOALQPQHATANAYAZAVAUAWAXA\A[A^A_A`AaAbAIAJAKAQARASAM@ dAeAfAcAgAhAiAjPAH dP@QH pcPay c pcH pcPa pc cpccpcPaUUH cpcP@QHdP@QTT cpcP@QTT cpcP@QH dP@QUUH cpcP@QHdP@P@@Times New RomanHWH@ MS Sans Serif H @ WingdingsH @ Arial Black H@Arial hWy@H@@pGH@ ]AAQrys@@George P. Burdell832882267FA iaA@H@@P@@P@@PPpPP'@%c:\lotus\smasters\wordpro\default.mwpH@p@P P pAO\\goo\hpdj832cAFTC@D od@@B,@B,ULetter pPPQDINU"R0$CR  `???????*$T$$T$P@@d@PAH@@ELPT1:@\\goo\hpdj832c @winspoolP@E1-9999XPDUVerC@P@Original Version@Jeffab?G<A?AAAB@@Jeffab1020020543A DYƤ1:.P@@CHH@sh PIHBJN   JGQv1XA<U]1!@Ec1AFe1H@ahID IIIIIIIII IIIIIII7I%III[IIIvImIEIIIIII IIIIII'I0I9IEIQI]IiIuIIIIIIIIIIIIIII`IoIHLQIIfIY I I*III=IFI_IrItI IhIOI\IgI IIIIIIIIIIIII'I2IIeIIIIIIIIhI|I"IIk I I IIIIIIII5IkIPI@Ip I IfI- IIoICII*I%II&I$I+II3I]III I.II I I I0ICI2II I 3IPI2IIIa In I2IIII0Iw"I'IzI`IIII'I,Iq'I+IV/I I.I%I+IG1I0II2I?Ig0Io.I%II.I-I/I~II-I INIWIIIPI$I INII)III I IAI+I I!I%I IFIy I IIOI%IINI"De1BHF2"@U&/2! ?0/2*G${R02UE72#E{23FKM5@F?GI>I>Io?I?I @I@I@I%AIiAIAIAI8BIBIBIBICIDIDIDINEIEIFI+FI:FIaFIFIFI GIGIGI%HIiHIHI@IIIIIIJIJIwKIKIKIKILI]LILI}MIMIMI@NIgNININIpOIOI!PIEQI=SIdSISISISISI TIYTITITI+UIUI,VIVIVIVIWIWIWIWIXIXIXI-YIcYIYIYIZIAZIZIZIZI[[I[I[IV\I~\I\I\I]I^]I]I]IH^I^I(_I_I_I`I&`IV`I`I`I`IaI/aIeaIaIebIbI:cIbcIcI#dIdIdIeI9eIaeIeI}fTDe1=AI{kInHYƤ1Qv1&/20/22{2]1c1E72e1KM5BR<Ů ?Cx7w7w7J _7_7_B_,,,Ev7 s7s7t=~7s7 s7C], ^, ],  d)! ! !:,,,Ba,  a,  a, a2-,-@ h,i,h, iCb, b, b, b2- ,-)! ! != K" ;! ;! A%"!' !!  !   )! )/  -  .$ 0  r l  m- I  9     9<      8'3+       &(6       #  21?         3|~~ MiscellaneousMiscellaneousFileProtectionHeaderLWPStreamTypePreviewWordProData  <h rrҊ0. &CMHdr<