• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Rpc
 

Rpc

on

  • 942 views

Remote Procedure Call

Remote Procedure Call

Statistics

Views

Total Views
942
Views on SlideShare
942
Embed Views
0

Actions

Likes
1
Downloads
38
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • Extended Binary Coded Decimal Interchange Code  ( EBCDIC ) American Standard Code for Information Interchange(ASCII)
  • Info implicitly available.
  • Concept of Rpc is neutral. Permits designers to build any kind of servers they desire.
  • Message is sent by server to binder make existence known. Handle – used to locate server.
  • 4- substantial number of msgs will be needed to keep all binders synchronize & up to date.

Rpc Rpc Presentation Transcript

  • Remote Procedure Call Made By: Abhishek Pachisia B.Tech-IT 090102801
  • ForewordFlaw in Client Server Model. Input/ OutputBirrell & Nelson – Simple Idea with subtle implications. Call procedures located on other machinesProblems Different address – Complications Non- identical Machines Crashing of machinesWidely Used.
  • Index Basic RPC Operation Parameter Passing Dynamic Binding
  • Basic RPC OperationSingle Machine Procedure Call Count = read(fd, buf, nbytes); cc
  • StubsClient stub Packs parameter into message. Calls : Send & Receive.Server Stub Calls : Receive & Send. Unpacks parameter from the message.Details of message passing are hidden – two libraries.
  • Steps1. The client procedure calls the client stub in the normal way.2. The client stub builds a message and traps to the kernel.3. The kernel sends the message to the remote kernel.4. The remote kernel gives the message to the server stub.5. The server stub unpacks the parameters and calls the server.6. The server does the work and returns the result to the stub.7. The server stub packs it in a message and traps to the kernel.8. The remote kernel sends the message to the clients kernel.9. The client’s kernel gives the message to the client stub.10. The stub unpacks the result and returns to the client.
  • Client-side stub Server-side stubLooks like local server Looks like local client function function to serverSame interface as local Listens on a socket for function message from client stubBundles arguments into Un-bundles arguments to message, sends to server- local variables side stub Makes a local functionWaits for reply, un- call to server bundles results Bundles result into replyReturns to kernel message to client stub
  • Parameter PassingParameter Marshaling.Ex: Remote procedure “sum( i, j)”. 0Identical machines.
  • Problems - Parameter PassingDifferent Machine Types  Ex: IBM mainframes (EBCDIC) & IBM PCs(ASCII).Different representation of Integers (1s compliment & 2s Compliment), Floating point numbers.Numbering of bytes  Right to Left (Ex: Intel 486) – Little Endian.  Left to Right (Ex: Sun SPARC) – Big Endian.
  • Example - 1
  • Example - 2
  • Representation of InformationCanonical Form Convert internal representation while marshaling.Ex: 2’s compliment for integers. 0 for ASCII. 1 for Boolean. IEEE format for floating point no.
  • Pointer PassingOne way is to forbid the pointers & reference parameters in general. – Highly undesirableOne strategy is copying the whole array/structure (simple) into message. Call by reference is replaced by copy/restore. Optimization – Buffer knows if stub is an input / output parameter. (Twice as efficient).Pointer is followed (dereferenced) by putting it in the register. – Highly Inefficient.
  • Dynamic BindingHardwiring network add. of server into client – Extremely InflexibleTo avoid problems like  Replication of server  Relocation  Migration  Interface Change
  • Server’s Specification :For Stateless Server  Server  Version number  List of procedures provided by server  in: file sent from client to server.  out: sent from server to client  in out: in + out (Copy/Restore)  bytes: no. of bytes to be transferred.  position: where in file to begin  buf: data requested by client is placed here by file server.
  • TermsExports InterfaceImports InterfaceBinderRegistering Unique Id – Typically 32 bit longHandle System Dependent IP Add. , Ethernet Add. , etc.
  • DisadvantagesOverhead Exporting & ImportingCosts TimeMany short lived client process may have to start over again.Binder may act as bottleneck in distributed system.Registering / Deregistering of interfaces creates more overhead.
  • Thank You