Mid Term Exam

  1. Vector Clocks can be used to synchronize a set of communicating processes (e.g. for Group Communications in ISIS). However, it is assumed that the set of communicating processes is known and fixed. Consider the case where two sets of communicating processes are using vector clocks to synchronize their events unaware of each other's existence. Assume that at some time, it is necessary for the two groups to join into one and synchronize all future events. Describe an extension to vector clocks which will allow them to be used for this newly formed supergroup.

  2. A distributed system may have multiple, independent critical regions. Imagine that process 0 wants to enter critical region A and process 1 wants to enter critical region B. Can Ricart and Agrawala's algorithm lead to deadlocks? explain you answer.

  3. In this problem you are to compare reading a file using a single-threaded file server and a multithreaded server. It takes 15 msec to get a request for work, dispatch it, and do the rest of the necessary processing, assuming that the data needed are in the block cache. If a disk operation is needed, as is the case one-third of the time, an additional 75 msec is required, during which time the thread sleeps. How many requests/sec can the server handle if it is single threaded? If it is multithreaded?

  4. In class the receiver initiated processor allocation algorithms assumed 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.

  5. When a computation runs for a long time, it is sometimes wise to make checkpoints periodically, that is, to save the state of the process on stable storage in case it crashes. In that way, the process can be restarted from the checkpoint instead of from the beginning. Devise a way of checkpointing a computation that consists of multiple processes running in parallel.

  6. In class we discussed a solution to problem 25 in Chapter 4 (p 244 of text) in which the critical path was placed on one processor. Is the placing of the processes from the critical path on a single processor optimal (for that set of processes)? Give an algorithm which finds the critical path in a static schedule. (extra credit: give the algorithmic complexity of this algorithm).

  7. In the approach to cache consistency using leases, is it really essential that the clocks are synchronized? If not, what is required.