What is remote procedure call (RPC) in operating system


In a remote procedure call, the client request some processing to the server computer. The server computer is placed in a remote location. The client sends parameters with the request it sends to the server. The parameters are passed either by value, by reference, or linked in the cloud location.

Diagram of RPC (Remote Procedure Call )
Diagram of RPC

5 components are involved in sending a message from client to server:-

  • Client
  • Client stub
  • RPC protocol
  • Server stub
  • Server

The client first sends the message to the client stub. The client stub packs the message and sends it to the RPC protocol of the client. RPC protocol sends a packed message to the RPC protocol of the server. The server stub unpacks the message and sends it to the server. The server processes the message via several functions or sub-routines and sends it back to the server stub. The server stub packs the message and sends it to the server RPC protocol. Server RPC protocol then sends the packed message to the client RPC protocol. Then the message is received by the client stub. The client stub unpacks the message and finally sends it to the client.

The packing of the message by client stub and server stub is also known as marshalling and unpacking of message by client stub and server stub is known as unmarshalling.

The message is passed through the transport layer from one RPC protocol to another RPC protocol.

The message that is passed from the client can include:-

  • Message identifier
  • Message type
  • Client identifier
  • Remote procedure call (Prog. No., Version No, Proc No.)
  • Arguments

The reply message sent from the server can include:-

  • Message identifier
  • Message type
  • Reply status
  • Result or Error

Features of remote procedure call (RPC)

  • RPC hides the complexity of the message passing process from the user
  • RPC only use specific layers of the OSI model like the transport layer
  • Clients can communicate with the server by using higher-level languages
  • RPC works well with both local environment and remote environment
  • The program of RPC is written in simple code and is easily understood by the programmer
  • The operating system can handle process and threads involved in RPC easily
  • The operating system hides the abstractions of RPC from the user


Leave a Comment

Your email address will not be published. Required fields are marked *