Homework 3 for Election, Consensus Problem - Distributed Systems | CS 425, Assignments of Computer Science

Material Type: Assignment; Class: Distributed Systems; Subject: Computer Science; University: University of Illinois - Urbana-Champaign; Term: Unknown 1989;

Typology: Assignments

Pre 2010

Uploaded on 03/16/2009

koofers-user-yez-1
koofers-user-yez-1 🇺🇸

10 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Homework3(Election,ConsensusProblem,FailureDetectors,P2P)‐100Points
CS425DistributedSystems,Fall2008,Instructor:KlaraNahrstedt
Out:Tuesday,September23,DueDate:Thursday,October2
Instructions:(1)Allproblemnumbersbelowrefertothe4theditionofthetextbookbyColouris,
DollimoreandKindberg.(2)Please,handinhardcopysolutionsthataretyped(youmayuseyour
favoritewordprocessor).Wewillnotaccepthandwrittensolutions.Figuresandequations(ifany)may
bedrawnbyhand.(3)Please,starteachproblemonafreshsheetandtypeyournameatthetopof
eachsheet.(4)Homeworkwillbedueatthebeginningofclassonthedayofthedeadline.
RelevantReadingforthisHomework:Sections2.3.2,10.1,10.2,12.1,12.3,12.5,
1. (30Points)Letusassume8processes,P1,P2,P3,P4,P5,P6,P7,P8.Letusassumethatprocess
P2startsanelection,whileP8isnottheleader.
a. UsingtheRingElectionalgorithm,showtheelectionandreelectionprotocolswhenthe
followinghappens:“afterP2receivestheelectionresult,P8processcrashes”.
b. UsingtheModifiedRingElectionalgorithm,showtheelectionandreelectionprotocols
whenthefollowinghappens:“afterP2receivesthelistofallprocesses/attributes,P8
crashes”.
c. UsingBullyalgorithm,showtheelectionandreelectionprotocolswhenthefollowing
happens:“afterP8waselectedasaleader,itcrashes”.
d. Showtheworstcasemessageoverheadintermsofnumberofmessagesexchanged
duringallthreeelectionalgorithmsifP8throughP4processescrashatdifferenttime
scales.
2. (7Points)LetusconsidertheChandyandLamport’ssnapshotalgorithm(Figure11.10).Canyou
changethisalgorithmandachieveaglobalsnapshotwith100%accuracy?IfYES,explainhow;if
NO,explainwhynot.
3. (8Points)LetusconsideranasynchronoussystemoftwodistributedprocessesP1,P2.Letus
considerthattheinitialconfigurationofthesystemisC0,andtwoscheduless1={(p1,m1)},s2
={(p1,m2),(p2,m3)}areconsidered.SupposefromC0thescheduless1ands2leadto
configurationsC1andC2,respectively.Proveordisproveifthesescheduless1ands2are
commutative,i.e.,ifs2isappliedtoC1ands1appliedtoC2willleadtothesameconfiguration
C3.
4. (20Points)(Problem2.14fromtheTextbook)Considertwocommunicationservicesforusein
asynchronousdistributedsystems.InserviceA,messagesmaybelost,duplicatedordelayed
andchecksumsapplyonlytoheaders,InserviceB,messagesmaybelost,delayed,ordelivered
pf2

Partial preview of the text

Download Homework 3 for Election, Consensus Problem - Distributed Systems | CS 425 and more Assignments Computer Science in PDF only on Docsity!

Homework 3 (Election, Consensus Problem, Failure Detectors, P2P) ‐ 100 Points

CS425 Distributed Systems, Fall 2008, Instructor: Klara Nahrstedt Out: Tuesday, September 23, Due Date : Thursday, October 2 Instructions: (1) All problem numbers below refer to the 4 th^ edition of the textbook by Colouris, Dollimore and Kindberg. (2) Please, hand in hardcopy solutions that are typed (you may use your favorite word processor). We will not accept handwritten solutions. Figures and equations (if any) may be drawn by hand. (3) Please, start each problem on a fresh sheet and type your name at the top of each sheet. (4) Homework will be due at the beginning of class on the day of the deadline. Relevant Reading for this Homework: Sections 2.3.2, 10.1, 10.2, 12.1, 12.3, 12.5,

  1. (30 Points) Let us assume 8 processes, P1, P2, P3, P4, P5, P6, P7, P8. Let us assume that process P2 starts an election, while P8 is not the leader. a. Using the Ring Election algorithm, show the election and reelection protocols when the following happens: “after P2 receives the election result, P8 process crashes”. b. Using the Modified Ring Election algorithm, show the election and reelection protocols when the following happens: “after P2 receives the list of all processes/attributes, P crashes”. c. Using Bully algorithm, show the election and reelection protocols when the following happens: “after P8 was elected as a leader, it crashes”. d. Show the worst case message overhead in terms of number of messages exchanged during all three election algorithms if P8 through P4 processes crash at different time scales.
  2. (7 Points) Let us consider the Chandy and Lamport’s snapshot algorithm (Figure 11.10). Can you change this algorithm and achieve a global snapshot with 100% accuracy? If YES, explain how; if NO, explain why not.
  3. (8 Points) Let us consider an asynchronous system of two distributed processes P1, P2. Let us consider that the initial configuration of the system is C0 , and two schedules s1 = {(p1, m1)}, s = {(p1,m2), (p2,m3)} are considered. Suppose from C0 the schedules s1 and s2 lead to configurations C1 and C2 , respectively. Prove or disprove if these schedules s1 and s2 are commutative, i.e., if s2 is applied to C1 and s1 applied to C2 will lead to the same configuration C.
  4. (20 Points) (Problem 2.14 from the Textbook) Consider two communication services for use in asynchronous distributed systems. In service A, messages may be lost, duplicated or delayed and checksums apply only to headers, In service B, messages may be lost, delayed, or delivered

too fast for the recipient to handle them, but those that are delivered arrive with the correct contents. a. Describe the classes of failure exhibited by each service b. Classify their failures according to their effect on the properties of validity and integrity (Note: Use the definitions of validity and integrity as defined in the Lecture on Multicast, just replace ‘multicast’ with ‘send’.). c. Can service B be described as a reliable communication service?

  1. (15 Points)(Problem 2.16 from the Textbook) Suppose that a basic disk read can randomly read values that are different from those written. a. State the type of failure exhibited by a basic disk read. b. Suggest how this failure may be masked in order to produce a different benign form of failure. c. Suggest how to mask the benign failure all together.
  2. (20 Points) Early file‐sharing applications such as Napster were restricted in their scalability by the need to maintain a central index of resources and the hosts that hold them. a. Explain how Gnutella, FastTrack and Chord correct the scalability problem. b. The problem of maintaining indexes of available resources is application‐dependent. Consider suitability of each of the protocols in Exercise 6a for (1) music and media file sharing, (2) long terms storage of archived material such as journal or newspaper content, (3) network storage of general‐purpose read‐write files (e.g., word documents).