top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What is Remote Procedure Call ?

0 votes
219 views
What is Remote Procedure Call ?
posted Aug 28, 2014 by Neelam

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

Remote Procedure Call (RPC) is a protocol that one program can use to request a service from a program located in another computer in a network without having to understand network details. (A procedure call is also sometimes known as a function call or a subroutine call.) RPC uses the client/server model. The requesting program is a client and the service-providing program is the server. Like a regular or local procedure call, an RPC is a synchronous operation requiring the requesting program to be suspended until the results of the remote procedure are returned. However, the use of lightweight processes or threads that share the same address space allows multiple RPCs to be performed concurrently.

The following steps take place during an RPC:

  1. A client invokes a client stub procedure, passing parameters in the usual way. The client stub resides within the client's own address space.
  2. The client stub marshalls the parameters into a message. Marshalling includes converting the representation of the parameters into a standard format, and copying each parameter into the message.
  3. The client stub passes the message to the transport layer, which sends it to the remote server machine.
  4. On the server, the transport layer passes the message to a server stub, which demarshalls the parameters and calls the desired server routine using the regular procedure call mechanism.
  5. When the server procedure completes, it returns to the server stub (e.g., via a normal procedure call return), which marshalls the return values into a message. The server stub then hands the message to the transport layer.
  6. The transport layer sends the result message back to the client transport layer, which hands the message back to the client stub.
  7. The client stub demarshalls the return parameters and execution returns to the caller.
answer Aug 28, 2014 by Amit Kumar Pandey
Similar Questions
+3 votes

I noticed that there are two prototypes for open system call in linux,

int open(const char *pathname, int flags);
int open(const char *pathname, int flags, mode_t mode);

I would like to know how the C compiler can differentiate b/w both calls, given C compiler doesn't support function overloading?

+1 vote

What happens after you write “a.out” and press enter. What are the functionality performed by the OS after executable file is created of your code.

...