CS 6/73201 "Advanced Operating Systems" HOMEWORK #2 Due in class on 3/23/2010 1. Auerbach's algorithm is a modification of the classical depth-first traversal algorithm. The major change is that two new types of messages are introduced: and and the update rules for "used" array are modified. As a consequence of that it becomes necessary to explicitly require that only the initiator decides (notice that in Tarry's and Classical traversal algorithm it is done implicitly -- the only process that can possibly decide is the initiator). Explain why it is necessary and give an example where the Auerbach's algorithm _without_ this particular modification fails. 2. In Auerbach's algorithm. When a process P receives message it first sends message to every neighbor, waits for from every neighbor and then proceeds to forward . Would the algorithm be correct if a process does not wait for s to come back but forwards immediately after messages are sent? If yes, explain why; if no, explain why and provide a counter-example. 3. If each process uses a different value "d" (increment) in Lamport's logical clocks, do the clocks still preserve the causality relationship? That is, for two events A and B: if A -> B then C(A) < C(B) Explain your answer. 4. Consider the system of three processes (A,B,C) and the following computation: [B sends message M1 to C], [B sends M2 to A], [A receives M2], [A sends M3 to B], [A sends M4 to C], [C receives M4], [C receives M1], [C sends M5 to B], [B receives M5], [B receives M3] Apply SES causal message delivery algorithm. Draw a timing diagram of message receipts and deliveries according to SES. 5. Notice that the size of the matrix clock is quadratic with respect to the system size. Propose a technique similar to that of Singhal-Kshemkalyani to decrease the information transmitted and stored if the clocks do not change frequently. 6. Modify Chandy-Lamport's global state recording algorithm such that it always records transitless global state. Explain how your modification operates. 7. Apply Shavit-Francez termination algorithm to the tree based A B \ / C | D / \ E F wave algorithm. Explain how it can run, show a possible computation of the tree algorithm and Shavit-Francez termination detection on top of it. 8. Show that in Lamport's mutual exclusion algorithm, if process Pi is in the CS, then Pi's request may not be at the top of the request queue of another process Pj. Is it still true when there are no messages in transit? 9. Show that in the Ricart-Agrawala's algorithm, the critical section is accessed according to the increasing order of timestamps (discuss why it is impossible for the CS to be granted out of timestamp order). Give an example (draw diagrams) where the CS is granted out of timestamp order in Maekawa's algorithm 10. Discuss why FAILED message is needed in Maekawa's algorithm. Give an example (draw diagrams) where the algorithm performs incorrectly if FAILED message is not used. 11. Suzuki-Kasami DMX algorithm requires that the token carries an array of the number satisfied requests (LN) for each process. Since the unsatisfied requests are stored in a queue (Q) held by the token would it be possible to determine which requests are satisfied and dispense with the array LN altogether? Explain your answer. 12. Consider the network structure below. The processes are executing Raymond's token circulation DMX algorithm. Process A initially holds the token and processes C,D and E are in CS contention. Is it possible that requesting processes enter critical section in the following order D,C,E? Explain your answer. Draw a sequence of diagrams outlining the possible computation. oA / \ oB oC / \ oD oE