Background: Here is a simplified model of the DEMOS message passing primitives:
The Problem, part A: Write a simple remote procedure call stub and client using this simplified set of DEMOS message passing primitives. Assume that, initially, the caller has a link remote to the RPC server's client message queue, and that the client has set aside the incoming message queue numbered reply to hold replies. The caller's link to the server allows all access rights. Your code should use the access rights to assure that the server does not misuse any links it receives from the client. Your code should assume that the parameters and results for the RPC are all simple data and can be easily included in one message.
The Problem, part B: Write a more complex pair of RPC stubs that allows the client to pass n links to and receive m links from the server.
Assume also that each process has, available to it, a unique process id, the integer id.
The Problem: Write simplified DEMOS code for a set of fault tolerant client and server stubs. Assume that no links are among the parameters passed to and returned from the remote procedure.
As a result, there were 3 ways to implement a collection of remote procedures on DEMOS. First, each remote procedure could be encapsulated in a separate process. Second, a group of remote procedures could be encapsulated in the same process, with a server stub that waited for messages on a single incoming message queue and used the first data item in the message to decide which remote procedure to call; and third, each remote procedure in the same server process could use a separate incoming message queue.
The Problem: Give clear advice about when to use each of these approaches to supporting remote procedures. Consider the problems of data sharing between procedures, and consider the possibility that the procedures represent methods of an object, or methods of a class of objects.
The Problem: Describe how thunks can be used in the context of remote procedure calls in order to implement parameters that are passed by name or by reference.