Unit-2 (B) 2
Unit-2 (B) 2
OPERATING SYSTEMS
MCS-041
Block-3
Unit-2(b)
Introduction
– The client needs a easy way to call the procedures of the server to get
some services.
languages.
– RPC is modeled on the local procedure call, but the called procedure is
client server
Call procedure request
and wait for reply Receive request and
start process execution
• The called remote procedure executes within the environment of the server
process.
– The called procedure does not have access to the calling procedure's
environment.
Features
• Familiar semantics
• Ease of use
• Efficient
• Parameters passed by values only and pointer values are not allowed.
• Speed: remote procedure calling (and return) time (i.e., overheads) can be
– This may affect real-time design and the programmer should be aware of
its impact.
Limitations
that make use of RPC must have the capability of handling errors that
• Transparency
1. The client provides the arguments and calls the client stub in the normal
way.
2. The client stub builds (marshals) a message (call request) and traps to OS
& network kernel.
4. The remote kernel receives the message and gives it to the server
dispatcher.
6. The server stub unpacks (unmarshals) the parameters and call the
corresponding server procedure.
RPC Mechanism (Summary)
7. The server procedure does the work and returns the result to the server
stub.
8. The server stub packs (marshals) it in a message (call return) and traps it to
9. The remote (receiver) kernel sends the message to the client kernel.
10. The client kernel gives the message to the client stub.
11. The client stub unpacks (unmarshals) the result and returns to client.
RPC Implementation
• Three main tasks:
– Generate procedure headings for each procedure in the service from the
interface definition (msg.h);
• Communication handling
– Socket programming
RPC Implementation
• Binding
COM/DCOM