Second Semester 2006-2007 Comprehensive Examination (EC-2 Regular)
Course No. : CS ZG623 Course Title : ADVANCED OPERATING SYSTEMS Nature of Exam : Open Book Weightage : 60% Duration : 3 Hours Date of Exam : 01/04/2007 (AN) Note: 1. Please follow all the Instructions to Candidates given on the cover page of the answer book. 2. All parts of a question should be answered consecutively. Each answer should start from a fresh page. 3. Mobile phones and computers of any kind should not be brought inside the examination hall. 4. Use of any unfair means will result in severe disciplinary action.
Q.1 In Lamports distributed mutual exclusion algorithm, if a site S i is executing the critical region, then it may so happen that S i s request is not at the top of the request queue at another site S j . Justify. Why is this false when there are no messages in transit? Explain by giving suitable example. [8]
Q.2 Assume that three processes are communicating in a distributed system as described below. You are asked to assign timestamps to these events using logical clocks. Assume that the sending and receiving of messages are the only events to be counted, and that event counts are always incremented by the minimum amount.
Suppose that the initial count values, before any sends or receives, are: P1=13, P2=5, P3=7. The following messages are then sent and received:
P1 sends M1 to P2. Before receiving M1, P2 sends M2 to P3. After receiving M1, P2 sends M3 to P3. P3 receives M3 followed by M2. After receiving M2, P3 sends M4 to P1. P1 receives M4.
a) Give the timestamps for each of the four messages using Lamports clocks. b) Give the timestamps for each message if Fidge-Mattern vector clocks are to be used.
(Note: If you strongly feel that Logical Clock values (both above) cannot be assigned, then argue your point) [8]
Q.3 Ricart-Agrawalas distributed mutual exclusion algorithm has the problem that if a process has crashed and does not reply to a request from another process to enter into a critical region, the lack of response will be interpreted as denial of permission. One way you can handle this is, all requests be answered immediately, to make it easy to detect crashed processes. Are there any circumstances where even this approach is insufficient? Discuss. [8]
Q.4 Figure 1 shows three processes with their checkpoints taken at individual processes asynchronously. Using the Asynchronous Check pointing and Recovery algorithm, find out the consistent set of checkpoints from where rollback should start. Clearly mention all the iterations required to achieve this. As shown in the figure, process Z is failing at the point as indicated. [8]
Page 1 of 2 PTO No. of Pages = 2 No. of Questions = 8
CS ZG623 (EC-2 REGULAR) SECOND SEMESTER 2006-2007 PAGE 2
(Figure 1)
Q.5 Use Birman-Schiper-Stephenson causal ordering of messages protocol to find out whether the message sends and receives are causally ordered in the distributed system given below. You are free to do any modifications to the original algorithm if you feel that it is indispensable. [8]
Send (M) P1 M1 P2 Time M3 M1 M3 M2 Space P3
Q.6 Give an example to show that Chandy-Lamport Global state recording algorithm fails if communication channels are not first-in-first-out (FIFO). [8]
Q.7 Given below are three processes P1, P2, and P3 executing concurrently. The data items (variables x, y, and z) are stored in a distributed shared sequentially consistent memory (data store). Assume that each variable is initialized to 0. All statements are indivisible. Here, an assignment corresponds to a write operation and a print statement corresponds to a simultaneous read.
Viewing the concatenated output of P1, P2, and P3 in that order, will the output 001110 be a legal output if the above concurrent execution runs on a sequential consistent memory? If yes, give the interleaving. If no, explain why not. [6]
Q.8 The selection policy for receiver-initiated load sharing algorithm is mostly a preemptive one. It normally assumes task pre-emption at the sender site. Devise an approach, which is receiver- initiated but non pre-emptive. Discuss the tradeoffs of your approach with the receiver initiated pre- emptive one. [6]
**********
x = 1 y=1 z=1 print(y,z) print(x,z) print(x,y) Process P1 Process P2 Process P3 M2