Homework 9
22C:116, Fall 2000
Due Friday Oct 27, 2000, in class
Douglas W. Jones
Background:
Consider a Demos like operating system, with the primitives:
- cap = create( box )
- returns a capability allowing a process to send messages to the designated
box of the caller.
- send( msg, cap )
- sends a message to the recipient process and box indicated by a capability,
where messages may contain any mixture of capabilities and other data.
- msg = receive( box )
- receive a message from the indicated box of the caller; if none are
present in the box, block until a message is available.
Furthermore, assume that the standard minimal system contains at least the
following servers, presented in rough sketch here:
- The process manager
- * creation box - on receipt of a message <rcap>, creates an empty
and returns a management capability via the capability rcap. New
processes have uninitialized memory and registers, and have no
capabilities in their capability lists.
- * management box - for each process in the system, the process manager
has a box that accepts service requests such as stop, start, delete,
and write. The management capability for that process addresses
this box! Delete causes the process to be destroyed. Start makes the
process a candidate for scheduling. Stop removes the process from the
control of the scheduler, and the write operations can be used to request
the process manager to store particular data in the code setment of the
process, to modify the registers of the process, or to store particular
capabilities in the C-list of the process.
- The file manager
- * creation box - on receipt of a message <rcap>, creates an empty file
and returns a capability for that file via the capability rcap.
- * file box - for each file in the file system, the file manager
has a box that accepts service requests such as delete, read and write.
Delete causes the file to be destroyed. Read and write allow the file
to be manipulated.
- The window manager
- * creation box - on receipt of a message <rcap>, creates a window
and returns a capability for that window via the capability rcap.
- * window box - for each window, the window manager
has a box that accepts service requests such as delete, start, stop, read
and write. Delete causes the window to be destroyed. Start and stop
cause the window to be exposed or hidden, read and write allow interaction
with the user through the window.
-
A Problem
What capabilities would you suggest should be included in the "standard
environment" of a process running under this system. The standard environment
should include all capabilities that every process might require in order to
interact with the system and with its environment. Of course, any particular
process may require nonstandard extenstions to this environment, but these
should not be considered here.
-
A Problem
Outline a protocol by which a user process could create a new process and
start it running a particular object file, where the new process runs in the
environment of its caller. Your protocol should be documented from the user's
perspective.
-
A Problem
The example system presented for this assignment has no access rights
associated with capabilities. Suggest the kinds of rights you might wish for
in developing systems based on this set of servers.
-
A Problem
What minimium facilties are missing from this system to allow users to develop
protocols for dealing with lost messages during a clinet-server interaction.
-
A Problem
Suppose you wanted to write a server under this system. Your server will
need to wait for any request from any client. Unfortunately, the set of
services documented here does not suffice for this. Propose a solution to
this problem. You might want to look at the select service under the UNIX
system.