Douglas W. Jones
Background Consider the following variant on the naive message passing model:
Part A: How many low-level messages between sender and receiver are necessary in order to implement the synchronization requirements of this protocol? Assume that the actual message being sent occupies only a few bytes and that a process ID is comparably small.
Part B: How many additional messages must you add to your answer above in order to assure reliable message delivery in the face of transmission errors.
Part C: Describe (briefly) a failure scenerio that demonstrates that reliable delivery is not sufficient to guarantee fault tolerance in a set of applications.
Note: You may rely on thread creation primitives, heap management primitives and other tools in solving this problem.
Assume that there is some kind of multicast channel is available so that a client may ask "has anyone got file x". Assume also that this is expensive and you intend to minimize its use.
Part A: Propose a structure appropriate for UNIX style directories on this system. Assume that the directory server(s) use(s) file servers to store directories. Also! What would the open() service for this system return as the representation of a file descriptor.
Part B: Give quick-and-dirty pseudocode in terms of your answers above for the user's read() operation that communicates with file servers. Emphasize how you account for the possible migration of a file between the time it is opened and the time you read it, while still allowing efficient reading.
Part C: Give quick-and-dirty pseudocode for the implementation of the open() operation in the directory server, in terms of your answers to parts A and B. Assume that all file names are global -- that is, that there is no notion of a current working directory.