SlideShare a Scribd company logo
CS 704DAdvanced Operating System(RPC)Debasis Das
Remote ProcedureCalls(RPC)2
Remote Procedure CallsA special case for building distributed applications
RPC became popular IPC mechanisms for distributed applications
Simple call syntax
Familiar semantics, similar to local procedure calls\
Well defined interface, compile time type checking, auto interface generation
Ease of use, clean & Simple
Generality & efficiency
Same IPC mechanism can be used for procedure on different machines as well as on the same machine11/21/2009IT703D: Dirstibuted Computing Debasis Das3
The RPC ModelBased on procedure call model
Make a procedure call, place parameters in a known location
Transfer control to the procedure
Procedure executes with copies of the parameters/arguments
Control is returned to calling procedure with result, if any11/21/2009IT703D: Distributed Computing Debasis Das4
RPC Model(Graphically)CallerClient ProcessRequest message & parametersSend reply with result, if anyServer Process11/21/2009IT703D: Distributed Computing Debasis Das5
RPC CharacteristicsServer process is normally dormant. Works when called
If concurrency required, calling processes can leave messages asynchronously, server process keeps serving requests
Server process can have threads. Starts a thread on request, server is free to field further calls if they come along11/21/2009IT703D: Distributed Computing Debasis Das6
Transparency of RPCFor a programmer it should be transparent whether he is calling a local or a remote procedure. Requires
Syntactic transparency
Semantic transparency
Syntactic transparency is easy to achieve but not semantic transparency11/21/2009IT703D: Distributed Computing Debasis Das7
Semantic TransparencyNearly impossible to achieve, because
No shared memory: passing addresses as arguments is meaningless, call by reference pointers are useless, structures referenced by pointers are difficult.
More vulnerable to failures: two different processes, two different machines, intervening network. Processor and communication failures need to be taken care of.
RPCs can take much more time(x100 to x1000) due to communication congestions. Long delays need to be handled.11/21/2009IT703D: Distributed Computing Debasis Das8
Implementing RPC MechanismServerClientReturnCallCallReturnExecuteStubsUnpackPackPackUnpackRPC RuntimesReceiveSendReceiveSendWait11/21/2009IT703D: Distributed Computing Debasis Das9
StubsClient stub
On call request, packs specs of remote procedure and arguments
Asks RPC Runtime to transmit the message to the server
Server stub
After receipt, the RPC Runtime passes the message to it. It then unpacks the message and makes a usual call to the procedure.
On receipt of result, packs the result and asks the runtime to send it back to the client.11/21/2009IT703D: Distributed Computing Debasis Das10
Stub & TransparencyExcept for the stubs everything operates the same transparent way for local or remote procedure call.
No need to dabble in send & receive primitives11/21/2009IT703D: Distributed Computing Debasis Das11
Stub GenerationManually
Write code to implement translation functions provided by the RPC implementer
Automatically
By using IDL. Procedures supported by the interface, types of arguments and results
IDL compiler will ensure compilation, type checking etc.
Optimizes data to be sent over the network. Interface definition usually will have information as to which arguments are input/output/both.11/21/2009IT703D: Distributed Computing Debasis Das
Automatic Stub Generation, IDL etc.Interface export: server that implements the procedures that can be used by others
Interface import: calls procedures from the interface
Define an interface using the IDL, write client program that imports the interface and server program that exports the interface
IDL compilers generate client stub procedure, server stub procedure, header files. Compile & link the stubs.
Interface code thus generated could be combined with client/server procedures done in different languages11/21/2009IT703D: Distributed Computing Debasis Das
RPC MessagesCall messages
Sent by client to server with request to execute a remote procedure
Reply messages
Sent by server to the requesting client to indicate completion of a request and related results if generated
The messages follow RPC protocols and has nothing to do with network transport protocol11/21/2009IT703D: Distributed Computing Debasis Das
RPC Call MessageBasic fields of the message
Id information for the remote procedure to be executed
Required arguments to execute the procedure
Additional fields
Message id field, essentially a sequence number
Message type field identifying if a call/reply message
Client id field, identifying the requesting client and for authentication11/21/2009IT703D: Distributed Computing Debasis Das
RPC Call Message StructureRemote Procedure idClientidMessageidMessagetypeProgramnumberVersionnumberProcedurenumberArguments11/21/2009IT703D: Distributed Computing Debasis Das16
RPC Reply MessageCall message not understood, call rejected
Client id not authorized, failure message
Procedure id not available on server, failure message
Parameters not successfully decoded, failure message
Exception(e.g. divide by zero) happens, failure message
Procedure executes successfully, return result(s)11/21/2009IT703D: Distributed Computing Debasis Das
RPC Reply Message StructureMessageidMessagetypeReplyStatussuccessResult(s)MessageidMessagetypeReplyStatusfailureFailurereason11/21/2009IT703D: Distributed Computing Debasis Das18
Marshaling Arguments & ResultsData structures to be converted into stream form and results decoded back
This is the marshalling process and involves
Take the arguments/result
Encoding of data on sender’s machine
Decoding of message data on receiver’s machine
Representation method(tagged or untagged) should be known, type safety can be ensured
Must reflect structure of all types; primitive types, structured types and user defined types11/21/2009IT703D: Distributed Computing Debasis Das19
Marshalling Procedure TypesProvided as part of the RPC support. Procedures for scalar types and compound ones built from Scalar types are includedDefined by users of RPC systems. Includes marshalling procedures for user defined data types11/21/2009IT703D: Distributed Computing Debasis Das
Server ManagementServer Implementation

More Related Content

PPT
Rpc (Distributed computing)
PPT
message passing
PPT
Ds objects and models
PDF
Protocolo FTP e DNS
PPT
Dhcp presentation 01
PPT
Overview on NUMA
PPT
Distributed OS - An Introduction
PPTX
Operations on Processes
Rpc (Distributed computing)
message passing
Ds objects and models
Protocolo FTP e DNS
Dhcp presentation 01
Overview on NUMA
Distributed OS - An Introduction
Operations on Processes

What's hot (20)

PPT
Communications is distributed systems
PPT
Isdn networking
PDF
Implementation of FIFO in Linux
PPT
PPTX
Network address translation
PDF
Implementation of Pipe in Linux
DOCX
Complete Operating System notes
PDF
Udev for Device Management in Linux
PPTX
IPv6 DHCP
PPT
Distributed System-Multicast & Indirect communication
PPTX
Client server architecture
PPTX
VLSM y CIDR (características, implementación torres gamarra
PPT
Chapter One.ppt
PPT
PPTX
Qos Quality of services
PPTX
Fast Userspace OVS with AF_XDP, OVS CONF 2018
PPTX
SERVIDOR WINS
PPTX
PPTX
Communications is distributed systems
Isdn networking
Implementation of FIFO in Linux
Network address translation
Implementation of Pipe in Linux
Complete Operating System notes
Udev for Device Management in Linux
IPv6 DHCP
Distributed System-Multicast & Indirect communication
Client server architecture
VLSM y CIDR (características, implementación torres gamarra
Chapter One.ppt
Qos Quality of services
Fast Userspace OVS with AF_XDP, OVS CONF 2018
SERVIDOR WINS
Ad

Similar to Cs 704 d rpc (20)

PDF
PPTX
Cs 704 d dce ipc-msgpassing
PPT
DS-Chapter DDEFR2-Communication_105220.ppt
PPT
Survey on Client Tools, Server and Communication types
PPTX
System and network administration network services
PDF
5. Distributed Operating Systems
PPT
remote procedure calls
ODP
Ubuntu For Intranet Services
DOCX
Network Testing ques
PPTX
Dos(rpc)avishek130650107020
PPT
Chapter 2B-Communication.ppt
PPTX
Chapter 3-Processes2.pptx
PPTX
Lecture 3 computer communications and networks
PDF
Distributed Virtual Transaction Directory Server
PPTX
Linux Systems Prograramming: Unix Domain, Internet Domain (TCP, UDP) Socket P...
PPTX
Byte Ordering - Unit 2.pptx
PPT
Network and distributed systems
Cs 704 d dce ipc-msgpassing
DS-Chapter DDEFR2-Communication_105220.ppt
Survey on Client Tools, Server and Communication types
System and network administration network services
5. Distributed Operating Systems
remote procedure calls
Ubuntu For Intranet Services
Network Testing ques
Dos(rpc)avishek130650107020
Chapter 2B-Communication.ppt
Chapter 3-Processes2.pptx
Lecture 3 computer communications and networks
Distributed Virtual Transaction Directory Server
Linux Systems Prograramming: Unix Domain, Internet Domain (TCP, UDP) Socket P...
Byte Ordering - Unit 2.pptx
Network and distributed systems
Ad

More from Debasis Das (20)

PPTX
Developing robust & enterprise io t applications
PPTX
IoT: An Introduction and Getting Started Session
PPTX
Development eco-system in free-source for io t
PPTX
Microprocessors & microcontrollers- The design Context
PPT
Management control systems jsb 606 part4
PPT
Management control systems jsb 606 part3
PPT
Management control systems jsb 606 part2
PPTX
Management control systems jsb 606 part1
PPT
Computers for management jsb 1072003 ver
PPTX
Trends in education management
PPTX
Ei502microprocessorsmicrtocontrollerspart4 8051 Microcontroller
PPTX
Ei502microprocessorsmicrtocontrollerspart5 sixteen bit8086 1
PPTX
Ei502 microprocessors & micrtocontrollers part3hardwareinterfacing
PPTX
Ei502 microprocessors & micrtocontrollers part 2(instructionset)
PPTX
Ei502 microprocessors & micrtocontrollers part 1
PPTX
It802 d mobilecommunicationspart4
PPTX
It802 d mobilecommunicationspart3
PPTX
It 802 d_Mobile Communications_part 2
PPTX
It 802 d_Mobile Communications_part 2
PPT
It 802 d_mobile_communicationsSomeHistory
Developing robust & enterprise io t applications
IoT: An Introduction and Getting Started Session
Development eco-system in free-source for io t
Microprocessors & microcontrollers- The design Context
Management control systems jsb 606 part4
Management control systems jsb 606 part3
Management control systems jsb 606 part2
Management control systems jsb 606 part1
Computers for management jsb 1072003 ver
Trends in education management
Ei502microprocessorsmicrtocontrollerspart4 8051 Microcontroller
Ei502microprocessorsmicrtocontrollerspart5 sixteen bit8086 1
Ei502 microprocessors & micrtocontrollers part3hardwareinterfacing
Ei502 microprocessors & micrtocontrollers part 2(instructionset)
Ei502 microprocessors & micrtocontrollers part 1
It802 d mobilecommunicationspart4
It802 d mobilecommunicationspart3
It 802 d_Mobile Communications_part 2
It 802 d_Mobile Communications_part 2
It 802 d_mobile_communicationsSomeHistory

Cs 704 d rpc