SlideShare a Scribd company logo
Preetha/ME-CSE/I
INTRODUCTION
• High level constructs [Helps the program in
using underlying communication network]
• Two Types of Communication Models
– Message passing
– Remote Procedure Calls
Preetha/ME-CSE/I
Message Passing Method
• Two basic communication primitives
 SEND - Message & its Destination
 RECEIVE - Source of msg &Buffer for storing the
message
• Client-Server Computation Model
 Client sends Message to server and waits
 Server replies after computation
Preetha/ME-CSE/I
Design issues
Blocking vs Non blocking primitives
Nonblocking
• SEND primitive return the control to the user process as soon as the message is
copied from user buffer to kernel buffer.
• Advantage : Programs have maximum flexibility in performing
computation and communication in any order.
• Drawback : Programming becomes tricky and difficult .
Blocking
• SEND primitive does not return the control to the user process until message has
been sent or acknowledgement has been received.
• Advantage : Program behavior is predictable.
• Drawback : Lack of flexibility in programming.Preetha/ME-CSE/I
Cont…
Synchronous vs Asynchronous Primitives
Synchronous
• SEND primitive is blocked until corresponding RECEIVE
primitive is executed at the target computer.
• Also known as rendezvous.
Asynchronous
• Messages are buffered.
• SEND primitive does not block even if there is no
corresponding execution of the RECEIVE primitive.
• The corresponding RECEIVE primitive can be either blocking
or non-blocking.
• Drawback : buffering message is more complex , as it involves
creating , manging &destroying buffers.Preetha/ME-CSE/I
Details to be handled in Message Passing
• Pairing of Response with Requests
• Data Representation
• Sender should know the address of Remote
machine
• Communication and System failures
Preetha/ME-CSE/I
Remote procedure call (RPC)
• RPC is a protocol that one program can use to
request a service from a program located in
another computer in a network without having
to understand network details.
• RPC uses the client/server model.
• The requesting program is a client and the
service-providing program is the server.
Preetha/ME-CSE/I
Cont..
• The main idea of an RPC is to allow a local
computer (client) to remotely call procedures
on a remote computer (server).
• RPC is an interaction between a client and a
server.
• Client invokes procedure on sever.
• Server executes the procedure and pass the
result back to client.
• Calling process is suspended and proceeds
only after getting the result from server.
Preetha/ME-CSE/I
Preetha/ME-CSE/I
RPC design issues
• Structure
• Binding
• Parameter and Result Passing
• Error handling, semantics and Correctness
Preetha/ME-CSE/I
Structure
Stub : It is a piece of code used for converting parameters passed
during a RPC.
Client stub procedure :
• constructs a message containing identity of remote procedures & parameters.
• sends the message to remote server machine.
Server stub procedures :
• receives the message at remote machine side & passes the parameter to the
procedure specified.
• Upon completion, it passes the result back to the client-stub procedure ,which
returns the result to the client.
Preetha/ME-CSE/I
Binding
It is a process that determines the remote
procedure & the machine on which it will be
executed, upon a remote procedure invocation.
Binding server :
 Client-server model uses this server.
 It stores the server machine addresses along
with the services they provide.
Preetha/ME-CSE/I
Parameter and result passing
1. Stub procedures convert the parameters to remote machine
format and pack them into a buffer . After the message is
received , it must be unpacked.
Problems :Conversion becomes expensive if it has to be done
on every call.
2. Send the parameters along with a code identifying the format
used so that receiver can do the conversion.
Problems :Machine should know how to convert all the
formats that can possibly be used and poor portability
because whenever new representation is introduced into the
system, existing s/w need to be updated.
Preetha/ME-CSE/I
Cont..
 Each data type may have standard format in
the message .Here ,sender convert data to
standard format & receiver convert from
standard format to its local representation.
 Problem : arises if both sender and receiver
use the same internal representation.
 Another issue is passing parameter by value &
reference .Passing parameter by value is
simple but other is complicated
Preetha/ME-CSE/I
Error handling ,semantics & correctness
RPC fails for two reasons:
 Computer failure
 Communication failure
Semantics play a significant role in development of
programs for distributes computation.
RPC semantics :
 “At least once” semantics
 “exactly once” semantics
 “At most once” semantics
Preetha/ME-CSE/I
 “At least once” semantics
If RPC succeeds,it implies that atleast one execution of remote
procedure has taken place at remote machine.
Else 0,partial,one or more execution.
 “exactly once” semantics
If RPC succeeds,it implies that exactly one execution of
remote procedure has taken place at remote machine.
Else 0,partial,one execution.
 “At most once” semantics
Similar to exactly once semantics , in addition calls that do not
terminate do not produce any side effects and also referred as
Zero-or-one semantics.
Preetha/ME-CSE/I
Preetha/ME-CSE/I
Preetha/ME-CSE/I

More Related Content

What's hot

Dynamic and Static Modeling
Dynamic and Static ModelingDynamic and Static Modeling
Dynamic and Static ModelingSaurabh Kumar
 
Clock synchronization in distributed system
Clock synchronization in distributed systemClock synchronization in distributed system
Clock synchronization in distributed systemSunita Sahu
 
Types of Load distributing algorithm in Distributed System
Types of Load distributing algorithm in Distributed SystemTypes of Load distributing algorithm in Distributed System
Types of Load distributing algorithm in Distributed SystemDHIVYADEVAKI
 
Transmission Control Protocol (TCP)
Transmission Control Protocol (TCP)Transmission Control Protocol (TCP)
Transmission Control Protocol (TCP)k33a
 
8. mutual exclusion in Distributed Operating Systems
8. mutual exclusion in Distributed Operating Systems8. mutual exclusion in Distributed Operating Systems
8. mutual exclusion in Distributed Operating SystemsDr Sandeep Kumar Poonia
 
Multilayer & Back propagation algorithm
Multilayer & Back propagation algorithmMultilayer & Back propagation algorithm
Multilayer & Back propagation algorithmswapnac12
 
distributed shared memory
 distributed shared memory distributed shared memory
distributed shared memoryAshish Kumar
 
Distributed file system
Distributed file systemDistributed file system
Distributed file systemAnamika Singh
 
MEDIUM ACCESS CONTROL
MEDIUM ACCESS CONTROLMEDIUM ACCESS CONTROL
MEDIUM ACCESS CONTROLjunnubabu
 
Context model
Context modelContext model
Context modelUbaid423
 
Message and Stream Oriented Communication
Message and Stream Oriented CommunicationMessage and Stream Oriented Communication
Message and Stream Oriented CommunicationDilum Bandara
 
Lecture 1 introduction to parallel and distributed computing
Lecture 1   introduction to parallel and distributed computingLecture 1   introduction to parallel and distributed computing
Lecture 1 introduction to parallel and distributed computingVajira Thambawita
 
Inter Process Communication Presentation[1]
Inter Process Communication Presentation[1]Inter Process Communication Presentation[1]
Inter Process Communication Presentation[1]Ravindra Raju Kolahalam
 
Distributed Systems Real Life Applications
Distributed Systems Real Life ApplicationsDistributed Systems Real Life Applications
Distributed Systems Real Life ApplicationsAman Srivastava
 

What's hot (20)

Dynamic and Static Modeling
Dynamic and Static ModelingDynamic and Static Modeling
Dynamic and Static Modeling
 
Clock synchronization in distributed system
Clock synchronization in distributed systemClock synchronization in distributed system
Clock synchronization in distributed system
 
Types of Load distributing algorithm in Distributed System
Types of Load distributing algorithm in Distributed SystemTypes of Load distributing algorithm in Distributed System
Types of Load distributing algorithm in Distributed System
 
Transmission Control Protocol (TCP)
Transmission Control Protocol (TCP)Transmission Control Protocol (TCP)
Transmission Control Protocol (TCP)
 
8. mutual exclusion in Distributed Operating Systems
8. mutual exclusion in Distributed Operating Systems8. mutual exclusion in Distributed Operating Systems
8. mutual exclusion in Distributed Operating Systems
 
Multilayer & Back propagation algorithm
Multilayer & Back propagation algorithmMultilayer & Back propagation algorithm
Multilayer & Back propagation algorithm
 
distributed shared memory
 distributed shared memory distributed shared memory
distributed shared memory
 
Peephole Optimization
Peephole OptimizationPeephole Optimization
Peephole Optimization
 
Distributed file system
Distributed file systemDistributed file system
Distributed file system
 
MEDIUM ACCESS CONTROL
MEDIUM ACCESS CONTROLMEDIUM ACCESS CONTROL
MEDIUM ACCESS CONTROL
 
Issues in Data Link Layer
Issues in Data Link LayerIssues in Data Link Layer
Issues in Data Link Layer
 
Context model
Context modelContext model
Context model
 
Quality of Service
Quality of ServiceQuality of Service
Quality of Service
 
Distance vector routing
Distance vector routingDistance vector routing
Distance vector routing
 
Message and Stream Oriented Communication
Message and Stream Oriented CommunicationMessage and Stream Oriented Communication
Message and Stream Oriented Communication
 
Lecture 1 introduction to parallel and distributed computing
Lecture 1   introduction to parallel and distributed computingLecture 1   introduction to parallel and distributed computing
Lecture 1 introduction to parallel and distributed computing
 
02 protocol architecture
02 protocol architecture02 protocol architecture
02 protocol architecture
 
Inter Process Communication Presentation[1]
Inter Process Communication Presentation[1]Inter Process Communication Presentation[1]
Inter Process Communication Presentation[1]
 
Distributed Operating System_1
Distributed Operating System_1Distributed Operating System_1
Distributed Operating System_1
 
Distributed Systems Real Life Applications
Distributed Systems Real Life ApplicationsDistributed Systems Real Life Applications
Distributed Systems Real Life Applications
 

Similar to Communication primitives

Client Server Model and Distributed Computing
Client Server Model and Distributed ComputingClient Server Model and Distributed Computing
Client Server Model and Distributed ComputingAbhishek Jaisingh
 
CS9222 ADVANCED OPERATING SYSTEMS
CS9222 ADVANCED OPERATING SYSTEMSCS9222 ADVANCED OPERATING SYSTEMS
CS9222 ADVANCED OPERATING SYSTEMSKathirvel Ayyaswamy
 
Middleware in Distributed System-RPC,RMI
Middleware in Distributed System-RPC,RMIMiddleware in Distributed System-RPC,RMI
Middleware in Distributed System-RPC,RMIPrajakta Rane
 
Client computing evolution ppt11
Client computing evolution ppt11Client computing evolution ppt11
Client computing evolution ppt11Tech_MX
 
Message Passing, Remote Procedure Calls and Distributed Shared Memory as Com...
Message Passing, Remote Procedure Calls and  Distributed Shared Memory as Com...Message Passing, Remote Procedure Calls and  Distributed Shared Memory as Com...
Message Passing, Remote Procedure Calls and Distributed Shared Memory as Com...Sehrish Asif
 
IBM IMPACT 2014 - AMC-1882 Building a Scalable & Continuously Available IBM M...
IBM IMPACT 2014 - AMC-1882 Building a Scalable & Continuously Available IBM M...IBM IMPACT 2014 - AMC-1882 Building a Scalable & Continuously Available IBM M...
IBM IMPACT 2014 - AMC-1882 Building a Scalable & Continuously Available IBM M...Peter Broadhurst
 
Software artitchteure
Software artitchteureSoftware artitchteure
Software artitchteuressusere50573
 
CHP-4.pptx
CHP-4.pptxCHP-4.pptx
CHP-4.pptxFamiDan
 
Unit 3 - Protocols and Client-Server Applications - IT
Unit 3 - Protocols and Client-Server Applications - ITUnit 3 - Protocols and Client-Server Applications - IT
Unit 3 - Protocols and Client-Server Applications - ITDeepraj Bhujel
 
client server protocol
client server protocolclient server protocol
client server protocolbmuhire
 
2.communcation in distributed system
2.communcation in distributed system2.communcation in distributed system
2.communcation in distributed systemGd Goenka University
 
Remote invocation
Remote invocationRemote invocation
Remote invocationishapadhy
 
Topic 5- Communications v1.pptx
Topic 5- Communications v1.pptxTopic 5- Communications v1.pptx
Topic 5- Communications v1.pptxDanishMahmood23
 
Client server architecture
Client server architectureClient server architecture
Client server architectureRituBhargava7
 
Tcpip services and applications
Tcpip services and applicationsTcpip services and applications
Tcpip services and applicationsOnline
 
Odbc and data access objects
Odbc and data access objectsOdbc and data access objects
Odbc and data access objectsSangeetha Sg
 
ProposalRequirements document This is part 1 of the project, I .docx
ProposalRequirements document This is part 1 of the project, I .docxProposalRequirements document This is part 1 of the project, I .docx
ProposalRequirements document This is part 1 of the project, I .docxdenneymargareta
 
Lecture5 architecture styles.pdf
Lecture5 architecture styles.pdfLecture5 architecture styles.pdf
Lecture5 architecture styles.pdfssuser9d62d6
 

Similar to Communication primitives (20)

Client Server Model and Distributed Computing
Client Server Model and Distributed ComputingClient Server Model and Distributed Computing
Client Server Model and Distributed Computing
 
CS9222 ADVANCED OPERATING SYSTEMS
CS9222 ADVANCED OPERATING SYSTEMSCS9222 ADVANCED OPERATING SYSTEMS
CS9222 ADVANCED OPERATING SYSTEMS
 
Middleware in Distributed System-RPC,RMI
Middleware in Distributed System-RPC,RMIMiddleware in Distributed System-RPC,RMI
Middleware in Distributed System-RPC,RMI
 
Client computing evolution ppt11
Client computing evolution ppt11Client computing evolution ppt11
Client computing evolution ppt11
 
Message Passing, Remote Procedure Calls and Distributed Shared Memory as Com...
Message Passing, Remote Procedure Calls and  Distributed Shared Memory as Com...Message Passing, Remote Procedure Calls and  Distributed Shared Memory as Com...
Message Passing, Remote Procedure Calls and Distributed Shared Memory as Com...
 
IBM IMPACT 2014 - AMC-1882 Building a Scalable & Continuously Available IBM M...
IBM IMPACT 2014 - AMC-1882 Building a Scalable & Continuously Available IBM M...IBM IMPACT 2014 - AMC-1882 Building a Scalable & Continuously Available IBM M...
IBM IMPACT 2014 - AMC-1882 Building a Scalable & Continuously Available IBM M...
 
Software artitchteure
Software artitchteureSoftware artitchteure
Software artitchteure
 
4. system models
4. system models4. system models
4. system models
 
CHP-4.pptx
CHP-4.pptxCHP-4.pptx
CHP-4.pptx
 
Unit 3 - Protocols and Client-Server Applications - IT
Unit 3 - Protocols and Client-Server Applications - ITUnit 3 - Protocols and Client-Server Applications - IT
Unit 3 - Protocols and Client-Server Applications - IT
 
client server protocol
client server protocolclient server protocol
client server protocol
 
2.communcation in distributed system
2.communcation in distributed system2.communcation in distributed system
2.communcation in distributed system
 
Remote invocation
Remote invocationRemote invocation
Remote invocation
 
Topic 5- Communications v1.pptx
Topic 5- Communications v1.pptxTopic 5- Communications v1.pptx
Topic 5- Communications v1.pptx
 
Client server architecture
Client server architectureClient server architecture
Client server architecture
 
Tcpip services and applications
Tcpip services and applicationsTcpip services and applications
Tcpip services and applications
 
Odbc and data access objects
Odbc and data access objectsOdbc and data access objects
Odbc and data access objects
 
Remote procedure call
Remote procedure callRemote procedure call
Remote procedure call
 
ProposalRequirements document This is part 1 of the project, I .docx
ProposalRequirements document This is part 1 of the project, I .docxProposalRequirements document This is part 1 of the project, I .docx
ProposalRequirements document This is part 1 of the project, I .docx
 
Lecture5 architecture styles.pdf
Lecture5 architecture styles.pdfLecture5 architecture styles.pdf
Lecture5 architecture styles.pdf
 

Recently uploaded

retail automation billing system ppt.pptx
retail automation billing system ppt.pptxretail automation billing system ppt.pptx
retail automation billing system ppt.pptxfaamieahmd
 
Automobile Management System Project Report.pdf
Automobile Management System Project Report.pdfAutomobile Management System Project Report.pdf
Automobile Management System Project Report.pdfKamal Acharya
 
Online blood donation management system project.pdf
Online blood donation management system project.pdfOnline blood donation management system project.pdf
Online blood donation management system project.pdfKamal Acharya
 
Hall booking system project report .pdf
Hall booking system project report  .pdfHall booking system project report  .pdf
Hall booking system project report .pdfKamal Acharya
 
Quality defects in TMT Bars, Possible causes and Potential Solutions.
Quality defects in TMT Bars, Possible causes and Potential Solutions.Quality defects in TMT Bars, Possible causes and Potential Solutions.
Quality defects in TMT Bars, Possible causes and Potential Solutions.PrashantGoswami42
 
Explosives Industry manufacturing process.pdf
Explosives Industry manufacturing process.pdfExplosives Industry manufacturing process.pdf
Explosives Industry manufacturing process.pdf884710SadaqatAli
 
2024 DevOps Pro Europe - Growing at the edge
2024 DevOps Pro Europe - Growing at the edge2024 DevOps Pro Europe - Growing at the edge
2024 DevOps Pro Europe - Growing at the edgePaco Orozco
 
Introduction to Machine Learning Unit-4 Notes for II-II Mechanical Engineering
Introduction to Machine Learning Unit-4 Notes for II-II Mechanical EngineeringIntroduction to Machine Learning Unit-4 Notes for II-II Mechanical Engineering
Introduction to Machine Learning Unit-4 Notes for II-II Mechanical EngineeringC Sai Kiran
 
NO1 Pandit Amil Baba In Bahawalpur, Sargodha, Sialkot, Sheikhupura, Rahim Yar...
NO1 Pandit Amil Baba In Bahawalpur, Sargodha, Sialkot, Sheikhupura, Rahim Yar...NO1 Pandit Amil Baba In Bahawalpur, Sargodha, Sialkot, Sheikhupura, Rahim Yar...
NO1 Pandit Amil Baba In Bahawalpur, Sargodha, Sialkot, Sheikhupura, Rahim Yar...Amil baba
 
Pharmacy management system project report..pdf
Pharmacy management system project report..pdfPharmacy management system project report..pdf
Pharmacy management system project report..pdfKamal Acharya
 
ENERGY STORAGE DEVICES INTRODUCTION UNIT-I
ENERGY STORAGE DEVICES  INTRODUCTION UNIT-IENERGY STORAGE DEVICES  INTRODUCTION UNIT-I
ENERGY STORAGE DEVICES INTRODUCTION UNIT-IVigneshvaranMech
 
Halogenation process of chemical process industries
Halogenation process of chemical process industriesHalogenation process of chemical process industries
Halogenation process of chemical process industriesMuhammadTufail242431
 
ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdfAhmedHussein950959
 
AI for workflow automation Use cases applications benefits and development.pdf
AI for workflow automation Use cases applications benefits and development.pdfAI for workflow automation Use cases applications benefits and development.pdf
AI for workflow automation Use cases applications benefits and development.pdfmahaffeycheryld
 
Cloud-Computing_CSE311_Computer-Networking CSE GUB BD - Shahidul.pptx
Cloud-Computing_CSE311_Computer-Networking CSE GUB BD - Shahidul.pptxCloud-Computing_CSE311_Computer-Networking CSE GUB BD - Shahidul.pptx
Cloud-Computing_CSE311_Computer-Networking CSE GUB BD - Shahidul.pptxMd. Shahidul Islam Prodhan
 
A case study of cinema management system project report..pdf
A case study of cinema management system project report..pdfA case study of cinema management system project report..pdf
A case study of cinema management system project report..pdfKamal Acharya
 
Arduino based vehicle speed tracker project
Arduino based vehicle speed tracker projectArduino based vehicle speed tracker project
Arduino based vehicle speed tracker projectRased Khan
 
ONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdf
ONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdfONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdf
ONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdfKamal Acharya
 
RS Khurmi Machine Design Clutch and Brake Exercise Numerical Solutions
RS Khurmi Machine Design Clutch and Brake Exercise Numerical SolutionsRS Khurmi Machine Design Clutch and Brake Exercise Numerical Solutions
RS Khurmi Machine Design Clutch and Brake Exercise Numerical SolutionsAtif Razi
 
Laundry management system project report.pdf
Laundry management system project report.pdfLaundry management system project report.pdf
Laundry management system project report.pdfKamal Acharya
 

Recently uploaded (20)

retail automation billing system ppt.pptx
retail automation billing system ppt.pptxretail automation billing system ppt.pptx
retail automation billing system ppt.pptx
 
Automobile Management System Project Report.pdf
Automobile Management System Project Report.pdfAutomobile Management System Project Report.pdf
Automobile Management System Project Report.pdf
 
Online blood donation management system project.pdf
Online blood donation management system project.pdfOnline blood donation management system project.pdf
Online blood donation management system project.pdf
 
Hall booking system project report .pdf
Hall booking system project report  .pdfHall booking system project report  .pdf
Hall booking system project report .pdf
 
Quality defects in TMT Bars, Possible causes and Potential Solutions.
Quality defects in TMT Bars, Possible causes and Potential Solutions.Quality defects in TMT Bars, Possible causes and Potential Solutions.
Quality defects in TMT Bars, Possible causes and Potential Solutions.
 
Explosives Industry manufacturing process.pdf
Explosives Industry manufacturing process.pdfExplosives Industry manufacturing process.pdf
Explosives Industry manufacturing process.pdf
 
2024 DevOps Pro Europe - Growing at the edge
2024 DevOps Pro Europe - Growing at the edge2024 DevOps Pro Europe - Growing at the edge
2024 DevOps Pro Europe - Growing at the edge
 
Introduction to Machine Learning Unit-4 Notes for II-II Mechanical Engineering
Introduction to Machine Learning Unit-4 Notes for II-II Mechanical EngineeringIntroduction to Machine Learning Unit-4 Notes for II-II Mechanical Engineering
Introduction to Machine Learning Unit-4 Notes for II-II Mechanical Engineering
 
NO1 Pandit Amil Baba In Bahawalpur, Sargodha, Sialkot, Sheikhupura, Rahim Yar...
NO1 Pandit Amil Baba In Bahawalpur, Sargodha, Sialkot, Sheikhupura, Rahim Yar...NO1 Pandit Amil Baba In Bahawalpur, Sargodha, Sialkot, Sheikhupura, Rahim Yar...
NO1 Pandit Amil Baba In Bahawalpur, Sargodha, Sialkot, Sheikhupura, Rahim Yar...
 
Pharmacy management system project report..pdf
Pharmacy management system project report..pdfPharmacy management system project report..pdf
Pharmacy management system project report..pdf
 
ENERGY STORAGE DEVICES INTRODUCTION UNIT-I
ENERGY STORAGE DEVICES  INTRODUCTION UNIT-IENERGY STORAGE DEVICES  INTRODUCTION UNIT-I
ENERGY STORAGE DEVICES INTRODUCTION UNIT-I
 
Halogenation process of chemical process industries
Halogenation process of chemical process industriesHalogenation process of chemical process industries
Halogenation process of chemical process industries
 
ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
 
AI for workflow automation Use cases applications benefits and development.pdf
AI for workflow automation Use cases applications benefits and development.pdfAI for workflow automation Use cases applications benefits and development.pdf
AI for workflow automation Use cases applications benefits and development.pdf
 
Cloud-Computing_CSE311_Computer-Networking CSE GUB BD - Shahidul.pptx
Cloud-Computing_CSE311_Computer-Networking CSE GUB BD - Shahidul.pptxCloud-Computing_CSE311_Computer-Networking CSE GUB BD - Shahidul.pptx
Cloud-Computing_CSE311_Computer-Networking CSE GUB BD - Shahidul.pptx
 
A case study of cinema management system project report..pdf
A case study of cinema management system project report..pdfA case study of cinema management system project report..pdf
A case study of cinema management system project report..pdf
 
Arduino based vehicle speed tracker project
Arduino based vehicle speed tracker projectArduino based vehicle speed tracker project
Arduino based vehicle speed tracker project
 
ONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdf
ONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdfONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdf
ONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdf
 
RS Khurmi Machine Design Clutch and Brake Exercise Numerical Solutions
RS Khurmi Machine Design Clutch and Brake Exercise Numerical SolutionsRS Khurmi Machine Design Clutch and Brake Exercise Numerical Solutions
RS Khurmi Machine Design Clutch and Brake Exercise Numerical Solutions
 
Laundry management system project report.pdf
Laundry management system project report.pdfLaundry management system project report.pdf
Laundry management system project report.pdf
 

Communication primitives

  • 2. INTRODUCTION • High level constructs [Helps the program in using underlying communication network] • Two Types of Communication Models – Message passing – Remote Procedure Calls Preetha/ME-CSE/I
  • 3. Message Passing Method • Two basic communication primitives  SEND - Message & its Destination  RECEIVE - Source of msg &Buffer for storing the message • Client-Server Computation Model  Client sends Message to server and waits  Server replies after computation Preetha/ME-CSE/I
  • 4. Design issues Blocking vs Non blocking primitives Nonblocking • SEND primitive return the control to the user process as soon as the message is copied from user buffer to kernel buffer. • Advantage : Programs have maximum flexibility in performing computation and communication in any order. • Drawback : Programming becomes tricky and difficult . Blocking • SEND primitive does not return the control to the user process until message has been sent or acknowledgement has been received. • Advantage : Program behavior is predictable. • Drawback : Lack of flexibility in programming.Preetha/ME-CSE/I
  • 5. Cont… Synchronous vs Asynchronous Primitives Synchronous • SEND primitive is blocked until corresponding RECEIVE primitive is executed at the target computer. • Also known as rendezvous. Asynchronous • Messages are buffered. • SEND primitive does not block even if there is no corresponding execution of the RECEIVE primitive. • The corresponding RECEIVE primitive can be either blocking or non-blocking. • Drawback : buffering message is more complex , as it involves creating , manging &destroying buffers.Preetha/ME-CSE/I
  • 6. Details to be handled in Message Passing • Pairing of Response with Requests • Data Representation • Sender should know the address of Remote machine • Communication and System failures Preetha/ME-CSE/I
  • 7. Remote procedure call (RPC) • RPC is a protocol that one program can use to request a service from a program located in another computer in a network without having to understand network details. • RPC uses the client/server model. • The requesting program is a client and the service-providing program is the server. Preetha/ME-CSE/I
  • 8. Cont.. • The main idea of an RPC is to allow a local computer (client) to remotely call procedures on a remote computer (server). • RPC is an interaction between a client and a server. • Client invokes procedure on sever. • Server executes the procedure and pass the result back to client. • Calling process is suspended and proceeds only after getting the result from server. Preetha/ME-CSE/I
  • 10. RPC design issues • Structure • Binding • Parameter and Result Passing • Error handling, semantics and Correctness Preetha/ME-CSE/I
  • 11. Structure Stub : It is a piece of code used for converting parameters passed during a RPC. Client stub procedure : • constructs a message containing identity of remote procedures & parameters. • sends the message to remote server machine. Server stub procedures : • receives the message at remote machine side & passes the parameter to the procedure specified. • Upon completion, it passes the result back to the client-stub procedure ,which returns the result to the client. Preetha/ME-CSE/I
  • 12. Binding It is a process that determines the remote procedure & the machine on which it will be executed, upon a remote procedure invocation. Binding server :  Client-server model uses this server.  It stores the server machine addresses along with the services they provide. Preetha/ME-CSE/I
  • 13. Parameter and result passing 1. Stub procedures convert the parameters to remote machine format and pack them into a buffer . After the message is received , it must be unpacked. Problems :Conversion becomes expensive if it has to be done on every call. 2. Send the parameters along with a code identifying the format used so that receiver can do the conversion. Problems :Machine should know how to convert all the formats that can possibly be used and poor portability because whenever new representation is introduced into the system, existing s/w need to be updated. Preetha/ME-CSE/I
  • 14. Cont..  Each data type may have standard format in the message .Here ,sender convert data to standard format & receiver convert from standard format to its local representation.  Problem : arises if both sender and receiver use the same internal representation.  Another issue is passing parameter by value & reference .Passing parameter by value is simple but other is complicated Preetha/ME-CSE/I
  • 15. Error handling ,semantics & correctness RPC fails for two reasons:  Computer failure  Communication failure Semantics play a significant role in development of programs for distributes computation. RPC semantics :  “At least once” semantics  “exactly once” semantics  “At most once” semantics Preetha/ME-CSE/I
  • 16.  “At least once” semantics If RPC succeeds,it implies that atleast one execution of remote procedure has taken place at remote machine. Else 0,partial,one or more execution.  “exactly once” semantics If RPC succeeds,it implies that exactly one execution of remote procedure has taken place at remote machine. Else 0,partial,one execution.  “At most once” semantics Similar to exactly once semantics , in addition calls that do not terminate do not produce any side effects and also referred as Zero-or-one semantics. Preetha/ME-CSE/I