Remote procedure call (RPC) in operating System

Remote procedure call comes into play when we want processes that are residing in different system connected over a network wants to communicate with each other so think of a scenario where one that is residing in a system wants to communicate to another process which is residing physically in another system and these two system are connected via a network so in this kind of a scenario we need to use remote procedure calls.

What is Remote procedure call?

Mainly in RPC there is two entity server and client here suppose client wants do one program so client can’t do that program itself client requests to server to do that program and gives output of that program to the client so this process calls Remote Procedure call.

So let’s see the process of remote procedure call with the help of one diagram here I present you one diagram.

Remote procedure call in operating System

In this diagram there is one client and one server over there first client wants to do some program with the help of server so client do remote call procedure and send request to server.

Server works on that program and give the result back to the client so this entire process calls remote procedure call. Hope so you understood.


How RPC works?

RPC architecture has mainly five components are there:

  1. Client
  2. Client Stub
  3. RPC Runtime
  4. Server Stub
  5. Server

Remote procedure call in operating System

Here I explain you this full process step wise

Step 1) client procedure calls client stub in normal way.

Step 2) client stub build a message and calls operating system.

Step 3) client’s operating system sends message to remote operating system .

Step 4) Remote operating system gives that message to server stub.

Step 5) server stub unpacks that message and call the server.

Step 6) server does their work and return the result to the stub.

Step 7) server stub packs the result in message and call the local operating system.

Step 8) server’s operating system send’s that message to client’s operating system.

Step 9) client’s operating system gives that message to the client’s stub.

Step 10) client stub unpacks that result message and return’s to the client.


Characteristics of RPC

·         The called procedure is in another process which is located in another machine

·         The process do not share address space.

·         Passing of parameter by references and passing pointers value are not allowed.

·         Parameters are passed by values.

·         The called remote procedure executes within the environment of the server process.


Special features of RPC

      Simple call syntax

➤     Familiar semantics

      Well define interface

      Ease of use



Design issue with RPC

Exception handling

·         Necessary because of possibility of network and nodes failure.

·         ➤RPC uses return value to indicate errors.


·         Syntactic – achievable exactly the same syntax as a local procedure call.

·         ➤Semantic – impossible because of RPC limitation failure.

Delivery guarantees

·         Retry request message – whether to retransmit the request message until either a reply or a server is assumed to have fail.

·         Duplicate filtering – when transmission are used whether to filter out duplicates at the server.

·         Retransmission of reply – whether to keep a history of a reply messages to enable lost replies to be transmitted without re executing the server operations.  



Post a comment