Aa!r}  ` p P` P00`pP` @HH $ @d HHHH̀̀̀ff@  d Footnote TableFootnote**.\t.\t/ - :;,.!?1 e;' e;TOCHeading1Heading2   UEquationVariablesF ;`<<=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::335577AHHA ;b;d;f;h;j;l;n;p;r;t;v;x;z;|;~;;;;;;;;;;;;;;;;;;;;;B%B';;;;;;;;;;BIBK;;;;;;;;;;;;;;;;;;;;BB;;;;;;;;;;<<<<<< < <<<<<<<<BB< <"<$<&<(<*<,<.<0<2<4<6<8<:<<CC<@D@DBDDDFDHDJDLDNDPDRDTDVDXDZD\D^D`DbDdDfDhDjDl?PDnDpDrD{D}DDDDE E EE!EEEEEEdq5+}? @=? BW5e 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'++~ytoje`[vCFILORUX[^adgjmpsy| %).1OLA>;W/Bm }d ;ad WeHTML Mapping Table }Hd ;cHd We }Hd ;eHd We }Hd ;gHd We }Hd ;iHd We }H&;kH&% FrameMaker PE 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#H %New Web PEPage? }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 Q&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(( 3eP 1e Parent = OL Q2e 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((IeLI Ge Parent = UL QHe 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;^`HR% P:HeadingRuPEnIn }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<hjCH\% P:TableFootPEnote }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((deLI be Parent = OL Qce 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 }»d <DZF»d F$W:eHTML Options Table }D»d <DD»d F$W;e }D»d <DD»d F$W<e }D <DCGD F%W=eControl }DH <DFHDH F%W>eValue }H <DGIH F%W?e Comments }D6<DHJD6 F&W@e Image Format }DH6<DIKDH66F&A% 0001IMAGGIF  MACP0001GIPEF }H6<DJLH6 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 }DD(<DTVDD((F*L% Copy Files  Imported by PE Reference }DDH(<DUWDDH( F*WMeN }DH(<DVDH( 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 = DaR?~H F.WYe }~H = DRd~H F.WZe }?= Dce?F/[% StartOfSubPEDoc }?H=DdS?H F/W\e }H=DSgH F/W]e }?=Dfh?F0^% EndOfSubPEDoc }?H=DgT?H F0W_e }H=DTjH F0W`e }?=Dik?F1a% StartOfFirstPESubDoc }?H=DjU?H F1Wbe }H=DUmH F1Wce }?=Dln?F2d% EndOfFirstPESubDoc }?H=!DmV?H F2Wee }H=#DVpH F2Wfe }?=%Doq?F3g% StartOfLastPESubDoc }?H='DpW?H F3Whe }H=)DWsH F3Wie } ?=+Drt ?F4j% EndOfLastPESubDoc }? H=-DsX? H F4Wke } H=/DX H F4Wle }H CD_wH F5Gme C:Symbol }H CDvxH F5GneEM }H CDwYH F5GoeN },d =8|,d 6WpeCross-Reference Macros }?,d =:?,d 6Wqe },d =<,d 6Wre }<? =>y}<? 7Wse Macro Name }?<H =@|~?<H 7Wte Replace With }<H =B}<H 7Wue Comments }H?=D~H? 8Wve See Also }?HH=F?HH8w% See Also: PE <$paratext> }HH=HHH 8Wxe }Vd A;DVd F+Wye }fH A=D\]fH F,WzeHead }rH A?D_`rH F-W{e }hd =Q hd :WeGeneral Macros }?hd =S?hd :We }hd =Uhd :We }hd =Whd :We }x? =Y"x? ;We Macro Name d= d= d l d= di  WBm }d = d  <W|eHeadings Table }Hd = Hd  <W}e }Hd = Hd  <W~e }H= H  =WeHeading Level }HH= HH =%Paragraph ForPEmat }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  @We1 }HWH= HWH @W  eTitle }WH= WH  @W e }?H @ ?H BW6e... }H @H BW7e d@48H}?xH =[ #?xH ;We Replace With }xH =]"$xH ;W eHead }xH =_#%xH ;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ˆD"7  ` Final Exam `kDue Date : Tuesday, March 20, 2000 at 12:30PM (the end of the reglar final exam period for this class) 3 vIf you want to submit this electronically, please email it to me at bishop@cs.ucdavis.edu. Also, please send both PDF/ASCII/Postscript  and  the original format (Word, Framemaker, whatever) as attachments, just in case I cannot read the @PDF/ASCII/Postscript. ` ! |( 70 points ) Consider a network in which the sites are arranged into a single graph for purposes of implementing a distributed mutual exclusion algorithm. (In other words, the network is  not  fully interconnected.) There are  n  *sites, and site  k  is connected to  k i   n  other sites. This question asks you to explore some of the issues raised by UUvthis organization. For this question, assume each site is running at most one process that will try to gain access to @ the region of mutual exclusion. !3 gPlease generalize Raymonds token-based algorithm to implement mutual exclusion in this network. State lany initial conditions that must be met, or any necessary initializations, for your algorithm to work. When jyou write your algorithm, please use a format such as we did in class, in which each step is numbered and @Gthe reader can simply follow the steps. Working an example would help! !0 rPlease show that your algorithm correctly satisfies the three requirements for a solution to the critical section @Uproblem: mutual exclusion, progress (no deadlock), and bounded wait (no starvation). !1 lRaymonds algorithm solves a special case of this problem (where the graph is a tree structure). Assume now gyou imposed a tree structure upon this topology and used Raymonds algorithm to implement mutual excluision for comparison purposes. How does the average number of messages required for a site to acquire the @Dtoken using your algorithm compare to that of Raymonds algorithm? 2̵ ( 30 points ) Let  n  processes share  m  resource units, which can be acquired and released only one at a time. The p(̴tmaximum number of resource units that any single process will need will always be no more than  m , and the maximum number of resource units that all  n  processes will need is less than  m  +  n . Prove that deadlock cannot @occur under these conditions. HHˆ;6HHˆ66 lH$ @5!:H$ 99l H$ @6!H$ 8Wl< Final ExamECS 251 Winter 2001Page  1  HUV @7!8HHUV GGl}? @@<? GW8e }?H @;=?H GW9e- }H @<H GW:e }? @K?? HW;e }?H @>@?H HW<e-- }H @?;H HW=e }? @NJ? IW>e }?H =x1C?H FW-e¢ }H =zBOH FW.e d=~EEd=DdFF l d=Dd4~uE~ytoje`[vCFILORUX[^adgjmpsy| %).1OLA>; HUV @8!HUV :Wl@Last modified at 11:14 am on Tuesday, March 13, 2001 HHˆ@9!:HHˆII l HHˆ@:!HHˆHW` }?H @AK?H IW?e° }H @J>H IW@e }? @QM? JWAe }?H @LN?H JWBe® }H @MAH JWCe }? @CP? KWDe }?H @OQ?H KWEe© }H @PLH KWFe }~H AADbc~H F.WGe }HACDefH F/WHe }HAEDhiH F0WIe }HAGDklH F1WJe }HAIDnoH F2WKe }HAKDqrH F3WLe } HAMDtu H F4WMe }H CDxZH F5GNeN }H CDYCH F5GOe }H CDd\H F9GPe C:Emphasis }H CD[]H F9GQeEM }H CD\^H F9GReN }H DD]_H F9GSeN }H DD^vH F9GTe }H DDiaH FLGUe C:Computer }H DD`bH FLGVeEM }H D DacH FLGWeN }H D DbdH FLGXeN }H D Dc[H FLGYe }H(DDnfH( FMGZe P:Romani }H(DDegH((FM[eLI e Parent = OL Ae Depth = 0 }H(DDfhH( FMG\eN }H(DDgiH( FMG]eN }H(DDh`H( FMG^e }H(DDskH( FNG_eP:Roman }H(DDjlH((FN`eLI e Parent = OL Ae Depth = 0 }H(DDkmH( FNGaeN }H(DDlnH( FNGbeN }H(D!DmeH( FNGce }H D#DxpH FOGdeP:Line }H D%DoqH FOGeeP }H D'DprH FOGfeN }H D)DqsH FOGgeN }H D+DrjH FOGhe }H(D-D}uH( FPGie P:Lettereda }H(D/DtvH((FPjeLI e Parent = OL Ae Depth = 0 }H(D1DuwH( FPGkeN }H(D3DvxH( FPGleN }H(D5DwoH( FPGme }H(D7DzH( FQGne P:Lettered }H(D9Dy{H((FQoeLI e Parent = OL Ae Depth = 0 }H(D;Dz|H( FQGpeN }H(D=D{}H( FQGqeN }H(D?D|tH( FQGre }HDADHFRgs% P:CodeComEment }HDCD~H FRGteP }HDEDH FRGueN }HDGDH FRGveN }HDIDyH FRGwe }H DK H SGxeP:CodeC }H DMH SGyeP }H DOH SGzeN }H DQH SG{eN }H DSH SG|e }H DU H TG}e P:CodeASM }H DW H TG~eP }H DY H TGeN }H D[ H TGeN }H D] H TGe }H D_H UGe P:BodyIndent }H Da H UGeP }H DcH UGeN }H DeH UGeN }H DgH UGe }H(DiBH( VGe P:Answer1 }H(DkH((VeLI  e Parent = UL Ae Depth = 0 }H(DmH( VG eN }H(DoH( VG eN }H(Dq H( VG e dD dDdy y| %).1OLA>;dDdE l}DEDDFWg% CSS Export E Encoding }HEDH FWGe }HEDXH FWGe }DEDWDFXg% Export EnEcoding }HEDH FXGe }HEDH FXGe dLeftd!Rightd ReferenceddHTMLdDHTMLd HeadingsdHTML$@@ VMapping Table Title. @@ VBody. f@ V Answer1ItalicAnswer: . f@ VBody. @@ VFooter. f@T V TableTitleT:Table : . f@ V BodySpaced. f@ V Bulleted\t. f@ V...Date. mf@ Vl. DateProject. @@ VHeader Double Line. f@  $.6.Z.~..CodeC. f@T VHeading1Body. $f@ V Answer. f@ V NumberedSpaced. f@ VBody. @@ VHeader Double Line. f@ V CellFooting. f@ V CellHeading. f@ V CellBody. @@ VMapping Table Cell. f@ V.Reading. @@1Mapping Table Cell.  f@PVTitleBody. @@ 1Mapping Table Cell. @@ VMapping Table Cell. f@$V.Line Single Line.  f@PVTitleBody. f@ VCellBody. f@ V CellHeading. f@ V Footnote. f@T VHeading2Body. f@T V HeadingRunInBody. f@ V Indented. f@ V TableFootnote. @@VMapping Table Cell. f@NE V Numbered1 N:.Numbered. L̀Lf@N V Numbered N:.< =1>. $f@L V$. Lettereda L:.. f@T V TableTitleT:Table : . f@NE V Numbered1 N:.Numbered. $f@L V$. LetteredL:..  $f@L V$. Lettereda L:.. $f@L V$. LetteredL:.. L̀Lf@N V Numbered N:.< =1>. 6$f@R V6. Romani R:.. 6$f@R V6. RomanR:.. f@ V BodyIndent. f@  $.6.Z.u..CodeASM. Hf@ VH.. CodeComment.  V VVEmphasis V 1 V ڝVVVEquationVariables 1  BoldItalic VItalic V ڝV VV V1 V VBoldR Symbol  Computer VZZThinMediumDoubleThick@ Very Thin HHHHHFormat A HHHHHFormat BH Mapping TableH Mapping Tableh6ò5HHHHH$WDHH+4?HHH68?HH :C?HHHTDB?HH*0<@HHH@h h h !"h #$%&'Eh ()*+,Qh -./01]h 23456ih( 789:;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 "V>#?#@#A#B#» %FC$D$E$ $&FF%G%H%6%'FI&J&K& &(FL'M'N'')FO(P(Q(((*FR)S)T)D()XFU*V*W*Vd ,FX+Y++Z+f +-F[,\,,],r ,.F^-_--`-~ -/Fa.b.R.c..0Fd/e/S/f//1Fg0h0T0i002Fj1k1U1l113Fm2n2V2o224Fp3q3W3r3 3Fs4t4X4u4h 9Fv5w5x5Y5Z5,d 7y6z6{6< 68|7}7~7H7888h L5F[9\9]9^9_9hd ;::::x :C ;";#;$; =  <<<<> ====? >>>K >@ ???W? @@@ GBB B ;%C&C'C(Cd E)D,D-D DF.E/E0E EK1FBFCF HB;GH?H@H JHAIJIKI KILJMJNJ FJOKPKQKh M9F`LaLbLcLdLh(NLFeMfMgMhMiMh(OMFjNkNlNmNnNh PNFoOpOqOrOsOh(QOFtPuPvPwPxPh(RPFyQzQ{Q|Q}QhSQF~RRRRRh TRSSSSSh UST T T T Th VT UUUUUh(#UVVVVVXFWWW*WFXXXComment @D @<@@d BlackT!WhiteddARedddGreendd BluedCyandMagentad YellowHeader/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 FrameRomanM.Helvetica.BIHelvetica-BoldOblique FrameRoman M.Times.I Times-Italic FrameRoman FrameRoman FrameRomanbCourier0 HelveticaQSymbolUTimes#Regular$Roman MediumBoldRegular ObliqueItalic !<riFw?ܨ7MUw kPF/WY]1+\Dg Z 7]Gq se A\Gty'Qa8V]l|psH]~ɳaӏ>QK~bwet% $AEa2UŴR ɆG)