Is a message based communication because the

This preview shows page 36 - 41 out of 41 pages.

! Is a message-based communication because the communicating processes are executing on separate systems. ! The message are well structured and are thus no longer just packets of data. 72 Remote Procedure Calls (cont’d) ! The RPC takes place by providing a stub on the client side . " Stub: client-side proxy for the actual procedure on the server. " A separate stub exists for each separate remote procedure. ! RPC operations: 1. When the client invokes a remote procedure, the PRC system calls the appropriate stub, passing it the required parameters. 2. The stub locates the port on the server and marshals the parameters , and then transmits a message to the server. 3. Server has a similar stub that receives this message and invokes the procedure. 4. If necessary, return values are passed back to the client using the same technique.
Image of page 36

Subscribe to view the full document.

Processes 37 73 Remote Procedure Calls (cont’d) ! Parameter marshalling : " Different systems use different data representation. # Big/little-endian: use the high/low memory address to store the most signification byte. " Many RPC systems define a machine-independent representation of data. # For example, external data representation (XDR) . " Parameter marshalling involves converting the machine- dependent data into XDR before they are sent to the server. " On the server side , the XDR data are unmarshalled and converted to the machine-dependent representation for the server. 74 Remote Procedure Calls ! Problem 1 – RPCs can fail, or be executed more than once, as a result of network errors. " The operating system have to ensure that messages are acted on exactly once , rather than at most one . ! For at most once: " Each message is attached a timestamp (in the sender side) . " The server keep a large history of all the timestamps of messages it has already processed to detect repeated messages. ! For exactly once: " the server must acknowledge to the client that the RPC call was received and executed. " The client must resend each RPC call periodically until it receives the ACK for that call. " Of course, the server must implement the “at most once” protocol.
Image of page 37
Processes 38 75 Remote Procedure Calls (cont’d) ! Problem 2 – How does a client know the port numbers on the server? " Approach 1: the information may be predetermined, in the form of fixed port addresses . # The server can not change the port number of the requested service. " Approach 2: the operating system provides a matchmaker daemon on a fixed RPC port. # A client then sends a message containing the name of the RPC to the matchmaker requesting the port address of the RPC it needs to execute. # More flexible, but requires the extra overhead. 76 Remote Procedure Calls (cont’d)
Image of page 38

Subscribe to view the full document.

Processes 39 Remote Method Invocation % Remote Method Invocation (RMI) is a Java mechanism similar to RPCs % RMI allows a Java program on one machine to invoke a method on a remote object Marshalling Parameters
Image of page 39
Processes 40 79 Appendix – How to use man !
Image of page 40

Subscribe to view the full document.

Image of page 41
You've reached the end of this preview.
  • Spring '12
  • GwangS.Jung

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern