Homework 10

22C:116, Spring 2002

Due Monday Apr 29, 2002, in class

Douglas W. Jones

Assume the usual general instructions!

  1. Background

    Consider the problem of modifying the example thread manager to incorporate an approximation of Demos interprocess communication for communication between threads. To start you thinking along these lines, consider (and answer) the following questions:

    Part A: What thread manager services would you eliminate from the existing code?

    Part B: What representation would you use for a Demos-style link? Does this representation require that links be stored in a link-table attached to each thread, or could links be freely intermixed with other data.

    Part C: Given your answers to the above questions, what thread manager services would you add. For each, document the calling sequence a C programmer would use.

  2. Background Suppose you wanted to build a fault-tolerant server cluster under a distributed version of Demos. This system clearly allows multiple clients and servers to communicate with each other, but some features you need for this project are missing! To answer these questions, you need no information that was not given in the notes.

    Part A: Give an example of a feature you would need in order to help dealing with lost messages and in order to help dealing with the failure of a server between the time it receives a request from a client and the time it sends a reply.

    Part B: Consider the problem of having a backup server take over once it wins the election that permits it to do this after a primary server failure. What mechanisms does the Demos MP process migration scheme include that might aid in this, and what tools are missing that your server would need in order to use these mechanisms.