SlideShare uma empresa Scribd logo
1 de 28
Remote
Procedure Calls
By
P.SAHITHI CHAITANYA (1551210075)
A.RAMPRAKASH REDDY(1551210077)
G.V.R.SHASHANK(1551210080)
Introduction
 Inter-process communication (IPC).
 Another virtual address space.
 Another process on the same machine.
 Another process on different machine.
 Hides remote interaction.
 Network programming standard 1980s
 Builds on named pipes or Winsock.
 Remote Method Invocation (RMI)
How RPC Operates
Cont….
 When client code calls a remote
procedure, the client stub code
 Retrieves the required parameters from the
client address space.
 Marshals1
the parameters as needed into a
standard NDR2
format for transmission over the
network.
 Calls functions in the RPC client run-time
library to send the request and its parameters
to the server.
1 Marshalling (similar to serialization) is the process of transforming the memory
representation of an object to a data format suitable for storage or transmission
2 Network Data Representation (NDR) is an implementation of the presentation layer in
the OSI model.
Cont…
 The server performs the following steps to
call the remote procedure:
 The server RPC run-time library functions
accept the request and call the server stub
procedure.
 The server stub retrieves the parameters from
the network buffer and converts (i.e.
unmarshals) them from the network
transmission format to the format the server
needs.
 The server stub calls the actual procedure on
the server.
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.
Cont…
Steps
1. 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.
Parameter Passing
 Parameter Marshaling.
 Ex: Remote procedure “sum( i, j)”.
 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
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.
RPC semantics-presence of failures
 Unable to locate the server
 Lost request message
 Lost reply message
 Server crashes
 Client crashes
Unable to locate the server
 When server is down it intimate the value
-1
 Client is unable to locate the server
Lost request message
 Message send from client to server is lost
Lost reply message
 Reply message from server to client is lost
Server crashes
 Server crashes after receiving a request
 Solutions
 Atleast one semantic
 Atmost one semantic
 Exactly one semantic
Client crashes
 Client crashes after sending a request
 Solution is extermination
Protocols for RPCs
1. Request protocol
2. Request / Reply protocol
3. Request /Reply /Acknowledge-Reply
protocol
Request (R) protocol
Client Server
First
RPC
Next
RPC
Request message
Request message Procedure
execution
Procedure
execution
Request / Reply (RR) protocol
Client Server
First
RPC
Next
RPC
Request message
Request message
Procedure
execution
Procedure
execution
Reply message
Reply message
Also serves as acknowledgement
for the request message
Also serves as acknowledgement
for the request message
Also serves as acknowledgement
for the reply of the previous RPC
Request / Reply / Ack. (RRA) protocol
Client Server
First
RPC
Next
RPC
Request message
Request message
Procedure
execution
Procedure
execution
Reply message
Reply message
Reply acknowledgement message
Reply acknowledgement message
Rpc

Mais conteúdo relacionado

Mais procurados

Remote procedure call on client server computing
Remote procedure call on client server computingRemote procedure call on client server computing
Remote procedure call on client server computingSatya P. Joshi
 
remote procedure calls
  remote procedure calls  remote procedure calls
remote procedure callsAshish Kumar
 
RPC: Remote procedure call
RPC: Remote procedure callRPC: Remote procedure call
RPC: Remote procedure callSunita Sahu
 
Sun RPC (Remote Procedure Call)
Sun RPC (Remote Procedure Call)Sun RPC (Remote Procedure Call)
Sun RPC (Remote Procedure Call)Peter R. Egli
 
RPC communication,thread and processes
RPC communication,thread and processesRPC communication,thread and processes
RPC communication,thread and processesshraddha mane
 
Remote Procedure Call (RPC) Server creation semantics & call semantics
Remote Procedure Call (RPC) Server creation semantics & call semanticsRemote Procedure Call (RPC) Server creation semantics & call semantics
Remote Procedure Call (RPC) Server creation semantics & call semanticssvm
 
communication Mechanism in Client Server Model
communication Mechanism in Client Server Model communication Mechanism in Client Server Model
communication Mechanism in Client Server Model Junaid Lodhi
 
Group Communication (Distributed computing)
Group Communication (Distributed computing)Group Communication (Distributed computing)
Group Communication (Distributed computing)Sri Prasanna
 
Data Replication in Distributed System
Data Replication in  Distributed SystemData Replication in  Distributed System
Data Replication in Distributed SystemEhsan Hessami
 
1 messagepassing-121015032028-phpapp01
1 messagepassing-121015032028-phpapp011 messagepassing-121015032028-phpapp01
1 messagepassing-121015032028-phpapp01Zaigham Abbas
 
transport layer
transport layer transport layer
transport layer usman19
 

Mais procurados (19)

Remote procedure call on client server computing
Remote procedure call on client server computingRemote procedure call on client server computing
Remote procedure call on client server computing
 
message passing
 message passing message passing
message passing
 
remote procedure calls
  remote procedure calls  remote procedure calls
remote procedure calls
 
RPC: Remote procedure call
RPC: Remote procedure callRPC: Remote procedure call
RPC: Remote procedure call
 
Sun RPC (Remote Procedure Call)
Sun RPC (Remote Procedure Call)Sun RPC (Remote Procedure Call)
Sun RPC (Remote Procedure Call)
 
Remote Procedure Call
Remote Procedure CallRemote Procedure Call
Remote Procedure Call
 
Rpc
RpcRpc
Rpc
 
RPC communication,thread and processes
RPC communication,thread and processesRPC communication,thread and processes
RPC communication,thread and processes
 
Remote Procedure Call (RPC) Server creation semantics & call semantics
Remote Procedure Call (RPC) Server creation semantics & call semanticsRemote Procedure Call (RPC) Server creation semantics & call semantics
Remote Procedure Call (RPC) Server creation semantics & call semantics
 
Rpc mechanism
Rpc mechanismRpc mechanism
Rpc mechanism
 
Internet
InternetInternet
Internet
 
Remote method invocation (RMI)
Remote method invocation (RMI)Remote method invocation (RMI)
Remote method invocation (RMI)
 
13 tm adv
13 tm adv13 tm adv
13 tm adv
 
5. Distributed Operating Systems
5. Distributed Operating Systems5. Distributed Operating Systems
5. Distributed Operating Systems
 
communication Mechanism in Client Server Model
communication Mechanism in Client Server Model communication Mechanism in Client Server Model
communication Mechanism in Client Server Model
 
Group Communication (Distributed computing)
Group Communication (Distributed computing)Group Communication (Distributed computing)
Group Communication (Distributed computing)
 
Data Replication in Distributed System
Data Replication in  Distributed SystemData Replication in  Distributed System
Data Replication in Distributed System
 
1 messagepassing-121015032028-phpapp01
1 messagepassing-121015032028-phpapp011 messagepassing-121015032028-phpapp01
1 messagepassing-121015032028-phpapp01
 
transport layer
transport layer transport layer
transport layer
 

Semelhante a Rpc

Middleware in Distributed System-RPC,RMI
Middleware in Distributed System-RPC,RMIMiddleware in Distributed System-RPC,RMI
Middleware in Distributed System-RPC,RMIPrajakta Rane
 
Byte Ordering - Unit 2.pptx
Byte Ordering - Unit 2.pptxByte Ordering - Unit 2.pptx
Byte Ordering - Unit 2.pptxRockyBhai46825
 
Communication in Distributed System.ppt
Communication in Distributed System.pptCommunication in Distributed System.ppt
Communication in Distributed System.pptSELVAVINAYAGAMG
 
Chapter 2B-Communication.ppt
Chapter 2B-Communication.pptChapter 2B-Communication.ppt
Chapter 2B-Communication.pptsirajmohammed35
 
2.communcation in distributed system
2.communcation in distributed system2.communcation in distributed system
2.communcation in distributed systemGd Goenka University
 
CHP-4.pptx
CHP-4.pptxCHP-4.pptx
CHP-4.pptxFamiDan
 
Distributes objects and Rmi
Distributes objects and RmiDistributes objects and Rmi
Distributes objects and RmiMayank Jain
 
Remote Procedure Call
Remote Procedure CallRemote Procedure Call
Remote Procedure CallNadia Nahar
 
Dos(rpc)avishek130650107020
Dos(rpc)avishek130650107020Dos(rpc)avishek130650107020
Dos(rpc)avishek130650107020Avishek Sarkar
 
Topic2 Understanding Middleware
Topic2 Understanding MiddlewareTopic2 Understanding Middleware
Topic2 Understanding Middlewaresanjoysanyal
 
Socket Programming
Socket ProgrammingSocket Programming
Socket ProgrammingCEC Landran
 
Network and distributed systems
Network and distributed systemsNetwork and distributed systems
Network and distributed systemsSri Prasanna
 
Chapter 4 communication2
Chapter 4 communication2Chapter 4 communication2
Chapter 4 communication2DBU
 
Communication in Distributed Systems
Communication in Distributed SystemsCommunication in Distributed Systems
Communication in Distributed SystemsDilum Bandara
 

Semelhante a Rpc (20)

Lecture9
Lecture9Lecture9
Lecture9
 
Cs556 section3
Cs556 section3Cs556 section3
Cs556 section3
 
Middleware in Distributed System-RPC,RMI
Middleware in Distributed System-RPC,RMIMiddleware in Distributed System-RPC,RMI
Middleware in Distributed System-RPC,RMI
 
Byte Ordering - Unit 2.pptx
Byte Ordering - Unit 2.pptxByte Ordering - Unit 2.pptx
Byte Ordering - Unit 2.pptx
 
Communication in Distributed System.ppt
Communication in Distributed System.pptCommunication in Distributed System.ppt
Communication in Distributed System.ppt
 
Chapter 2B-Communication.ppt
Chapter 2B-Communication.pptChapter 2B-Communication.ppt
Chapter 2B-Communication.ppt
 
2.communcation in distributed system
2.communcation in distributed system2.communcation in distributed system
2.communcation in distributed system
 
CHP-4.pptx
CHP-4.pptxCHP-4.pptx
CHP-4.pptx
 
Distributes objects and Rmi
Distributes objects and RmiDistributes objects and Rmi
Distributes objects and Rmi
 
Remote Procedure Call
Remote Procedure CallRemote Procedure Call
Remote Procedure Call
 
MSB-Remote procedure call
MSB-Remote procedure callMSB-Remote procedure call
MSB-Remote procedure call
 
Remote Procedure Call
Remote Procedure CallRemote Procedure Call
Remote Procedure Call
 
Dos(rpc)avishek130650107020
Dos(rpc)avishek130650107020Dos(rpc)avishek130650107020
Dos(rpc)avishek130650107020
 
Topic2 Understanding Middleware
Topic2 Understanding MiddlewareTopic2 Understanding Middleware
Topic2 Understanding Middleware
 
Socket Programming
Socket ProgrammingSocket Programming
Socket Programming
 
Network and distributed systems
Network and distributed systemsNetwork and distributed systems
Network and distributed systems
 
Chapter 4 communication2
Chapter 4 communication2Chapter 4 communication2
Chapter 4 communication2
 
Communication in Distributed Systems
Communication in Distributed SystemsCommunication in Distributed Systems
Communication in Distributed Systems
 
New Creators
New CreatorsNew Creators
New Creators
 
Chapter 6r
Chapter 6rChapter 6r
Chapter 6r
 

Último

Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 

Último (20)

Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 

Rpc

  • 1. Remote Procedure Calls By P.SAHITHI CHAITANYA (1551210075) A.RAMPRAKASH REDDY(1551210077) G.V.R.SHASHANK(1551210080)
  • 2. Introduction  Inter-process communication (IPC).  Another virtual address space.  Another process on the same machine.  Another process on different machine.  Hides remote interaction.  Network programming standard 1980s  Builds on named pipes or Winsock.  Remote Method Invocation (RMI)
  • 4. Cont….  When client code calls a remote procedure, the client stub code  Retrieves the required parameters from the client address space.  Marshals1 the parameters as needed into a standard NDR2 format for transmission over the network.  Calls functions in the RPC client run-time library to send the request and its parameters to the server. 1 Marshalling (similar to serialization) is the process of transforming the memory representation of an object to a data format suitable for storage or transmission 2 Network Data Representation (NDR) is an implementation of the presentation layer in the OSI model.
  • 5. Cont…  The server performs the following steps to call the remote procedure:  The server RPC run-time library functions accept the request and call the server stub procedure.  The server stub retrieves the parameters from the network buffer and converts (i.e. unmarshals) them from the network transmission format to the format the server needs.  The server stub calls the actual procedure on the server.
  • 6. 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.
  • 8. Steps 1. 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.
  • 9. Parameter Passing  Parameter Marshaling.  Ex: Remote procedure “sum( i, j)”.  Identical machines.
  • 10. 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.
  • 13. 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.
  • 14. 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.
  • 15. Dynamic Binding  Hardwiring network add. of server into client – Extremely Inflexible  To avoid problems like  Replication of server  Relocation  Migration  Interface Change
  • 16. Terms  Exports Interface  Imports Interface  Binder  Registering  Unique Id – Typically 32 bit long  Handle  System Dependent  IP Add. , Ethernet Add. , etc.
  • 17. 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.
  • 18. RPC semantics-presence of failures  Unable to locate the server  Lost request message  Lost reply message  Server crashes  Client crashes
  • 19. Unable to locate the server  When server is down it intimate the value -1  Client is unable to locate the server
  • 20. Lost request message  Message send from client to server is lost
  • 21. Lost reply message  Reply message from server to client is lost
  • 22. Server crashes  Server crashes after receiving a request  Solutions  Atleast one semantic  Atmost one semantic  Exactly one semantic
  • 23. Client crashes  Client crashes after sending a request  Solution is extermination
  • 24. Protocols for RPCs 1. Request protocol 2. Request / Reply protocol 3. Request /Reply /Acknowledge-Reply protocol
  • 25. Request (R) protocol Client Server First RPC Next RPC Request message Request message Procedure execution Procedure execution
  • 26. Request / Reply (RR) protocol Client Server First RPC Next RPC Request message Request message Procedure execution Procedure execution Reply message Reply message Also serves as acknowledgement for the request message Also serves as acknowledgement for the request message Also serves as acknowledgement for the reply of the previous RPC
  • 27. Request / Reply / Ack. (RRA) protocol Client Server First RPC Next RPC Request message Request message Procedure execution Procedure execution Reply message Reply message Reply acknowledgement message Reply acknowledgement message

Notas do Editor

  1. Extended Binary Coded Decimal Interchange Code  ( EBCDIC ) American Standard Code for Information Interchange(ASCII)