SlideShare a Scribd company logo
1 of 18
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

System models in distributed system
System models in distributed systemSystem models in distributed system
System models in distributed systemishapadhy
 
Architecture of operating system
Architecture of operating systemArchitecture of operating system
Architecture of operating systemSupriya Kumari
 
Publish subscribe model overview
Publish subscribe model overviewPublish subscribe model overview
Publish subscribe model overviewIshraq Al Fataftah
 
Security in distributed systems
Security in distributed systems Security in distributed systems
Security in distributed systems Haitham Ahmed
 
Routing algorithm
Routing algorithmRouting algorithm
Routing algorithmBushra M
 
Deadlock in Distributed Systems
Deadlock in Distributed SystemsDeadlock in Distributed Systems
Deadlock in Distributed SystemsPritom Saha Akash
 
distributed Computing system model
distributed Computing system modeldistributed Computing system model
distributed Computing system modelHarshad Umredkar
 
File models and file accessing models
File models and file accessing modelsFile models and file accessing models
File models and file accessing modelsishmecse13
 
Clock synchronization in distributed system
Clock synchronization in distributed systemClock synchronization in distributed system
Clock synchronization in distributed systemSunita Sahu
 
Inter Process Communication Presentation[1]
Inter Process Communication Presentation[1]Inter Process Communication Presentation[1]
Inter Process Communication Presentation[1]Ravindra Raju Kolahalam
 
ELEMENTS OF TRANSPORT PROTOCOL
ELEMENTS OF TRANSPORT PROTOCOLELEMENTS OF TRANSPORT PROTOCOL
ELEMENTS OF TRANSPORT PROTOCOLShashank Rustagi
 
3.2 partitioning methods
3.2 partitioning methods3.2 partitioning methods
3.2 partitioning methodsKrish_ver2
 
Issues in knowledge representation
Issues in knowledge representationIssues in knowledge representation
Issues in knowledge representationSravanthi Emani
 
Design issues for the layers
Design issues for the layersDesign issues for the layers
Design issues for the layersjayaprakash
 
Signals and Antennas in mobile computing
Signals and Antennas in mobile computingSignals and Antennas in mobile computing
Signals and Antennas in mobile computingMadhuri Badgujar
 

What's hot (20)

System models in distributed system
System models in distributed systemSystem models in distributed system
System models in distributed system
 
Architecture of operating system
Architecture of operating systemArchitecture of operating system
Architecture of operating system
 
Naming in Distributed System
Naming in Distributed SystemNaming in Distributed System
Naming in Distributed System
 
Publish subscribe model overview
Publish subscribe model overviewPublish subscribe model overview
Publish subscribe model overview
 
Security in distributed systems
Security in distributed systems Security in distributed systems
Security in distributed systems
 
Routing algorithm
Routing algorithmRouting algorithm
Routing algorithm
 
Deadlock in Distributed Systems
Deadlock in Distributed SystemsDeadlock in Distributed Systems
Deadlock in Distributed Systems
 
Google App Engine
Google App EngineGoogle App Engine
Google App Engine
 
distributed Computing system model
distributed Computing system modeldistributed Computing system model
distributed Computing system model
 
File models and file accessing models
File models and file accessing modelsFile models and file accessing models
File models and file accessing models
 
Clock synchronization in distributed system
Clock synchronization in distributed systemClock synchronization in distributed system
Clock synchronization in distributed system
 
Inter Process Communication Presentation[1]
Inter Process Communication Presentation[1]Inter Process Communication Presentation[1]
Inter Process Communication Presentation[1]
 
ELEMENTS OF TRANSPORT PROTOCOL
ELEMENTS OF TRANSPORT PROTOCOLELEMENTS OF TRANSPORT PROTOCOL
ELEMENTS OF TRANSPORT PROTOCOL
 
Common Standards in Cloud Computing
Common Standards in Cloud ComputingCommon Standards in Cloud Computing
Common Standards in Cloud Computing
 
Message passing in Distributed Computing Systems
Message passing in Distributed Computing SystemsMessage passing in Distributed Computing Systems
Message passing in Distributed Computing Systems
 
3.2 partitioning methods
3.2 partitioning methods3.2 partitioning methods
3.2 partitioning methods
 
Issues in knowledge representation
Issues in knowledge representationIssues in knowledge representation
Issues in knowledge representation
 
Design issues for the layers
Design issues for the layersDesign issues for the layers
Design issues for the layers
 
Concept learning
Concept learningConcept learning
Concept learning
 
Signals and Antennas in mobile computing
Signals and Antennas in mobile computingSignals and Antennas in mobile computing
Signals and Antennas in mobile computing
 

Viewers also liked

Habits for computer
Habits for computerHabits for computer
Habits for computerMayank Garg
 
Distributes objects and Rmi
Distributes objects and RmiDistributes objects and Rmi
Distributes objects and RmiMayank Jain
 
B trees in Data Structure
B trees in Data StructureB trees in Data Structure
B trees in Data StructureAnuj Modi
 
Aggrement protocols
Aggrement protocolsAggrement protocols
Aggrement protocolsMayank Jain
 
Unit 1 architecture of distributed systems
Unit 1 architecture of distributed systemsUnit 1 architecture of distributed systems
Unit 1 architecture of distributed systemskaran2190
 

Viewers also liked (6)

Habits for computer
Habits for computerHabits for computer
Habits for computer
 
Distributes objects and Rmi
Distributes objects and RmiDistributes objects and Rmi
Distributes objects and Rmi
 
Distributed deadlock
Distributed deadlockDistributed deadlock
Distributed deadlock
 
B trees in Data Structure
B trees in Data StructureB trees in Data Structure
B trees in Data Structure
 
Aggrement protocols
Aggrement protocolsAggrement protocols
Aggrement protocols
 
Unit 1 architecture of distributed systems
Unit 1 architecture of distributed systemsUnit 1 architecture of distributed systems
Unit 1 architecture of distributed systems
 

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
 
RPC: Remote procedure call
RPC: Remote procedure callRPC: Remote procedure call
RPC: Remote procedure callSunita Sahu
 
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
 

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
 
RPC: Remote procedure call
RPC: Remote procedure callRPC: Remote procedure call
RPC: Remote procedure call
 
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
 

Recently uploaded

Intro To Electric Vehicles PDF Notes.pdf
Intro To Electric Vehicles PDF Notes.pdfIntro To Electric Vehicles PDF Notes.pdf
Intro To Electric Vehicles PDF Notes.pdfrs7054576148
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . pptDineshKumar4165
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfKamal Acharya
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoorTop Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoordharasingh5698
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxJuliansyahHarahap1
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...tanu pandey
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01KreezheaRecto
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapRishantSharmaFr
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXssuser89054b
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringmulugeta48
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfRagavanV2
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...Call Girls in Nagpur High Profile
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptMsecMca
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptNANDHAKUMARA10
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfJiananWang21
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startQuintin Balsdon
 

Recently uploaded (20)

Intro To Electric Vehicles PDF Notes.pdf
Intro To Electric Vehicles PDF Notes.pdfIntro To Electric Vehicles PDF Notes.pdf
Intro To Electric Vehicles PDF Notes.pdf
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoorTop Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01
 
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced LoadsFEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.ppt
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 

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