SlideShare a Scribd company logo
CS9222 Advanced Operating
System
Unit – II
Dr.A.Kathirvel
Professor & Head/IT - VCEW
Unit - II
Introduction – Issues – Communication Primitives –
Inherent Limitations - Lamport’s Logical Clock; Vector
Clock; Causal Ordering; Global State; Cuts;
Termination Detection. Distributed Mutual Exclusion
– Non-Token Based Algorithms – Lamport’s
Algorithm - Token-Based Algorithms – Suzuki-
Kasami’s Broadcast Algorithm – Distributed Deadlock
Detection – Issues – Centralized Deadlock-Detection
Algorithms - Distributed Deadlock-Detection
Algorithms. Agreement Protocols – Classification -
Solutions –Applications.
What is Distributed Systems?
Distributed System is used to describe a
system with the following characteristics:
Consists of several computers that do not
share a memory or a clock;
The computers communicate with each other
by exchanging messages over a
communication network; and
Each computer has its own memory and runs
its own operating system.
Architecture of Distributed OS
What is Distributed Operating Systems?
It extends the concepts of resource management and
user friendly interface for shared memory computers a
step further, encompassing a distributed computing
system consisting of several autonomous computers
connected by a communicating network.
A distributed OS is one that looks to its users like an
centralized OS but runs on multiple, independent CPUs.
The key concept is transparency. In other words, the use
of multiple processors should be invisible to the user
Issues in Distributed OS
Global Knowledge
Naming
Scalability
Compatibility
Process Synchronization
Resource Management
Security
Structuring
Global Knowledge
No Global Memory
No Global Clock
Unpredictable Message Delays
Naming
Name refers to objects [ Files, Computers etc]
Name Service Maps logical name to physical
address
Techniques
LookUp Tables [Directories]
Algorithmic
Combination of above two
Scalability
Grow with time
Scaling Dimensions – Size, Geographically &
Administratively
Techniques – Hiding Communication
Latencies, Distribution & Caching
Scaling Techniques (1)
Hide Communication Latencies
1.4
The difference between letting:
a) a server or
b) a client check forms as they are being filled Scalability cont….
Scaling Techniques (2)
Distribution
1.5
An example of dividing the DNS name space into zones.
Scalability cont….
Scaling Techniques (3)
Replication
Replicate components across the distributed
system
Replication increases availability , balancing
load distribution
Consistency problem has to be handled
Compatibility
Interoperability among resources in system
Levels of Compatibility – Binary Level,
Execution Level & Protocol Level
Process Synchronization
Difficult because of unavailability of shared
memory
Mutual Exclusion Problem
Resource Management
Make both local and remote resources
available
Specific Location of resource should be hidden
from user
Techniques
Data Migration [DFS, DSM]
Computation Migration [RPC]
Distributed Scheduling [ Load Balancing]
Security
Authentication – a entity is what it claims to
be
Authorization – what privileges an entity has
and making only those privileges available
Structuring
Techniques
Monolithic Kernel
Collective Kernel [Microkernel based , Mach, V-
Kernel, Chorus and Galaxy]
Object Oriented OS [Services are implemented as
objects, Eden, Choices, x-kernel, Medusa, Clouds,
Amoeba & Muse]
Client-Server Computing Model [Processes are
categorized as servers and clients]
Communication Primitives
High level constructs [Helps the program in
using underlying communication network]
Two Types of Communication Models
Message passing
Remote Procedure Calls
Message Passing
Two basic communication primitives
SEND(a,b) , a Message , b Destination
RECEIVE(c,d), c Source , d Buffer for storing the
message
Client-Server Computation Model
Client sends Message to server and waits
Server replies after computation
Message Passing cont..
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’s behavior is predictable
 Drawback  Lack of flexibility in programming
Message Passing cont..
Design Issues cont..
 Synchronous vs Asynchronous Primitives
 Synchronous
 SEND primitive is blocked until corresponding RECEIVE primitive
is executed at the target computer
 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
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
Remote Procedure Call (RPC)
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
RPC Design issues
Structure
Binding
Parameter and Result Passing
Error handling, semantics and Correctness
Structure
RPC mechanism is based upon stub procedures.
Unpack
Execute
Procedure
Stub
Procedure
Remote
Procedure
Return
Pack
result
Local
Procedure
Call
Local
Procedure
Call
User
Program
Stub
Procedure
Pack
parameters
& Transmit
wait
Unpack
Result
Return
from local
call
Client Machine
Server Machine
Binding
Determines remote procedure and machine
on which it will be executed
Check compatibility of the parameters passed
Use Binding Server
Binding
Binding Server
Receive
Query
Return
Server
Address Unpack
Stub
Procedure
Remote
Procedure
Return
Pack
result
Local
Procedure
Call
Local
Procedure
Call
Binding
Server
User
Program
Stub
Procedure
Pack
parameters
& Transmit
wait
Unpack
Result
Return
from local
call
Client Machine
Server Machine
Registering
Services
1
2
3
4
5
6
7
8
Parameter and Result Passing
 Stub Procedures Convert Parameters & Result to appropriate
form
 Pack parameters into a buffer
 Receiver Stub Unpacks the parameters
 Expensive if done on every call
 Send Parameters along with code that helps to identify format
so that receiver can do conversion
 Alternatively Each data type may have a standard format.
Sender will convert data to standard format and receiver will
convert from standard format to its local representation
 Passing Parameters by Reference
Error handling, Semantics and Correctness
 RPC may fail either due to computer or communication failure
 If the remote server is slow the program invoking remote
procedure may call it twice.
 If client crashes after sending RPC message
 If client recovers quickly after crash and reissues RPC
 Orphan Execution of Remote procedures
 RPC Semantics
 At least once semantics
 Exactly Once
 At most once
Correctness Condition
Given by Panzieri & Srivastava
Let Ci denote call made by machine & Wi
represents corresponding computation
If C2 happened after C1 ( C1  C2) &
Computations W2 & W1 share the same data,
then to be correct in the presence of failures
RPC should satisfy
 C1  C2 implies W1  W2

More Related Content

What's hot (20)

PPTX
Distributed file system
Anamika Singh
 
PPTX
Symmetric and asymmetric key
Triad Square InfoSec
 
PPTX
2. Distributed Systems Hardware & Software concepts
Prajakta Rane
 
PPT
File replication
Klawal13
 
PPTX
Lecture 3 threads
Kumbirai Junior Muzavazi
 
PDF
Introduction to distributed file systems
Viet-Trung TRAN
 
PPT
Disk scheduling
NEERAJ BAGHEL
 
PPT
Security Attacks.ppt
Zaheer720515
 
PPTX
Synchronization in distributed computing
SVijaylakshmi
 
PPTX
Fault tolerance in distributed systems
sumitjain2013
 
PPTX
message passing vs shared memory
Hamza Zahid
 
PPT
Lecture 6
Mr SMAK
 
PPTX
Message and Stream Oriented Communication
Dilum Bandara
 
PDF
Distributed Systems Naming
Ahmed Magdy Ezzeldin, MSc.
 
PPTX
Error control
Bhupendra sahu
 
PPTX
Message passing in Distributed Computing Systems
Alagappa Govt Arts College, Karaikudi
 
PDF
operating system structure
Waseem Ud Din Farooqui
 
PPTX
Transmission Control Protocol (TCP)
k33a
 
PPTX
Amoeba distributed operating System
Saurabh Gupta
 
Distributed file system
Anamika Singh
 
Symmetric and asymmetric key
Triad Square InfoSec
 
2. Distributed Systems Hardware & Software concepts
Prajakta Rane
 
File replication
Klawal13
 
Lecture 3 threads
Kumbirai Junior Muzavazi
 
Introduction to distributed file systems
Viet-Trung TRAN
 
Disk scheduling
NEERAJ BAGHEL
 
Security Attacks.ppt
Zaheer720515
 
Synchronization in distributed computing
SVijaylakshmi
 
Fault tolerance in distributed systems
sumitjain2013
 
message passing vs shared memory
Hamza Zahid
 
Lecture 6
Mr SMAK
 
Message and Stream Oriented Communication
Dilum Bandara
 
Distributed Systems Naming
Ahmed Magdy Ezzeldin, MSc.
 
Error control
Bhupendra sahu
 
Message passing in Distributed Computing Systems
Alagappa Govt Arts College, Karaikudi
 
operating system structure
Waseem Ud Din Farooqui
 
Transmission Control Protocol (TCP)
k33a
 
Amoeba distributed operating System
Saurabh Gupta
 

Viewers also liked (8)

PDF
Os Question Bank
Sonali Chauhan
 
PDF
Final Exam OS fall 2012-2013 with answers
Arab Open University and Cairo University
 
PPT
Advanced Operating System- Introduction
Debasis Das
 
DOCX
Complete Operating System notes
Lakshmi Sarvani Videla
 
PPT
Advanced Operating System Lecture Notes
Anirudhan Guru
 
PDF
Operating system notes pdf
Jasleen Kaur (Chandigarh University)
 
DOCX
Operating system notes
SANTOSH RATH
 
PDF
SOLUTION MANUAL OF OPERATING SYSTEM CONCEPTS BY ABRAHAM SILBERSCHATZ, PETER B...
vtunotesbysree
 
Os Question Bank
Sonali Chauhan
 
Final Exam OS fall 2012-2013 with answers
Arab Open University and Cairo University
 
Advanced Operating System- Introduction
Debasis Das
 
Complete Operating System notes
Lakshmi Sarvani Videla
 
Advanced Operating System Lecture Notes
Anirudhan Guru
 
Operating system notes pdf
Jasleen Kaur (Chandigarh University)
 
Operating system notes
SANTOSH RATH
 
SOLUTION MANUAL OF OPERATING SYSTEM CONCEPTS BY ABRAHAM SILBERSCHATZ, PETER B...
vtunotesbysree
 
Ad

Similar to CS9222 ADVANCED OPERATING SYSTEMS (20)

PDF
Client Server Model and Distributed Computing
Abhishek Jaisingh
 
PPT
Distributed OPERATING SYSTEM FOR BACHELOR OF BUSINESS INFORMATION TECHNOLOGY
reginamutio48
 
PPTX
Chapter16 new
vmummaneni
 
PPTX
Distributed, Network System and RPC.pptx
vikrammadhad2446
 
PPTX
CHP-4.pptx
FamiDan
 
PPT
UNIT-1 Introduction to Distributed SystemPPT.ppt
cnpnraja
 
PPTX
Message Passing, Remote Procedure Calls and Distributed Shared Memory as Com...
Sehrish Asif
 
PPTX
COMPLEXITY CHAPTER 4 LECTURE FOR FOURTH YEAR .pptx
RadielKassa
 
PPTX
CST 402 Distributed Computing Module 1 Notes
sm8i4
 
PDF
DistributedOSintro.pdf from CSE Distributed operating system
sikhinamnagamani
 
PDF
Task communication
1jayanti
 
PPT
characteristicsofdistributedsystem-121004123308-phpapp02.ppt
RamkumardevendiranDe
 
PPT
Chapter 3-Processes.ppt
sirajmohammed35
 
PPTX
Chap-3- Process.pptx distributive system
Tofikmohammed5
 
PPTX
Presentation of ditributed system
google
 
PPTX
Middleware in Distributed System-RPC,RMI
Prajakta Rane
 
PPTX
Distributed Objects and Remote Invocation
Medicaps University
 
PPTX
Dos(rpc)avishek130650107020
Avishek Sarkar
 
PPT
2.communcation in distributed system
Gd Goenka University
 
PPT
itwiki.pptFRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRY...
pratimarani3
 
Client Server Model and Distributed Computing
Abhishek Jaisingh
 
Distributed OPERATING SYSTEM FOR BACHELOR OF BUSINESS INFORMATION TECHNOLOGY
reginamutio48
 
Chapter16 new
vmummaneni
 
Distributed, Network System and RPC.pptx
vikrammadhad2446
 
CHP-4.pptx
FamiDan
 
UNIT-1 Introduction to Distributed SystemPPT.ppt
cnpnraja
 
Message Passing, Remote Procedure Calls and Distributed Shared Memory as Com...
Sehrish Asif
 
COMPLEXITY CHAPTER 4 LECTURE FOR FOURTH YEAR .pptx
RadielKassa
 
CST 402 Distributed Computing Module 1 Notes
sm8i4
 
DistributedOSintro.pdf from CSE Distributed operating system
sikhinamnagamani
 
Task communication
1jayanti
 
characteristicsofdistributedsystem-121004123308-phpapp02.ppt
RamkumardevendiranDe
 
Chapter 3-Processes.ppt
sirajmohammed35
 
Chap-3- Process.pptx distributive system
Tofikmohammed5
 
Presentation of ditributed system
google
 
Middleware in Distributed System-RPC,RMI
Prajakta Rane
 
Distributed Objects and Remote Invocation
Medicaps University
 
Dos(rpc)avishek130650107020
Avishek Sarkar
 
2.communcation in distributed system
Gd Goenka University
 
itwiki.pptFRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRY...
pratimarani3
 
Ad

More from Kathirvel Ayyaswamy (20)

PDF
22CS201 COA
Kathirvel Ayyaswamy
 
PDF
22cs201 COMPUTER ORGANIZATION AND ARCHITECTURE
Kathirvel Ayyaswamy
 
PDF
22CS201 COA
Kathirvel Ayyaswamy
 
PDF
18CS3040_Distributed Systems
Kathirvel Ayyaswamy
 
PDF
20CS2021-Distributed Computing module 2
Kathirvel Ayyaswamy
 
PDF
18CS3040 Distributed System
Kathirvel Ayyaswamy
 
PDF
20CS2021 Distributed Computing
Kathirvel Ayyaswamy
 
PDF
20CS2021 DISTRIBUTED COMPUTING
Kathirvel Ayyaswamy
 
PDF
18CS3040 DISTRIBUTED SYSTEMS
Kathirvel Ayyaswamy
 
PDF
Recent Trends in IoT and Sustainability
Kathirvel Ayyaswamy
 
PDF
20CS2008 Computer Networks
Kathirvel Ayyaswamy
 
PDF
18CS2005 Cryptography and Network Security
Kathirvel Ayyaswamy
 
PDF
18CS2005 Cryptography and Network Security
Kathirvel Ayyaswamy
 
PDF
18CS2005 Cryptography and Network Security
Kathirvel Ayyaswamy
 
PDF
18CS2005 Cryptography and Network Security
Kathirvel Ayyaswamy
 
PDF
18CS2005 Cryptography and Network Security
Kathirvel Ayyaswamy
 
PDF
18CS2005 Cryptography and Network Security
Kathirvel Ayyaswamy
 
PDF
20CS2008 Computer Networks
Kathirvel Ayyaswamy
 
PDF
20CS2008 Computer Networks
Kathirvel Ayyaswamy
 
PDF
20CS024 Ethics in Information Technology
Kathirvel Ayyaswamy
 
22CS201 COA
Kathirvel Ayyaswamy
 
22cs201 COMPUTER ORGANIZATION AND ARCHITECTURE
Kathirvel Ayyaswamy
 
22CS201 COA
Kathirvel Ayyaswamy
 
18CS3040_Distributed Systems
Kathirvel Ayyaswamy
 
20CS2021-Distributed Computing module 2
Kathirvel Ayyaswamy
 
18CS3040 Distributed System
Kathirvel Ayyaswamy
 
20CS2021 Distributed Computing
Kathirvel Ayyaswamy
 
20CS2021 DISTRIBUTED COMPUTING
Kathirvel Ayyaswamy
 
18CS3040 DISTRIBUTED SYSTEMS
Kathirvel Ayyaswamy
 
Recent Trends in IoT and Sustainability
Kathirvel Ayyaswamy
 
20CS2008 Computer Networks
Kathirvel Ayyaswamy
 
18CS2005 Cryptography and Network Security
Kathirvel Ayyaswamy
 
18CS2005 Cryptography and Network Security
Kathirvel Ayyaswamy
 
18CS2005 Cryptography and Network Security
Kathirvel Ayyaswamy
 
18CS2005 Cryptography and Network Security
Kathirvel Ayyaswamy
 
18CS2005 Cryptography and Network Security
Kathirvel Ayyaswamy
 
18CS2005 Cryptography and Network Security
Kathirvel Ayyaswamy
 
20CS2008 Computer Networks
Kathirvel Ayyaswamy
 
20CS2008 Computer Networks
Kathirvel Ayyaswamy
 
20CS024 Ethics in Information Technology
Kathirvel Ayyaswamy
 

Recently uploaded (20)

PDF
67243-Cooling and Heating & Calculation.pdf
DHAKA POLYTECHNIC
 
PDF
Air -Powered Car PPT by ER. SHRESTH SUDHIR KOKNE.pdf
SHRESTHKOKNE
 
PDF
Packaging Tips for Stainless Steel Tubes and Pipes
heavymetalsandtubes
 
PPTX
MULTI LEVEL DATA TRACKING USING COOJA.pptx
dollysharma12ab
 
PPTX
cybersecurityandthe importance of the that
JayachanduHNJc
 
PPTX
Precedence and Associativity in C prog. language
Mahendra Dheer
 
PDF
Biodegradable Plastics: Innovations and Market Potential (www.kiu.ac.ug)
publication11
 
PDF
勉強会資料_An Image is Worth More Than 16x16 Patches
NABLAS株式会社
 
PDF
Advanced LangChain & RAG: Building a Financial AI Assistant with Real-Time Data
Soufiane Sejjari
 
PPTX
business incubation centre aaaaaaaaaaaaaa
hodeeesite4
 
PPTX
Introduction to Fluid and Thermal Engineering
Avesahemad Husainy
 
PPTX
sunil mishra pptmmmmmmmmmmmmmmmmmmmmmmmmm
singhamit111
 
PDF
67243-Cooling and Heating & Calculation.pdf
DHAKA POLYTECHNIC
 
PPTX
filteration _ pre.pptx 11111110001.pptx
awasthivaibhav825
 
PDF
Introduction to Ship Engine Room Systems.pdf
Mahmoud Moghtaderi
 
PDF
CAD-CAM U-1 Combined Notes_57761226_2025_04_22_14_40.pdf
shailendrapratap2002
 
PPTX
Online Cab Booking and Management System.pptx
diptipaneri80
 
PDF
STUDY OF NOVEL CHANNEL MATERIALS USING III-V COMPOUNDS WITH VARIOUS GATE DIEL...
ijoejnl
 
PPTX
Module2 Data Base Design- ER and NF.pptx
gomathisankariv2
 
PDF
2010_Book_EnvironmentalBioengineering (1).pdf
EmilianoRodriguezTll
 
67243-Cooling and Heating & Calculation.pdf
DHAKA POLYTECHNIC
 
Air -Powered Car PPT by ER. SHRESTH SUDHIR KOKNE.pdf
SHRESTHKOKNE
 
Packaging Tips for Stainless Steel Tubes and Pipes
heavymetalsandtubes
 
MULTI LEVEL DATA TRACKING USING COOJA.pptx
dollysharma12ab
 
cybersecurityandthe importance of the that
JayachanduHNJc
 
Precedence and Associativity in C prog. language
Mahendra Dheer
 
Biodegradable Plastics: Innovations and Market Potential (www.kiu.ac.ug)
publication11
 
勉強会資料_An Image is Worth More Than 16x16 Patches
NABLAS株式会社
 
Advanced LangChain & RAG: Building a Financial AI Assistant with Real-Time Data
Soufiane Sejjari
 
business incubation centre aaaaaaaaaaaaaa
hodeeesite4
 
Introduction to Fluid and Thermal Engineering
Avesahemad Husainy
 
sunil mishra pptmmmmmmmmmmmmmmmmmmmmmmmmm
singhamit111
 
67243-Cooling and Heating & Calculation.pdf
DHAKA POLYTECHNIC
 
filteration _ pre.pptx 11111110001.pptx
awasthivaibhav825
 
Introduction to Ship Engine Room Systems.pdf
Mahmoud Moghtaderi
 
CAD-CAM U-1 Combined Notes_57761226_2025_04_22_14_40.pdf
shailendrapratap2002
 
Online Cab Booking and Management System.pptx
diptipaneri80
 
STUDY OF NOVEL CHANNEL MATERIALS USING III-V COMPOUNDS WITH VARIOUS GATE DIEL...
ijoejnl
 
Module2 Data Base Design- ER and NF.pptx
gomathisankariv2
 
2010_Book_EnvironmentalBioengineering (1).pdf
EmilianoRodriguezTll
 

CS9222 ADVANCED OPERATING SYSTEMS

  • 1. CS9222 Advanced Operating System Unit – II Dr.A.Kathirvel Professor & Head/IT - VCEW
  • 2. Unit - II Introduction – Issues – Communication Primitives – Inherent Limitations - Lamport’s Logical Clock; Vector Clock; Causal Ordering; Global State; Cuts; Termination Detection. Distributed Mutual Exclusion – Non-Token Based Algorithms – Lamport’s Algorithm - Token-Based Algorithms – Suzuki- Kasami’s Broadcast Algorithm – Distributed Deadlock Detection – Issues – Centralized Deadlock-Detection Algorithms - Distributed Deadlock-Detection Algorithms. Agreement Protocols – Classification - Solutions –Applications.
  • 3. What is Distributed Systems? Distributed System is used to describe a system with the following characteristics: Consists of several computers that do not share a memory or a clock; The computers communicate with each other by exchanging messages over a communication network; and Each computer has its own memory and runs its own operating system.
  • 5. What is Distributed Operating Systems? It extends the concepts of resource management and user friendly interface for shared memory computers a step further, encompassing a distributed computing system consisting of several autonomous computers connected by a communicating network. A distributed OS is one that looks to its users like an centralized OS but runs on multiple, independent CPUs. The key concept is transparency. In other words, the use of multiple processors should be invisible to the user
  • 6. Issues in Distributed OS Global Knowledge Naming Scalability Compatibility Process Synchronization Resource Management Security Structuring
  • 7. Global Knowledge No Global Memory No Global Clock Unpredictable Message Delays
  • 8. Naming Name refers to objects [ Files, Computers etc] Name Service Maps logical name to physical address Techniques LookUp Tables [Directories] Algorithmic Combination of above two
  • 9. Scalability Grow with time Scaling Dimensions – Size, Geographically & Administratively Techniques – Hiding Communication Latencies, Distribution & Caching
  • 10. Scaling Techniques (1) Hide Communication Latencies 1.4 The difference between letting: a) a server or b) a client check forms as they are being filled Scalability cont….
  • 11. Scaling Techniques (2) Distribution 1.5 An example of dividing the DNS name space into zones. Scalability cont….
  • 12. Scaling Techniques (3) Replication Replicate components across the distributed system Replication increases availability , balancing load distribution Consistency problem has to be handled
  • 13. Compatibility Interoperability among resources in system Levels of Compatibility – Binary Level, Execution Level & Protocol Level
  • 14. Process Synchronization Difficult because of unavailability of shared memory Mutual Exclusion Problem
  • 15. Resource Management Make both local and remote resources available Specific Location of resource should be hidden from user Techniques Data Migration [DFS, DSM] Computation Migration [RPC] Distributed Scheduling [ Load Balancing]
  • 16. Security Authentication – a entity is what it claims to be Authorization – what privileges an entity has and making only those privileges available
  • 17. Structuring Techniques Monolithic Kernel Collective Kernel [Microkernel based , Mach, V- Kernel, Chorus and Galaxy] Object Oriented OS [Services are implemented as objects, Eden, Choices, x-kernel, Medusa, Clouds, Amoeba & Muse] Client-Server Computing Model [Processes are categorized as servers and clients]
  • 18. Communication Primitives High level constructs [Helps the program in using underlying communication network] Two Types of Communication Models Message passing Remote Procedure Calls
  • 19. Message Passing Two basic communication primitives SEND(a,b) , a Message , b Destination RECEIVE(c,d), c Source , d Buffer for storing the message Client-Server Computation Model Client sends Message to server and waits Server replies after computation Message Passing cont..
  • 20. 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’s behavior is predictable  Drawback  Lack of flexibility in programming Message Passing cont..
  • 21. Design Issues cont..  Synchronous vs Asynchronous Primitives  Synchronous  SEND primitive is blocked until corresponding RECEIVE primitive is executed at the target computer  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
  • 22. 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
  • 23. Remote Procedure Call (RPC) 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
  • 24. RPC Design issues Structure Binding Parameter and Result Passing Error handling, semantics and Correctness
  • 25. Structure RPC mechanism is based upon stub procedures. Unpack Execute Procedure Stub Procedure Remote Procedure Return Pack result Local Procedure Call Local Procedure Call User Program Stub Procedure Pack parameters & Transmit wait Unpack Result Return from local call Client Machine Server Machine
  • 26. Binding Determines remote procedure and machine on which it will be executed Check compatibility of the parameters passed Use Binding Server
  • 28. Parameter and Result Passing  Stub Procedures Convert Parameters & Result to appropriate form  Pack parameters into a buffer  Receiver Stub Unpacks the parameters  Expensive if done on every call  Send Parameters along with code that helps to identify format so that receiver can do conversion  Alternatively Each data type may have a standard format. Sender will convert data to standard format and receiver will convert from standard format to its local representation  Passing Parameters by Reference
  • 29. Error handling, Semantics and Correctness  RPC may fail either due to computer or communication failure  If the remote server is slow the program invoking remote procedure may call it twice.  If client crashes after sending RPC message  If client recovers quickly after crash and reissues RPC  Orphan Execution of Remote procedures  RPC Semantics  At least once semantics  Exactly Once  At most once
  • 30. Correctness Condition Given by Panzieri & Srivastava Let Ci denote call made by machine & Wi represents corresponding computation If C2 happened after C1 ( C1  C2) & Computations W2 & W1 share the same data, then to be correct in the presence of failures RPC should satisfy  C1  C2 implies W1  W2