Check out the new USENIX Web site. next up previous
Next: Future work Up: Related work Previous: Queued I/O completion signals

   
Port sets in Mach

The Mach operating system[24] depends on message-based communication, using ``ports'' to represent message end-points. Ports are protected with capability-like ``send rights'' and ``receive rights.'' All system operations are performed using messages; for example, virtual memory faults are converted into messages sent to the backing-store port of the associated memory object. Other communication models, such as TCP byte streams, are constructed on top of this message-passing layer.

Each port has a queue of pending messages. A thread may use the msg_receive() system call to retrieve a message from the queue of a single port, or wait for a message to arrive if the queue is empty.

A thread with receive rights for many ports may create a ``port set'', a first-class object containing an arbitrary subset of these receive rights[7]. The thread may then invoke msg_receive() on that port set (rather than on the underlying ports), receiving messages from all of the contained ports in FIFO order. Each message is marked with the identity of the original receiving port, allowing the thread to demultiplex the messages. The port set approach scales efficiently: the time required to retrieve a message from a port set should be independent of the number of ports in that set.

Port sets are appropriate for a model in which all communication is done with messages, and in which the system provides the necessary facilities to manage message ports (not necessarily a simple problem[7]). Introducing port sets into UNIX, where most communication follows a byte-stream model, might require major changes to applications and existing components.


next up previous
Next: Future work Up: Related work Previous: Queued I/O completion signals
Gaurav Banga
1999-04-26