Open In App

Issues in IPC By Message Passing in Distributed System

The sender sends a message that contains data and it is made in such a way that the receiver can understand it. The inter-process communication in distributed systems is performed using Message Passing. It permits the exchange of messages between the processes using primitives for sending and receiving messages.



1. A Fixed-Length Header with 3 Components:  

2. A Collection of Typed Data Objects of Varying Sizes:



Message Passing: A message-passing system gives a collection of message-based IPC (Inter-Process Communication) protocols while sheltering programmers from the complexities of sophisticated network protocols and many heterogeneous platforms. The send() and receive() communication primitives are used by processes for interacting with each other. For example, Process A wants to communicate with Process B then Process A will send a message with send() primitive and Process B will receive the message with receive() primitive. 

Characteristics of a Good Message Passing System:

Issues in Message Passing:

Synchronization:

Synchronization Semantics: The following are the two ways of message passing between processes:

1. Blocking: The blocking semantics implies that when the call of a send () or receive() primitive blocks the invoker’s current execution.

2. Non-blocking: The non-blocking semantics imply that when the call of a send () or receive() primitive does not block the invoker’s current execution and the control immediately goes back to the invoker.

The issue in a nonblocking receive() primitive is when a message arrives in the message buffer, how does the receiving process know? One of the following two procedures can be used for this purpose:  

  1. Polling: In the polling method, the receiver can check the status of the buffer when a test primitive is passed in this method. The receiver regularly polls the kernel to check whether the message is already in the buffer.
  2. Interrupt: A software interrupt is used in the software interrupt method to inform the receiving process regarding the status of the message i.e. when the message has been stored into the buffer and is ready for usage by the receiver. So, here in this method, receiving process keeps on running without having to submit failed test requests.

In a blocked send() and receive() primitive, there is an issue:

Article Tags :