next up previous
Next: Implementation Up: Xinu Low-Level Message Passing Previous: Xinu Low-Level Message Passing

Semantics

Ports are input ports limited to one per process. Thus the process id of the receiver of the port is used as an identifier to this port.

The information in a message is considered as data to be interpreted by the recipient. Thus remote assignment instead of RPC is supported.

The send operation takes as arguments the message and process id and delivers the message to the specified process. The operation is asynchronous, thus a sender does not wait till the message is received.

The queue associated with the port holds at most one message. Moreover, a message size is restricted to 1 word. Thus memory allocated to buffer and queue messages is kept under control.

Two kinds of receives are provided. The first called receive is a synchronous receive. It blocks the receiver till a message arrives. The second, called recvclr is non-blocking. If the process has a message when it calls recvclr, the call returns the message. Otherwise it returns the value OK to the caller without delaying to wait for a message to arrive. Thus recvclr allows a process to poll the system for message arrival. It is useful when the process does not know whether a message will arrive or not and does not want to block forever in case a message does not arrive. An example of its use: if software interrupts are not allowed, a process may use recvclr to check, every now and then, if the user has hit the ``attention'' key.

Communicating processes reside within the same computer, so the message passing is trivially reliable and ordered. A reply operation is not supported. Since a process is limited to one input port, the issue of selective receipt does not arise.


next up previous
Next: Implementation Up: Xinu Low-Level Message Passing Previous: Xinu Low-Level Message Passing
Prasun Dewan 2006-02-02