5. With a neat diagram explain the steps in making an RPC
Answer:
Steps in making an RPC are as follows:
- Step 1 is the client calling the client stub. This call is a local procedure call, with the parameters pushed onto the stack in the normal way.
- Step 2 is the client stub packing the parameters into a message and making a system call to send the message. Packing the parameters is called marshalling.
- Step 3 is the operating system sending the message from the client machine to the server machine.
- Step 4 is the operating system passing the incoming packet to the server stub.
- Step 5 is the server stub calling the server procedure with the unmarshaled parameters.
The reply traces the same path in the other direction.