CS 6378, Spring 2005

Homework 1

(Due on February 10, 2005)

1. For consistent global state recording, we saw that the condition n >= m has to be satisfied for all pair of channels. (n being the number of messages having been recorded as sent and m being the number of messages recorded as having been received). However, we also discussed that FIFO (First In First Out) channel condition also needs to be satisfied (along with n >= m) for consistency. Give an example (in terms of a space-time diagram) on why you need the FIFO condition.

2. We saw that the message ordering algorithms (such as BSS, SES, modified SES) discussed in the class are not fault tolerant, e.g., tolerate a process crash or lost messages. Though handling fault tolerance is complex, can we make these algorithms handle graceful faults? For instance, can a process P1 exit gracefully from a system without causing problems to the message ordering algorithms.

Such a graceful exit means that the process’s termination will not cause messages to be buffered indefinitely in other processes. For answering this question:  Can you explain the condition(s) that need to be satisfied for a process’s termination not to cause any indefinite buffering of messages? (Assume that this process was an active one, i.e., it communicated with other processes regularly before it decided to terminate gracefully).  Then, take the SES algorithm as a case study and explain how graceful exit of a process can be implemented in the algorithm.

3. Implementing Remote Procedure Calls (RPCs) in a distributed system require binding/registration server(s). When a server process supporting an RPC comes up, the process registers itself with the binding server specifying the name(s) of the RPC(s) it will be supporting. A client contacts the binding server with the name of RPC it wants to use. The binding server replies with the name (if needed), IP address, and port number of the required RPC server. As you can guess, the binding server can provide this sort of look-up service using a table.

Can you design a simple table (i.e., the data structure) that could be used by a binding server? This table should allow multiple RPC servers to handle the same RPC.

4. Consider the following space-time diagram of a system using the “original” SES (Schiper- Eggli-Sandoz) algorithm.

S1 M6 M1 M4 S2 M2 M5

S3 M3

S4 a) Write down the time stamps of the messages M1 to M6 (e.g., Tm1 = ). b) Write down the contents of V_M6.

5. Mention True or False against each of the following statement. a) Transit messages are those recorded at the receiver but not at the sender. b) Inconsistent messages are recorded at the receiver but not at the sender. c) For global state consistency, number of messages recorded at the sender has to be less than or equal to that recorded at the receiver. d) For global state consistency, number of messages recorded at the sender has to be greater than or equal to that recorded at the receiver.

6. Which of the following features do you need in the system to support Exactly Once semantics for Remote Procedure Calls? (Do not ask me what is Exactly Once). a) Unreliable communication (e.g., UDP) b) Reliable communication (e.g., TCP) c) Reliable communication (e.g., TCP) + a commit protocol d) Unreliable communication (e.g., UDP) + a commit protocol

7. Consider the following space-time diagram of a system using Lamport’s mutual exclusion algorithm. The arrow marks indicate critical section requests. Assume the time stamps of requests as follows: (S1, 5), (S2, 4), (S3, 7). Can any system enter into critical section at T1? Why? (Only 1 sentence allowed for the reason. More than 1 sentence, no credit will be given).

(5) S1

(4) S2

S3 (7) T1

8. If each process uses a different value for d in Eqs. 5.1, 5.2, and 5.3, will the logical clocks and vector clocks schemes satisfy the total order relation => and Eq. 5.5?

9. In the SES protocol for causal ordering of messages, when can a pair (s, t) be deleted from the vector maintained at a site?

10. Consider the causal message ordering algorithms: BSS (Birman-Schiper-Stephenson), “original” SES (Schiper-Eggli-Sandoz), and “modified” SES. What type of message time stamps do they use (vector of clock values OR vector of sequence numbers)? Why? (Proper reason is a must to get credit).

11. We saw in the class that the following is true for Cuts in a distributed system. A Cut is a consistent cut if and only if VTc[1] = VTc1[1], VTc[2] = VTc2[2],… , VTc[n] = VTcn[n]. Can you prove/explain why this is true?