You are on page 1of 1

CS60002: Distributed System Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur Midsem Examination, Spring

2005 Total Marks: 40 Time: 2 Hours

Answer ALL Questions. Answers should be brief and to the point. Marks may be deducted for unnecessarily long and/or complicated answers. 1. (a) State the advantages and disadvantages of using a vector clock over Lamports logical clock. (2) (b) Define an orphan message. (2) (c) In the course of synchronizing the clock of a machine, it is found that the clock is running 5 minutes slow. What possible actions can be taken to rectify this? (2) (d) Consider a system using vector clocks where the vector clock modification rule is changed slightly a process i increments its own component of the clock by xi > 0 for each event at i. The xis may be different for different i. Would this implementation of a vector clock still satisfy the conditions satisfied by a vector clock as you know it? Justify your answer clearly. (4) 2. (a) A consistent, but not strongly consistent, global state is of no use as it allows for lost messages do you think this statement is correct? Justify briefly and clearly. (3) (b) Consider a system running Chandy-Lamports global state collection algorithm. Any node can initiate global state collection at any time. Moreover, a node can initiate another global state collection while still waiting for a previous initiation by itself to finish. How will you modify the basic algorithm for one initiator to handle such scenarios? (2) (c) Consider a unidirectional ring of n nodes with reliable links. The system is asynchronous and nodes have unique ids. Design a leader election protocol that runs in O(nlgn) message complexity. (5) 3. (a) Define response time and synchronization delay of a mutual exclusion algorithm. (2) (b) Suppose that Suzuki-Kasamis token passing algorithm is to be run for a long time on an undirected network that is connected but not completely connected (and hence, direct broadcasts and direct communication between all pairs of nodes cannot be done). Modify the algorithm suitably so that it runs on such a network. What is the worst case no. of messages per CS execution and synchronization delay of your algorithm? (5) (c) Consider Ricart-Agarawalas algorithm being run on a synchronous system with maximum message delay T for any link. Processing time at each node is negligible. Is it possible to improve the message complexity (no. of messages per CS execution) of the algorithm by modifying it in some way? Justify your answer clearly. (3) 4. (a) Consider a system with a clock that runs slow with a drift rate of 10-5. Cristians algorithm is used to synchronize the clock from a time server every 15 minutes. To estimate the delay in getting the time, a simple algorithm is used the system just measures the round trip delay and divides it by 2. The maximum delay of the link between the system and the time server is 2 milliseconds (one way). The processing time at the client after receiving the time from the server is 1 millisecond. Assume that the time servers clock has zero drift. What is the maximum possible skew between the two clocks just before and just after a synchronization? (5) (b) Consider an asynchronous system with reliable links and a given node r. Suppose that a DFS spanning tree rooted at r has already been built. Now a new node joins the system with edges to some of the existing nodes. Suggest a way to add the new node to the DFS tree already built without completely restarting the DFS from r in all cases (in some case you may have to). You may modify the DFS spanning tree algorithm studied; there is no need to rewrite that algorithm completely, just clearly state the modifications. The algorithm for adding the new node must be stated completely. What is the worst case message complexity for adding the new node to the DFS spanning tree? (5)

You might also like