Open System Services NFS Overview
procedure’s results. Once the reply message is received, the results of the procedure are extracted,
and the caller process resumes execution. Figure 5 (page 22) shows the flow of control in the RPC
model.
Figure 5 RPC Control Flow
On the server side, the server process is dormant awaiting the arrival of a call message. When
one arrives, the server process extracts the procedure’s parameters, computes the results, sends a
reply message, and then awaits the next call message.
In the RPC model, only one of the two processes is active at any given time. However, this model
is given only as an example. The RPC protocol makes no restrictions on the concurrency model
that is implemented, and other models are possible. For example, an implementation might have
asynchronous RPC calls, allowing the client process to do useful work while waiting for the reply
from the server process. Another possibility is to have the server create a task to process an incoming
request, freeing the server to receive other requests.
The RPC protocol is independent of transport protocols. That is, RPC does not place restrictions on
how a message is passed from one process to another. The protocol deals only with the specification
and interpretation of messages.
Note that the RPC protocol does not implement any kind of reliability and that the application
design must include awareness of the type of transport protocol underneath RPC. If RPC runs on
top of a reliable transport such as Transmission Control Protocol (TCP), then most of the work is
already done for it. On the other hand, if RPC runs on top of an unreliable transport such as User
Datagram Protocol (UDP), it must implement its own retransmission and time-out policy, because
the RPC layer does not provide this service.
Port Mapper Program Protocol
The port mapper program maps RPC program and version numbers to transport-specific port
numbers, thereby making dynamic binding of remote programs possible.
Dynamic binding is desirable because the range of reserved port numbers is very small and the
number of potential remote programs is very large. By running only the port mapper on a reserved
port, the port numbers of other remote programs can be ascertained by querying the port mapper.
The port mapper also aids in broadcast RPC. A given RPC program usually has different port
number bindings on different systems, so there is no way to directly broadcast to all of these
programs. The port mapper, however, does have a fixed port number. So, to broadcast to a given
program, the client actually sends its message to the port mapper located at the broadcast address.
Each port mapper that picks up the broadcast then calls the local service specified by the client.
When the port mapper gets the reply from the local service, it sends the reply back to the client.
22 NFS Protocol Description