What is meant by inter process communication? Explain the two fundamental models of inter process communication

The OS provides the means for cooperating processes to communicate with each other via an inter process communication (IPC) facility. 

IPC provides a mechanism to allow processes to communicate and to synchronize their actions without sharing the same address space. IPC is particularly useful in a distributed environment where the communicating processes may reside on different computers connected with a network. IPC is best implemented by message passing system where communication among the user processes is accomplished through the passing of messages. An IPC facility provides at least the two operations: send(message) and receive(message). 

Two types of message passing system are as follows:

(a) Direct Communication

With direct communication, each process that wants to communicate must explicitly name the recipient or sender of the communication. In his scheme, the send and receive primitives are defined as:
  • send(P, message)- Send a message to process P.
  • receive(Q, message)- Receive a message from process Q. A communication link in this scheme has the following properties:
  • A link is established automatically between every pair of processes that want to communicate. The processes need to know only each other’s identity to communicate.
  • A link is associated with exactly two processes.
  • Exactly one link exists between each pair of processes.

(b)With indirect communication: 

 The messages are sent to and received from mailboxes, or ports. Each mailbox has a unique identification. In this scheme, a process can communicate with some other process via a number of different mailboxes. Two processes can communicate only if they share a mailbox. The send and receive primitives are defined as follows:
  •  send (A, message)- Send a message to mailbox A 
  • receive (A, message)- Receive a message from mailbox A.
 In this scheme, a communication link has the following properties:
  • A link is established between a pair of processes only if both members of the pair have a shared mailbox.
  • A link may be associated with more than two processes.
  • A number of different links may exist between each pair of communicating processes, with each link corresponding to one mailbox.


Feel free to contact the admin for any suggestions and help.