


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Assignment; Class: Distributed Systems; Subject: Computer Science; University: University of Illinois - Urbana-Champaign; Term: Spring 2010;
Typology: Assignments
1 / 4
This page cannot be seen from the preview
Don't miss anything!



CS 425 / ECE 428 / CSE 424: Distributed Systems Spring 2010 Homework 2 - Issued 11 th^ February 2010, due on 4 th^ March 2010 1 100 points
Students are encouraged to collaborate and exchange ideas on homework problems; however, you must submit your own solutions
All book problems are assigned from the 4th edition of CDK. 3rd edition users please check with your classmates for corresponding problem numbers.^2
Problem 1: Ordered Multicast (20 points). Consider figure1. Using sequence numbers (for FIFO Ordering multicast) or vector clocks (for Causal Ordering multicast), mark states at the point of each multicast send and each multicast receipt. Also mark multicast receipts that are buffered, along with the points at which they are delivered to the application
a.(10 points) FIFO Ordering multicast algorithm as discussed in class. b.(10 points) Causally Ordered multicast algorithm as discussed in class
Figure 1: Ordered multicast problem
Problem 2: Ordered Multicast (15 points) (a)(8 points) Let us assume FIFO-ordered multicast per group, i.e., if a correct process issues multicast(g,m) and then multicast (g, m’), then every correct process that delivers m’ will have already delivered m. Show that the FIFOordered multicast algorithm per group does not work for overlapping groups, by considering two messages sent from the same source to two overlapping groups, and considering a process in the intersection of those groups. Adapt the protocol to work for this case and write down the algorithm. Hint: processes should include with their messages the latest sequence numbers of messages sent to all groups.
(b)(7 points) Let us assume FIFO-ordered multicast across groups, i.e., (1) FIFO-ordered multicast per group, and (2) if a correct process issues multicast(g,m) and then multicast(g’m’), then every correct process in the intersection of groups g and g’ that delivers m’ will have already delivered
(^2) Chapter 11 in 4th edition corresponds mostly to Chapter 10 of 3rd edition
Figure 2: Raymond Algorithm Initial State from which you start
m. Does the FIFO-ordered multicast algorithm across groups work for overlapping groups, when considering two messages sent from the same source to two overlapping groups and considering a process in the intersection of those groups? Explain if yes or no. In case it does not work, adapt the protocol to work for this case and write down the algorithm.
Problem 3: Distributed Mutual Exclusion (15 points) Figure 2 shows a Raymond’s Ring for management of mutual exclusion. Node 1 is holding the token (is in CS). Current queue entries are shown under each node.
a. Suppose nodes 9, 7, and 5 (in that order) request to enter the same CS while node 1 is still holding the token. List contents of each nodes queue, after these requests are processed by all relevant nodes.
b. Assuming no other requests are received for entry to the same CS, other than those in part (a), show the contents of each nodes queue when the token gets to node 6
c. Assuming no other requests are received for entry to the same CS, other than those in part (a), show the contents of each nodes queue when the token gets to node 9.
d. Consider a request from node 10 while node 9 is holding the token, show the contents of each nodes queue after this request is processed by all relevant nodes.
Problem 4: Distributed Mutual Exclusion (10 points) Consider a group of distributed systems, P1, P2, P3, and P4 that share an object. They use the Ricart-Agrawala algorithm for management of mutual exclusion. P1 is currently in the critical section and there is no other node in the ’wanted’ state. Now consider requests from P4, P2 and P3 (in that order) to enter the same CS and assume that these request messages from P4, P2, P3 arrive at other peers in the order of requests.
a.(5 Points) Show the state (as required by the algorithm, i.e. held, wanted, etc.) and queue entries at each processor.
algorithm is used for election of a new coordinator and the election attribute is the (maximum of) processor numbers, show the set of all messages communicated through each communication channel Pij where i, j ∈ 1... 5 for this election. Show the type of each message as election, response, or coordinator.
Problem 8: Election Algorithms (10 points) For a synchronous system, design an election algo- rithm using a mutual exclusion algorithm, without knowing how the mutual exclusion algorithm is implemented.