SlideShare a Scribd company logo
1 of 46
Message Passing
DESIGN ISSUES IN IPC BY MESSAGE
                    PASSING
 SYNCHRONIZATION
   ◦ BLOCKING PRIMITIVE (SYNCHRONOUS) : If its invocation
     blocks execution of its invoker
   ◦ NON-BLOCKING (ASYNCHRONOUS) : Does not block
     execution
2    cases
 1st case
   ◦ Blocking send
   ◦ Blocking Rec
 2nd   case
   ◦ Non-Blocking Send
   ◦ Non-Blocking Rec
ISSUES IN BLOCKING SEND

 Sending process could get blocked forever if receiving
  process crashes or message lost on the network due to
  communication failure

 Hence    it should use timeout values

 It   could be a parameter of “send” primitive
ISSUES IN BLOCKING RECEIVE
 Receiver process could get blocked forever if sending
  process crashes or message lost on the network due to
  communication failure

 Hence   it should use timeout values
ISSUES IN NON-BLOCKING RECEIVE

 How  the receiving process knows that the message has
 arrived in the message buffer?

 Done   by Polling or Interrupt

 ◦ POLLING: Receiver uses “test” primitive to allow it to
   check buffer status

 ◦ INTERRUPT : When message has arrived in the buffer, a
   s/w interrupt is used to notify the receiving process
SYNCHRONOUS COMMUNICATION

               Sender’s execution                     Receiver’s execution



         Send(message);                                   Receive(message);
    execution suspended                message            execution suspended


                                                           execution resumed


                                                           Send(acknowledgement)


     execution resumed              acknowledgement




Synchronous mode of communication with both send and receive
            primitives having blocking-type semantics
IMPLEMENTATION EASE

•   Synchronous communication is easy to implement

•   If message gets lost or is undelivered, no backward error
    recovery is required

•   Synchronous communication limits concurrency

•   Subject to communication deadlock
BUFFERING
 Messages   are transmitted from one process to another by
  copying the body of the message from the address space of
  sending process to address space of receiver process
  (possibly via address space of kernels of sending and
  receiving computers)

 In some cases, the receiver process may not be ready to
  receive a message but may want O.S. to save messages for
  later reception

 Message    buffering strategy related to synchronization
  strategy
  ◦ Synchronous Mode: Null /No Buffer
  ◦ Asynchronous Mode: Buffer with unbounded capacity
Null Buffering

 It  has two strategies
1st strategy
    – Message remains in SPAS (Sender Process Address
        Space) and the execution of send is delayed until the
        receiver executes the corresponding receive
    – After send, when ACK is received, it executes “send”
        again

2nd strategy
   – The message is simply discarded and the time out
        mechanism is used to resend message after a time out
        period
   – After executing send, sender process wait for an ACK
Single-Message Buffer
 Ifthe receiver is not ready, a message has to be
  transferred two or more times hence null buffer
  strategy is generally not suitable for synchronous
  communication

 Therefore,synchronous communication use a single-
  message buffer strategy

A  buffer having a capacity to store a single message is
  used on the receiver’s node
FINITE BOUND BUFFER
A   create-buffer system call is provided to the user.

 This system call when executed by a receiver process
  creates a buffer of a size specified by receiver either in
  kernel AS. or receiver process AS.




                                                               11
i.     Null buffer:   Sending Process   Receiving Process



                      Message




ii.    Single Message Buffer:



iii.   Multiple Message Buffer:

                 Message 1




                 Message n

                                                            12
ENCODING AND DECODING OF
             MESSAGE DATA
Structure of program/object should be preserved while they
  are being transmitted from address space of sending
  process to RPAS.

Difficult to achieve because
 Absolute ptr losses its meaning when transferred from one
  process AS to another
  ◦ Requires flattening and shaping of objects
 Receiver process should have a-priori knowledge of varying
  memory occupied by various data items


Due to above problems, program object not transferred in
 their original form. First converted to stream form by
 encoding.                                                     13
Two representation may be used for encoding and
Decoding

1.   Tagged Representation: Data object along with its type is
     encoded
2.   Untagged Representation: No information regarding data
     type.

 Untagged: SUN XDR (Extended Data Representation)
 Tagged: A.S.N (CCITT 1985)




                                                                 14
PROCESS ADDRESSING
 Process  addressing is naming of parties involved in
  interaction
 Two types of process Addressing:


1. Explicit   Addressing: The process with which
  communication is desired is explicitly named as a
  parameter
  ◦   Send (process-id, message)
  ◦   Receive (process-id, message)




                                                         15
Implicit Addressing
Does not explicitly name a process for communication

  ◦   Send_any (service_id, message)
  ◦   Send a message to any process that provides the service of
      type “service_id”

  ◦   Receive_any (process_id, message)
  ◦   Receive a message from any process and returns the
      “process_id” of the process from which the message was
      received.
PROCESS ADDRESSING (contd..)
 Simple  method to identify a process is by a combination of
  machine-id and local-id such as machine-id@local-id.
 Local-id can be process- id or port-id, that uniquely
  identifies a process on a machine.
 Machine-id is used by sending machine kernel to send the
  message to the receiver process machine.
 Eg: Berkely UNIX -32 bit Internet address for machine-id

                      -16 bit for local-id

 Drawback:  It does not allow a process to migrate from
  one machine to another in the case of heavy load.


                                                                17
I.   To overcome this limitation
      Machine-id ,     Local-id ,   Machine-id ,



     Node on which
     process created        Id of the process      Last known Node
                                                   Location of the process


               Never Change                               This may

      This type of adding is known as link based addressing.
      During Migration, a link Information (p-id + m/c id of new
      node) of the new node is left on previous node.
Drawbacks: i. Overload of locating a process if process has
      migrated several times.
ii. It may not be possible to locate a process if an intermediate
      node on which the process once residing during its lifetime
      is down.
                                                                             18
TWO LEVEL NAMING
     SCHEME FOR PROCESSES
 Each   process has two id:
  ◦ A high level name that is m/c independent (ASCII
    string)
  ◦ A low level name that is m/c dependent (m/c
    id@local id)
 A name server is used to maintain a mapping
  table.
 Now when a process wants to send a message to
  another process, it specifies high level name of the
  receiver process.


                                                         19
TWO LEVEL NAMING SCHEME
      FOR PROCESSES

The kernel of the m/c first contacts the
 name server to get low level name
Can also be used for FUNCTIONAL
 ADDRESSING
  High level name identifies a service
  instead of a process
Precaution of Replicating Name Server.
FAILURE HANDLING
•   Loss of Request message
•   Loss of Response Message
•   Unsuccessful execution of request

To overcome these problems
• A reliable IPC protocol of a message-passing system is
  designed.
• It is based on the ideas of internal retransmission of
  messages after time out and
• Return of an ACK to sending m/c kernel by receiver
  m/c kernel.

                                                           21
 The  time for which the sender waits is slightly more
   than the approximate round trip time + the average
   time required for executing the request
1. FOUR MESSAGE RELIABLE IPC Protocol




                             The four-message reliable IPC
                             protocol for client-server
                             communication between two
                             processes.




                                                             22
2. THREE MESSAGE RELIABLE IPC




                                 The three-message reliable IPC
                                 protocol for client-server
                                 communication between two
                                 processes.




  What  happens when request processing takes a long time?
  Answer: Server sends a separate ACK to acknowledge
   request message
3. TWO MESSAGE RELIABLE IPC




                                         The two-message IPC protocol
                                         used in many systems for client-
                                         server communication between
                                         two processes.




   When request received at servers machine, it starts a timer
   If server finishes processing the req. before time expires, reply acts
    as ACK
   Else a separate ACK is sent by kernel
Idempotency
Means  repeatibility
An Idempotent operation produces the
 same result without any side effects, no
 matter how many times it is performed
 with the same argument.

ISSUE   : Duplicate Requests
Handling of Duplicate Requests
Ifclient makes a request
Server processes the request
Client doesn't receive the response
After time out, again issues REQ


What   Happens?
Handling of Duplicate Requests
Use unique id for every REQ
Kernel on the server maintains a reply
 cache
Keeping Track of Lost and Out-of-Sequence
    Packets in Multidatagram Messages
Stop    n Wait Protocol
  ◦ ACK for each packet
Blast   Protocol
  ◦ Single ACK for all packets of multidatagram
    message
  ◦ Two fields in each packet – total no. of
    packets and seq no. of packet
  ◦ After timeout – Selective Repeat
Group Communication
A  group is a set of parties that, presumably, want
  to exchange information in a reliable, consistent
  manner.
 Group communication is a paradigm for multi-
  party communication that is based on the notion of
  groups as a main abstraction.
 For example:
  • The participants of a message-based
    conferencing tool may constitute a group.
  • If one message is a response to another, the
    original message should be delivered before the
    response.
Group Communication
1.       The set of replicas of a fault-tolerant database
         server may constitute a group.

     •    Consider update messages to the server. Since the
          contents of the database depend on the history of
          all update messages received, all updates must be
          delivered to all replicas. Furthermore, all updates
          must be delivered in the same order. Otherwise,
          inconsistencies may arise.
Group Communication
Following
         three types of group
 communication are popular:
 ◦ One to Many
 ◦ Many to One
 ◦ Many to Many
Message Delivery to Receiver Process
User   applications use high level group
 names in programs
Centralized group server (GS) maintains
 a mapping of high-level group names to
 their low level names
Group server also maintains a list of
 process identifier of all the processes for
 each group
Message Delivery to Receiver Process
When    a sender sends a message to a
 group specifying its high level name
Kernel contacts the GS to obtain low
 level name & p_id of processes belonging
 to that group
This list of p_id is inserted in the message
Buffered / Unbuffered Multicast
Multicastis a Asynchronous operation?
So which one to use
 ◦ BUFFERED or UNBUFFERED?
Reliability in Multicasting
Depends   on degree of reliability required
Sender of a multicast message can specify
 the number of receivers from which a
 response message is needed
This is expressed in the following form:
  ◦   0-reliable
  ◦   1-reliable
  ◦   ‘m’ out of ‘n’ reliable
  ◦   all reliable
Atomic Multicast
Thishas all or nothing property i.e. when
 a message is sent to a group, either all or
 none receive it.

Only   “all-reliable” kind of reliability needs
 this strict paradigm
Group Communication Primitives
Group communication is implemented using middleware
 that provides sets of primitives to the application.

  ◦ Multicast primitive (e.g., post): This primitive
    allows a sender to post a message to the entire
    group.
                     OR

  send() / send_group(): for “1 – 1” and “1 - m”
                         semantic

  Name Server or Group Server?
Group Communication Primitives
 ◦ Membership primitives

 ◦ e.g., join, leave, query_membership;

 ◦ These primitives allow a process to join or
   leave a particular group, as well as to
   query the group for the list of all current
   participants.
Mnay to One Comm. Issues
The single receiver may be selective or
 nonselective
 ◦ Selective –     Deterministic
 ◦ Non-selective – Non-Deterministic
Many to Many Comm. Issues
One   to many and many to one implicit in
 this scheme
Issue of ordered message delivery
Semantics of ordered delivery are:
 • Absolute Ordering
 • Consistent Ordering
 • Causal Ordering
Absolute Ordering
 Allmessages are delivered to all receiver processes in
  the exact order in which they were sent

 System   is assumed to have a clock at each machine and
  all clocks are synchronized with each other

 Here clock value is taken as the identifier of the
  message
Absolute Ordering
Consistent Ordering
 Absolute    ordering requires globally synchronized
  clocks, which are not easy to implement
 Consistent ordering ensures that all messages are
  delivered to all receiver processes in the same order
 Order may be different from the order in which
  messages were sent
 Sending machines send messages to a single receiver
  (sequencer) that assigns a sequence number to each
  message and then multicasts it
 Subject to single point of failure and hence has poor
  reliability
Consistent Ordering
Causal Ordering
 This ensures that if the event of sending one message is
  causally related to the event of sending another message,
  the two messages are delivered to all receivers in the
  correct order

 Two   message sending events are said to be causally
  related if they are corelated by happened-before relation
Causal Ordering

More Related Content

What's hot

Synchronization Pradeep K Sinha
Synchronization Pradeep K SinhaSynchronization Pradeep K Sinha
Synchronization Pradeep K SinhaJawwad Rafiq
 
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
 
Distributed system architecture
Distributed system architectureDistributed system architecture
Distributed system architectureYisal Khan
 
Structure of shared memory space
Structure of shared memory spaceStructure of shared memory space
Structure of shared memory spaceCoder Tech
 
Synchronization in distributed computing
Synchronization in distributed computingSynchronization in distributed computing
Synchronization in distributed computingSVijaylakshmi
 
Communications is distributed systems
Communications is distributed systemsCommunications is distributed systems
Communications is distributed systemsSHATHAN
 
distributed shared memory
 distributed shared memory distributed shared memory
distributed shared memoryAshish Kumar
 
Agreement Protocols, distributed File Systems, Distributed Shared Memory
Agreement Protocols, distributed File Systems, Distributed Shared MemoryAgreement Protocols, distributed File Systems, Distributed Shared Memory
Agreement Protocols, distributed File Systems, Distributed Shared MemorySHIKHA GAUTAM
 
distributed Computing system model
distributed Computing system modeldistributed Computing system model
distributed Computing system modelHarshad Umredkar
 
Distributed File Systems
Distributed File Systems Distributed File Systems
Distributed File Systems Maurvi04
 
Logical Clocks (Distributed computing)
Logical Clocks (Distributed computing)Logical Clocks (Distributed computing)
Logical Clocks (Distributed computing)Sri Prasanna
 
Distributed Transactions(flat and nested) and Atomic Commit Protocols
Distributed Transactions(flat and nested) and Atomic Commit ProtocolsDistributed Transactions(flat and nested) and Atomic Commit Protocols
Distributed Transactions(flat and nested) and Atomic Commit ProtocolsSachin Chauhan
 
CS9222 ADVANCED OPERATING SYSTEMS
CS9222 ADVANCED OPERATING SYSTEMSCS9222 ADVANCED OPERATING SYSTEMS
CS9222 ADVANCED OPERATING SYSTEMSKathirvel Ayyaswamy
 
Clock synchronization in distributed system
Clock synchronization in distributed systemClock synchronization in distributed system
Clock synchronization in distributed systemSunita Sahu
 
Distributed file system
Distributed file systemDistributed file system
Distributed file systemAnamika Singh
 
Chapter 4 a interprocess communication
Chapter 4 a interprocess communicationChapter 4 a interprocess communication
Chapter 4 a interprocess communicationAbDul ThaYyal
 

What's hot (20)

Synchronization Pradeep K Sinha
Synchronization Pradeep K SinhaSynchronization Pradeep K Sinha
Synchronization Pradeep K Sinha
 
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
 
Distributed system architecture
Distributed system architectureDistributed system architecture
Distributed system architecture
 
Structure of shared memory space
Structure of shared memory spaceStructure of shared memory space
Structure of shared memory space
 
Synchronization in distributed computing
Synchronization in distributed computingSynchronization in distributed computing
Synchronization in distributed computing
 
Communications is distributed systems
Communications is distributed systemsCommunications is distributed systems
Communications is distributed systems
 
3. challenges
3. challenges3. challenges
3. challenges
 
distributed shared memory
 distributed shared memory distributed shared memory
distributed shared memory
 
6.distributed shared memory
6.distributed shared memory6.distributed shared memory
6.distributed shared memory
 
Agreement Protocols, distributed File Systems, Distributed Shared Memory
Agreement Protocols, distributed File Systems, Distributed Shared MemoryAgreement Protocols, distributed File Systems, Distributed Shared Memory
Agreement Protocols, distributed File Systems, Distributed Shared Memory
 
distributed Computing system model
distributed Computing system modeldistributed Computing system model
distributed Computing system model
 
Distributed File Systems
Distributed File Systems Distributed File Systems
Distributed File Systems
 
Distributed deadlock
Distributed deadlockDistributed deadlock
Distributed deadlock
 
Logical Clocks (Distributed computing)
Logical Clocks (Distributed computing)Logical Clocks (Distributed computing)
Logical Clocks (Distributed computing)
 
Distributed Transactions(flat and nested) and Atomic Commit Protocols
Distributed Transactions(flat and nested) and Atomic Commit ProtocolsDistributed Transactions(flat and nested) and Atomic Commit Protocols
Distributed Transactions(flat and nested) and Atomic Commit Protocols
 
CS9222 ADVANCED OPERATING SYSTEMS
CS9222 ADVANCED OPERATING SYSTEMSCS9222 ADVANCED OPERATING SYSTEMS
CS9222 ADVANCED OPERATING SYSTEMS
 
Coda file system
Coda file systemCoda file system
Coda file system
 
Clock synchronization in distributed system
Clock synchronization in distributed systemClock synchronization in distributed system
Clock synchronization in distributed system
 
Distributed file system
Distributed file systemDistributed file system
Distributed file system
 
Chapter 4 a interprocess communication
Chapter 4 a interprocess communicationChapter 4 a interprocess communication
Chapter 4 a interprocess communication
 

Viewers also liked

Lecture 6
Lecture  6Lecture  6
Lecture 6Mr SMAK
 
message passing vs shared memory
message passing vs shared memorymessage passing vs shared memory
message passing vs shared memoryHamza Zahid
 
Scaling up food safety information transparency
Scaling up food safety information transparencyScaling up food safety information transparency
Scaling up food safety information transparencyNikos Manouselis
 
Distributed System Management
Distributed System ManagementDistributed System Management
Distributed System ManagementIbrahim Amer
 
Consistency in Distributed Systems
Consistency in Distributed SystemsConsistency in Distributed Systems
Consistency in Distributed SystemsShane Johnson
 
Reactive Revealed Part 2: Scalability, Elasticity and Location Transparency i...
Reactive Revealed Part 2: Scalability, Elasticity and Location Transparency i...Reactive Revealed Part 2: Scalability, Elasticity and Location Transparency i...
Reactive Revealed Part 2: Scalability, Elasticity and Location Transparency i...Legacy Typesafe (now Lightbend)
 
process management
 process management process management
process managementAshish Kumar
 
Consistency Models in New Generation Databases
Consistency Models in New Generation DatabasesConsistency Models in New Generation Databases
Consistency Models in New Generation Databasesiammutex
 
The elements of scale
The elements of scaleThe elements of scale
The elements of scaleFastly
 
Distributed systems and consistency
Distributed systems and consistencyDistributed systems and consistency
Distributed systems and consistencyseldo
 
3. distributed file system requirements
3. distributed file system requirements3. distributed file system requirements
3. distributed file system requirementsAbDul ThaYyal
 
Client-centric Consistency Models
Client-centric Consistency ModelsClient-centric Consistency Models
Client-centric Consistency ModelsEnsar Basri Kahveci
 
Distributed shared memory shyam soni
Distributed shared memory shyam soniDistributed shared memory shyam soni
Distributed shared memory shyam soniShyam Soni
 
Transparency - The Double-Edged Sword
Transparency - The Double-Edged SwordTransparency - The Double-Edged Sword
Transparency - The Double-Edged SwordAcando Consulting
 
Distributed & parallel system
Distributed & parallel systemDistributed & parallel system
Distributed & parallel systemManish Singh
 
Distributed Systems
Distributed SystemsDistributed Systems
Distributed SystemsRupsee
 
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 (20)

NUMA overview
NUMA overviewNUMA overview
NUMA overview
 
Lecture 6
Lecture  6Lecture  6
Lecture 6
 
message passing vs shared memory
message passing vs shared memorymessage passing vs shared memory
message passing vs shared memory
 
Scaling up food safety information transparency
Scaling up food safety information transparencyScaling up food safety information transparency
Scaling up food safety information transparency
 
Distributed System Management
Distributed System ManagementDistributed System Management
Distributed System Management
 
Scaling Scribd
Scaling ScribdScaling Scribd
Scaling Scribd
 
Consistency in Distributed Systems
Consistency in Distributed SystemsConsistency in Distributed Systems
Consistency in Distributed Systems
 
Reactive Revealed Part 2: Scalability, Elasticity and Location Transparency i...
Reactive Revealed Part 2: Scalability, Elasticity and Location Transparency i...Reactive Revealed Part 2: Scalability, Elasticity and Location Transparency i...
Reactive Revealed Part 2: Scalability, Elasticity and Location Transparency i...
 
Chap 4
Chap 4Chap 4
Chap 4
 
process management
 process management process management
process management
 
Consistency Models in New Generation Databases
Consistency Models in New Generation DatabasesConsistency Models in New Generation Databases
Consistency Models in New Generation Databases
 
The elements of scale
The elements of scaleThe elements of scale
The elements of scale
 
Distributed systems and consistency
Distributed systems and consistencyDistributed systems and consistency
Distributed systems and consistency
 
3. distributed file system requirements
3. distributed file system requirements3. distributed file system requirements
3. distributed file system requirements
 
Client-centric Consistency Models
Client-centric Consistency ModelsClient-centric Consistency Models
Client-centric Consistency Models
 
Distributed shared memory shyam soni
Distributed shared memory shyam soniDistributed shared memory shyam soni
Distributed shared memory shyam soni
 
Transparency - The Double-Edged Sword
Transparency - The Double-Edged SwordTransparency - The Double-Edged Sword
Transparency - The Double-Edged Sword
 
Distributed & parallel system
Distributed & parallel systemDistributed & parallel system
Distributed & parallel system
 
Distributed Systems
Distributed SystemsDistributed Systems
Distributed Systems
 
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 Message Passing Design Issues and Reliable Protocols

1 messagepassing-121015032028-phpapp01
1 messagepassing-121015032028-phpapp011 messagepassing-121015032028-phpapp01
1 messagepassing-121015032028-phpapp01Zaigham Abbas
 
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
 
Inter process communication by Dr.C.R.Dhivyaa, Assistant Professor,Kongu Engi...
Inter process communication by Dr.C.R.Dhivyaa, Assistant Professor,Kongu Engi...Inter process communication by Dr.C.R.Dhivyaa, Assistant Professor,Kongu Engi...
Inter process communication by Dr.C.R.Dhivyaa, Assistant Professor,Kongu Engi...Dhivyaa C.R
 
Message and Stream Oriented Communication
Message and Stream Oriented CommunicationMessage and Stream Oriented Communication
Message and Stream Oriented CommunicationDilum Bandara
 
Cs556 section3
Cs556 section3Cs556 section3
Cs556 section3farshad33
 
Middleware in Distributed System-RPC,RMI
Middleware in Distributed System-RPC,RMIMiddleware in Distributed System-RPC,RMI
Middleware in Distributed System-RPC,RMIPrajakta Rane
 
2.communcation in distributed system
2.communcation in distributed system2.communcation in distributed system
2.communcation in distributed systemGd Goenka University
 
DCS Unit-II COMMUNICATION AND COORDINATION.pdf
DCS Unit-II COMMUNICATION AND COORDINATION.pdfDCS Unit-II COMMUNICATION AND COORDINATION.pdf
DCS Unit-II COMMUNICATION AND COORDINATION.pdframeshwarchintamani
 
Message passing Programing and MPI.
Message passing Programing and MPI.Message passing Programing and MPI.
Message passing Programing and MPI.Munawar Hussain
 
Linux Inter Process Communication
Linux Inter Process CommunicationLinux Inter Process Communication
Linux Inter Process CommunicationAbhishek Sagar
 
CHP-4.pptx
CHP-4.pptxCHP-4.pptx
CHP-4.pptxFamiDan
 
Computer Communication Networks- Introduction to Transport layer
Computer Communication Networks- Introduction to Transport layerComputer Communication Networks- Introduction to Transport layer
Computer Communication Networks- Introduction to Transport layerKrishna Nanda
 
Distributed System by Pratik Tambekar
Distributed System by Pratik TambekarDistributed System by Pratik Tambekar
Distributed System by Pratik TambekarPratik Tambekar
 

Similar to Message Passing Design Issues and Reliable Protocols (20)

1 messagepassing-121015032028-phpapp01
1 messagepassing-121015032028-phpapp011 messagepassing-121015032028-phpapp01
1 messagepassing-121015032028-phpapp01
 
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...
 
Inter process communication by Dr.C.R.Dhivyaa, Assistant Professor,Kongu Engi...
Inter process communication by Dr.C.R.Dhivyaa, Assistant Professor,Kongu Engi...Inter process communication by Dr.C.R.Dhivyaa, Assistant Professor,Kongu Engi...
Inter process communication by Dr.C.R.Dhivyaa, Assistant Professor,Kongu Engi...
 
Message and Stream Oriented Communication
Message and Stream Oriented CommunicationMessage and Stream Oriented Communication
Message and Stream Oriented Communication
 
Cs556 section3
Cs556 section3Cs556 section3
Cs556 section3
 
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
 
2.communcation in distributed system
2.communcation in distributed system2.communcation in distributed system
2.communcation in distributed system
 
DCS Unit-II COMMUNICATION AND COORDINATION.pdf
DCS Unit-II COMMUNICATION AND COORDINATION.pdfDCS Unit-II COMMUNICATION AND COORDINATION.pdf
DCS Unit-II COMMUNICATION AND COORDINATION.pdf
 
Transport layer
Transport layerTransport layer
Transport layer
 
Lecture9
Lecture9Lecture9
Lecture9
 
Remote procedure call
Remote procedure callRemote procedure call
Remote procedure call
 
Message passing Programing and MPI.
Message passing Programing and MPI.Message passing Programing and MPI.
Message passing Programing and MPI.
 
Remote Procedure Call
Remote Procedure CallRemote Procedure Call
Remote Procedure Call
 
Linux Inter Process Communication
Linux Inter Process CommunicationLinux Inter Process Communication
Linux Inter Process Communication
 
CHP-4.pptx
CHP-4.pptxCHP-4.pptx
CHP-4.pptx
 
Computer Communication Networks- Introduction to Transport layer
Computer Communication Networks- Introduction to Transport layerComputer Communication Networks- Introduction to Transport layer
Computer Communication Networks- Introduction to Transport layer
 
Distributed System by Pratik Tambekar
Distributed System by Pratik TambekarDistributed System by Pratik Tambekar
Distributed System by Pratik Tambekar
 
Transport Layer Description By Varun Tiwari
Transport Layer Description By Varun TiwariTransport Layer Description By Varun Tiwari
Transport Layer Description By Varun Tiwari
 
Tcp3 wayhandshakeprocess
Tcp3 wayhandshakeprocessTcp3 wayhandshakeprocess
Tcp3 wayhandshakeprocess
 

More from Ashish Kumar

Computer architecture
Computer architecture Computer architecture
Computer architecture Ashish Kumar
 
Introduction vision
Introduction visionIntroduction vision
Introduction visionAshish Kumar
 
Introduction image processing
Introduction image processingIntroduction image processing
Introduction image processingAshish Kumar
 
Image pre processing-restoration
Image pre processing-restorationImage pre processing-restoration
Image pre processing-restorationAshish Kumar
 
Image pre processing
Image pre processingImage pre processing
Image pre processingAshish Kumar
 
Image pre processing - local processing
Image pre processing - local processingImage pre processing - local processing
Image pre processing - local processingAshish Kumar
 
Enhancement in spatial domain
Enhancement in spatial domainEnhancement in spatial domain
Enhancement in spatial domainAshish Kumar
 
Enhancement in frequency domain
Enhancement in frequency domainEnhancement in frequency domain
Enhancement in frequency domainAshish Kumar
 
Digitized images and
Digitized images andDigitized images and
Digitized images andAshish Kumar
 
resource management
  resource management  resource management
resource managementAshish Kumar
 
Introduction image processing
Introduction image processingIntroduction image processing
Introduction image processingAshish Kumar
 
video compression techique
video compression techiquevideo compression techique
video compression techiqueAshish Kumar
 
online game over cryptography
online game over cryptographyonline game over cryptography
online game over cryptographyAshish Kumar
 

More from Ashish Kumar (20)

Computer architecture
Computer architecture Computer architecture
Computer architecture
 
Lecture2 color
Lecture2 colorLecture2 color
Lecture2 color
 
Introduction vision
Introduction visionIntroduction vision
Introduction vision
 
Introduction image processing
Introduction image processingIntroduction image processing
Introduction image processing
 
Image pre processing-restoration
Image pre processing-restorationImage pre processing-restoration
Image pre processing-restoration
 
Image pre processing
Image pre processingImage pre processing
Image pre processing
 
Image pre processing - local processing
Image pre processing - local processingImage pre processing - local processing
Image pre processing - local processing
 
Enhancement in spatial domain
Enhancement in spatial domainEnhancement in spatial domain
Enhancement in spatial domain
 
Enhancement in frequency domain
Enhancement in frequency domainEnhancement in frequency domain
Enhancement in frequency domain
 
Digitized images and
Digitized images andDigitized images and
Digitized images and
 
Data structures
Data structuresData structures
Data structures
 
Lecture2 light
Lecture2 lightLecture2 light
Lecture2 light
 
resource management
  resource management  resource management
resource management
 
color
colorcolor
color
 
Introduction image processing
Introduction image processingIntroduction image processing
Introduction image processing
 
system design
system designsystem design
system design
 
video compression techique
video compression techiquevideo compression techique
video compression techique
 
Compression
CompressionCompression
Compression
 
1.animation
1.animation1.animation
1.animation
 
online game over cryptography
online game over cryptographyonline game over cryptography
online game over cryptography
 

Recently uploaded

CLASSIFICATION OF ANTI - CANCER DRUGS.pptx
CLASSIFICATION OF ANTI - CANCER DRUGS.pptxCLASSIFICATION OF ANTI - CANCER DRUGS.pptx
CLASSIFICATION OF ANTI - CANCER DRUGS.pptxAnupam32727
 
Mythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWMythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWQuiz Club NITW
 
Textual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSTextual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSMae Pangan
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITWQ-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITWQuiz Club NITW
 
Expanded definition: technical and operational
Expanded definition: technical and operationalExpanded definition: technical and operational
Expanded definition: technical and operationalssuser3e220a
 
ICS 2208 Lecture Slide Notes for Topic 6
ICS 2208 Lecture Slide Notes for Topic 6ICS 2208 Lecture Slide Notes for Topic 6
ICS 2208 Lecture Slide Notes for Topic 6Vanessa Camilleri
 
Indexing Structures in Database Management system.pdf
Indexing Structures in Database Management system.pdfIndexing Structures in Database Management system.pdf
Indexing Structures in Database Management system.pdfChristalin Nelson
 
MS4 level being good citizen -imperative- (1) (1).pdf
MS4 level   being good citizen -imperative- (1) (1).pdfMS4 level   being good citizen -imperative- (1) (1).pdf
MS4 level being good citizen -imperative- (1) (1).pdfMr Bounab Samir
 
How to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 DatabaseHow to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 DatabaseCeline George
 
4.9.24 School Desegregation in Boston.pptx
4.9.24 School Desegregation in Boston.pptx4.9.24 School Desegregation in Boston.pptx
4.9.24 School Desegregation in Boston.pptxmary850239
 
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxGrade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxkarenfajardo43
 
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...DhatriParmar
 
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptx
Unraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptxUnraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptx
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptxDhatriParmar
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4JOYLYNSAMANIEGO
 
4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptxmary850239
 
Using Grammatical Signals Suitable to Patterns of Idea Development
Using Grammatical Signals Suitable to Patterns of Idea DevelopmentUsing Grammatical Signals Suitable to Patterns of Idea Development
Using Grammatical Signals Suitable to Patterns of Idea Developmentchesterberbo7
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptxmary850239
 

Recently uploaded (20)

CLASSIFICATION OF ANTI - CANCER DRUGS.pptx
CLASSIFICATION OF ANTI - CANCER DRUGS.pptxCLASSIFICATION OF ANTI - CANCER DRUGS.pptx
CLASSIFICATION OF ANTI - CANCER DRUGS.pptx
 
Mythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWMythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITW
 
Textual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSTextual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHS
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITWQ-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
 
Expanded definition: technical and operational
Expanded definition: technical and operationalExpanded definition: technical and operational
Expanded definition: technical and operational
 
ICS 2208 Lecture Slide Notes for Topic 6
ICS 2208 Lecture Slide Notes for Topic 6ICS 2208 Lecture Slide Notes for Topic 6
ICS 2208 Lecture Slide Notes for Topic 6
 
prashanth updated resume 2024 for Teaching Profession
prashanth updated resume 2024 for Teaching Professionprashanth updated resume 2024 for Teaching Profession
prashanth updated resume 2024 for Teaching Profession
 
Indexing Structures in Database Management system.pdf
Indexing Structures in Database Management system.pdfIndexing Structures in Database Management system.pdf
Indexing Structures in Database Management system.pdf
 
MS4 level being good citizen -imperative- (1) (1).pdf
MS4 level   being good citizen -imperative- (1) (1).pdfMS4 level   being good citizen -imperative- (1) (1).pdf
MS4 level being good citizen -imperative- (1) (1).pdf
 
Faculty Profile prashantha K EEE dept Sri Sairam college of Engineering
Faculty Profile prashantha K EEE dept Sri Sairam college of EngineeringFaculty Profile prashantha K EEE dept Sri Sairam college of Engineering
Faculty Profile prashantha K EEE dept Sri Sairam college of Engineering
 
How to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 DatabaseHow to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 Database
 
4.9.24 School Desegregation in Boston.pptx
4.9.24 School Desegregation in Boston.pptx4.9.24 School Desegregation in Boston.pptx
4.9.24 School Desegregation in Boston.pptx
 
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxGrade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
 
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
 
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptx
Unraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptxUnraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptx
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptx
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4
 
4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx
 
Using Grammatical Signals Suitable to Patterns of Idea Development
Using Grammatical Signals Suitable to Patterns of Idea DevelopmentUsing Grammatical Signals Suitable to Patterns of Idea Development
Using Grammatical Signals Suitable to Patterns of Idea Development
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx
 

Message Passing Design Issues and Reliable Protocols

  • 2. DESIGN ISSUES IN IPC BY MESSAGE PASSING  SYNCHRONIZATION ◦ BLOCKING PRIMITIVE (SYNCHRONOUS) : If its invocation blocks execution of its invoker ◦ NON-BLOCKING (ASYNCHRONOUS) : Does not block execution 2 cases  1st case ◦ Blocking send ◦ Blocking Rec  2nd case ◦ Non-Blocking Send ◦ Non-Blocking Rec
  • 3. ISSUES IN BLOCKING SEND  Sending process could get blocked forever if receiving process crashes or message lost on the network due to communication failure  Hence it should use timeout values  It could be a parameter of “send” primitive
  • 4. ISSUES IN BLOCKING RECEIVE  Receiver process could get blocked forever if sending process crashes or message lost on the network due to communication failure  Hence it should use timeout values
  • 5. ISSUES IN NON-BLOCKING RECEIVE  How the receiving process knows that the message has arrived in the message buffer?  Done by Polling or Interrupt ◦ POLLING: Receiver uses “test” primitive to allow it to check buffer status ◦ INTERRUPT : When message has arrived in the buffer, a s/w interrupt is used to notify the receiving process
  • 6. SYNCHRONOUS COMMUNICATION Sender’s execution Receiver’s execution Send(message); Receive(message); execution suspended message execution suspended execution resumed Send(acknowledgement) execution resumed acknowledgement Synchronous mode of communication with both send and receive primitives having blocking-type semantics
  • 7. IMPLEMENTATION EASE • Synchronous communication is easy to implement • If message gets lost or is undelivered, no backward error recovery is required • Synchronous communication limits concurrency • Subject to communication deadlock
  • 8. BUFFERING  Messages are transmitted from one process to another by copying the body of the message from the address space of sending process to address space of receiver process (possibly via address space of kernels of sending and receiving computers)  In some cases, the receiver process may not be ready to receive a message but may want O.S. to save messages for later reception  Message buffering strategy related to synchronization strategy ◦ Synchronous Mode: Null /No Buffer ◦ Asynchronous Mode: Buffer with unbounded capacity
  • 9. Null Buffering  It has two strategies 1st strategy – Message remains in SPAS (Sender Process Address Space) and the execution of send is delayed until the receiver executes the corresponding receive – After send, when ACK is received, it executes “send” again 2nd strategy – The message is simply discarded and the time out mechanism is used to resend message after a time out period – After executing send, sender process wait for an ACK
  • 10. Single-Message Buffer  Ifthe receiver is not ready, a message has to be transferred two or more times hence null buffer strategy is generally not suitable for synchronous communication  Therefore,synchronous communication use a single- message buffer strategy A buffer having a capacity to store a single message is used on the receiver’s node
  • 11. FINITE BOUND BUFFER A create-buffer system call is provided to the user.  This system call when executed by a receiver process creates a buffer of a size specified by receiver either in kernel AS. or receiver process AS. 11
  • 12. i. Null buffer: Sending Process Receiving Process Message ii. Single Message Buffer: iii. Multiple Message Buffer: Message 1 Message n 12
  • 13. ENCODING AND DECODING OF MESSAGE DATA Structure of program/object should be preserved while they are being transmitted from address space of sending process to RPAS. Difficult to achieve because  Absolute ptr losses its meaning when transferred from one process AS to another ◦ Requires flattening and shaping of objects  Receiver process should have a-priori knowledge of varying memory occupied by various data items Due to above problems, program object not transferred in their original form. First converted to stream form by encoding. 13
  • 14. Two representation may be used for encoding and Decoding 1. Tagged Representation: Data object along with its type is encoded 2. Untagged Representation: No information regarding data type.  Untagged: SUN XDR (Extended Data Representation)  Tagged: A.S.N (CCITT 1985) 14
  • 15. PROCESS ADDRESSING  Process addressing is naming of parties involved in interaction  Two types of process Addressing: 1. Explicit Addressing: The process with which communication is desired is explicitly named as a parameter ◦ Send (process-id, message) ◦ Receive (process-id, message) 15
  • 16. Implicit Addressing Does not explicitly name a process for communication ◦ Send_any (service_id, message) ◦ Send a message to any process that provides the service of type “service_id” ◦ Receive_any (process_id, message) ◦ Receive a message from any process and returns the “process_id” of the process from which the message was received.
  • 17. PROCESS ADDRESSING (contd..)  Simple method to identify a process is by a combination of machine-id and local-id such as machine-id@local-id.  Local-id can be process- id or port-id, that uniquely identifies a process on a machine.  Machine-id is used by sending machine kernel to send the message to the receiver process machine.  Eg: Berkely UNIX -32 bit Internet address for machine-id -16 bit for local-id  Drawback: It does not allow a process to migrate from one machine to another in the case of heavy load. 17
  • 18. I. To overcome this limitation Machine-id , Local-id , Machine-id , Node on which process created Id of the process Last known Node Location of the process Never Change This may This type of adding is known as link based addressing. During Migration, a link Information (p-id + m/c id of new node) of the new node is left on previous node. Drawbacks: i. Overload of locating a process if process has migrated several times. ii. It may not be possible to locate a process if an intermediate node on which the process once residing during its lifetime is down. 18
  • 19. TWO LEVEL NAMING SCHEME FOR PROCESSES  Each process has two id: ◦ A high level name that is m/c independent (ASCII string) ◦ A low level name that is m/c dependent (m/c id@local id)  A name server is used to maintain a mapping table.  Now when a process wants to send a message to another process, it specifies high level name of the receiver process. 19
  • 20. TWO LEVEL NAMING SCHEME FOR PROCESSES The kernel of the m/c first contacts the name server to get low level name Can also be used for FUNCTIONAL ADDRESSING High level name identifies a service instead of a process Precaution of Replicating Name Server.
  • 21. FAILURE HANDLING • Loss of Request message • Loss of Response Message • Unsuccessful execution of request To overcome these problems • A reliable IPC protocol of a message-passing system is designed. • It is based on the ideas of internal retransmission of messages after time out and • Return of an ACK to sending m/c kernel by receiver m/c kernel. 21
  • 22.  The time for which the sender waits is slightly more than the approximate round trip time + the average time required for executing the request 1. FOUR MESSAGE RELIABLE IPC Protocol The four-message reliable IPC protocol for client-server communication between two processes. 22
  • 23. 2. THREE MESSAGE RELIABLE IPC The three-message reliable IPC protocol for client-server communication between two processes.  What happens when request processing takes a long time?  Answer: Server sends a separate ACK to acknowledge request message
  • 24. 3. TWO MESSAGE RELIABLE IPC The two-message IPC protocol used in many systems for client- server communication between two processes.  When request received at servers machine, it starts a timer  If server finishes processing the req. before time expires, reply acts as ACK  Else a separate ACK is sent by kernel
  • 25. Idempotency Means repeatibility An Idempotent operation produces the same result without any side effects, no matter how many times it is performed with the same argument. ISSUE : Duplicate Requests
  • 26. Handling of Duplicate Requests Ifclient makes a request Server processes the request Client doesn't receive the response After time out, again issues REQ What Happens?
  • 27. Handling of Duplicate Requests Use unique id for every REQ Kernel on the server maintains a reply cache
  • 28. Keeping Track of Lost and Out-of-Sequence Packets in Multidatagram Messages Stop n Wait Protocol ◦ ACK for each packet Blast Protocol ◦ Single ACK for all packets of multidatagram message ◦ Two fields in each packet – total no. of packets and seq no. of packet ◦ After timeout – Selective Repeat
  • 29. Group Communication A group is a set of parties that, presumably, want to exchange information in a reliable, consistent manner.  Group communication is a paradigm for multi- party communication that is based on the notion of groups as a main abstraction.  For example: • The participants of a message-based conferencing tool may constitute a group. • If one message is a response to another, the original message should be delivered before the response.
  • 30. Group Communication 1. The set of replicas of a fault-tolerant database server may constitute a group. • Consider update messages to the server. Since the contents of the database depend on the history of all update messages received, all updates must be delivered to all replicas. Furthermore, all updates must be delivered in the same order. Otherwise, inconsistencies may arise.
  • 31. Group Communication Following three types of group communication are popular: ◦ One to Many ◦ Many to One ◦ Many to Many
  • 32. Message Delivery to Receiver Process User applications use high level group names in programs Centralized group server (GS) maintains a mapping of high-level group names to their low level names Group server also maintains a list of process identifier of all the processes for each group
  • 33. Message Delivery to Receiver Process When a sender sends a message to a group specifying its high level name Kernel contacts the GS to obtain low level name & p_id of processes belonging to that group This list of p_id is inserted in the message
  • 34. Buffered / Unbuffered Multicast Multicastis a Asynchronous operation? So which one to use ◦ BUFFERED or UNBUFFERED?
  • 35. Reliability in Multicasting Depends on degree of reliability required Sender of a multicast message can specify the number of receivers from which a response message is needed This is expressed in the following form: ◦ 0-reliable ◦ 1-reliable ◦ ‘m’ out of ‘n’ reliable ◦ all reliable
  • 36. Atomic Multicast Thishas all or nothing property i.e. when a message is sent to a group, either all or none receive it. Only “all-reliable” kind of reliability needs this strict paradigm
  • 37. Group Communication Primitives Group communication is implemented using middleware that provides sets of primitives to the application. ◦ Multicast primitive (e.g., post): This primitive allows a sender to post a message to the entire group. OR send() / send_group(): for “1 – 1” and “1 - m” semantic Name Server or Group Server?
  • 38. Group Communication Primitives ◦ Membership primitives ◦ e.g., join, leave, query_membership; ◦ These primitives allow a process to join or leave a particular group, as well as to query the group for the list of all current participants.
  • 39. Mnay to One Comm. Issues The single receiver may be selective or nonselective ◦ Selective – Deterministic ◦ Non-selective – Non-Deterministic
  • 40. Many to Many Comm. Issues One to many and many to one implicit in this scheme Issue of ordered message delivery Semantics of ordered delivery are: • Absolute Ordering • Consistent Ordering • Causal Ordering
  • 41. Absolute Ordering  Allmessages are delivered to all receiver processes in the exact order in which they were sent  System is assumed to have a clock at each machine and all clocks are synchronized with each other  Here clock value is taken as the identifier of the message
  • 43. Consistent Ordering  Absolute ordering requires globally synchronized clocks, which are not easy to implement  Consistent ordering ensures that all messages are delivered to all receiver processes in the same order  Order may be different from the order in which messages were sent  Sending machines send messages to a single receiver (sequencer) that assigns a sequence number to each message and then multicasts it  Subject to single point of failure and hence has poor reliability
  • 45. Causal Ordering  This ensures that if the event of sending one message is causally related to the event of sending another message, the two messages are delivered to all receivers in the correct order  Two message sending events are said to be causally related if they are corelated by happened-before relation