Interprocess interaction is a capability of Operating Systems that enables a process to communicate with any other process. IPC enables one application to control another application and share the corresponding data there is no interfering with one another.

You are watching: What are the two models of interprocess communication

Lets read further to learn an ext about interprocess communication, species of processes, different models of IPC, etc.

Interprocess Communication

Interprocess interaction (IPC) is an ability to organize by one Operating System that enables one procedure to connect with one more process. The processes can be running on the same computer or on different computers associated through a network.

Interprocess communication enables one applications to control one more application, and for many applications to share the equivalent data without interfering with one another. IPC is compelled in all multiprogramming systems.

But the is not normally supported through a single procedure Operating Systems such as DOS. The OS/2 and also MS-Windows support an interprocess interaction mechanism dubbed Dynamic Data Exchange.

Interprocess interaction is a device that is supplied by the processes to exchange data and also information. Numerous processes may be executing at the same time in the Operating System. These processes deserve to be divided into two types known together independent processes and also cooperating processes.

Types of Processes

Following room the important varieties of processes

Independent Processes Cooperating Processes

Independent Processes

A process that cannot influence or be influenced by any kind of other procedure executing in the device is called an elevation process. An independent procedure does no share data with any type of other process.

Cooperating Processes

A procedure that can affect or be impacted by any type of other process executing in the system is called a cooperating process. A cooperating procedure shares data with various other processes.

Advantages of process Cooperation

Different advantages of procedure cooperation are as follows:

Information Sharing

Process participation is necessary due to the fact that many users may need to accessibility the same info such together a shared document etc. An setting must be detailed where such information deserve to be accessed through multiple users concurrently.

Computation Speedup

One task deserve to be separated into multiple jobs to execute it faster. All separated subtasks have the right to be executed all at once to speed up the computation. In this case, these subtasks may be required to cooperate with each other as lock are component of the same task.


Process participation is very important if the system is come be built in the modular style. The modular mechanism divides the features into separate processes or threads.


Process participation provides convenience if a single user is working on multiple work at the very same time. It ensures that any kind of conflicts space avoided in the mechanism if the user is utilizing the very same data in many tasks.

Models of Interprocess Communication

There are two basic models of interprocess communication:

Shared storage Model Message happen Model

Shared memory Model

The common memory model establishes a region of memory the is shared by cooperating processes. The procedures exchange information by reading and also writing data come the common region. This design is quicker than a message-passing model and also provides maximum speed and convenience.

interprocess communication

It is generally implemented using device calls and also is more time-consuming. The message-passing model is typically valuable in a spread environment. The processes may reside on various computers connected by a network.

The chat program supplied on the net is an example of the post passing system. Customers can communicate by trading messages v one another. A message-passing model provides at least two operations:

Send (message)

Receive (message)

Two procedures can communicate with each other by sending and receiving messages. This interaction can take place by developing a interaction link between these processes.

Mechanisms because that Interprocess Communication

Following space the crucial mechanisms because that interprocess communication:


The procedures that desire to communicate must refer to each other using any method. It have the right to be done using direct or indirect communication.

Direct Communication

In direct communication, each procedure that wants to connect must surname the sender or recipient of the communication. There are two schemes the direct communication known as symmetric communication and asymmetric communication.

The symmetric communication requires that both the sender and receiver procedure must surname each other to communicate. In asymmetric communication, only the sender procedure must name the recipient. The recipient procedure does not must name the sender process.

Send () and Receive () features in symmetric interaction are identified as follows:

Send (P, msg) the is provided to send the article msg to the process P.

Receive (Q, msg) it is supplied to obtain the article msg by the process Q.

Send () and Receive () functions in asymmetric communication are characterized as follows:

Send (P, msg) it is used to send the post msg come the process P.

Receive (id, msg) the is supplied to receive article msg from any process. The change id describes the name of the procedure with which the interaction has take away place.

The nature of the communication link in direct communication are as follows:

A attach is instantly established between the pair of processes that desire to communicate. The procedures only need to recognize the identification of every other. A attach is established between exactly 2 processes. Only one connect is established in between one pair that processes.In-Direct Communication

In-indirect communication, the article is sent and received native mailboxes or ports. A mailbox is an object used through the processes to store and remove messages. Each mailbox has actually a distinctive identification. Two procedures can interact using this technique only if they have a common mailbox.

A mailbox have the right to be own by a processor or the Operating System. If the mailbox is owned by a process then the disappears as soon as that procedure is terminated.

The Operating system must carry out a device for the following:

produce a brand-new mailbox Send and receive message via mailbox Delete a mailbox

Send () and Receive () attributes in asymmetric interaction are as follows:

Send (M, msg) that is offered to send the post msg come the mailbox M.

Receive (M, msg) the is used to receive the message msg native the mailbox M.

The nature of a interaction link in indirect interaction are as follows:

A link is established between a pair the processes just if both have actually a shared mailbox. A attach may be linked with an ext than 2 processes. Every pair of connecting processes may have actually a variety of links with each link referring to one mailbox.

Problems in Mailbox System

There are some troubles with the mailbox mechanism that take place when an ext than two procedures share a mailbox. Mean that process 1 sends out a post to a mailbox that is mutual with process 2 and process 3. Procedure 2 and process 3 both shot to get the message. That will gain it?

Some services to the over problem are :

To allow a attach to be created with at many two procedures  Allow just one procedure at a time to execute a receive procedure To permit the device to arbitrarily select the receiver. The sender have to be informed who obtained the message.


The communication in between different procedures takes place through calls to send() and also receive () functions. Various design choices to carry out each role include post passing by blocking or unblocking. These are likewise known as synchronous or asynchronous.

Blocking Send: the sending procedure is blocked until the article is got by the receiving procedure or by the mailbox.

Non-blocking Send: the sending process sends the message and also resumes options.

Blocking Receive: the receiver procedure blocks till a article is available.

Non-Blocking Receiver: the receiver procedure retrieves either a valid blog post or a null.


The blog post exchanged via any type of communication resides in a short-lived queue. These queues have the right to be imposed in the adhering to ways:

Zero Capacity

The queue has a maximum size of zero. The link cannot have any messages wait in it. The sender need to wait until the recipient obtain the message. The two processes need to be synchronized for the move of a message. The zero-capacity link is referred to as a message-passing system without buffering.

Bounded Capacity

The queue has a finite length of n. It can store n variety of messages in it. A article is stored in the queue if it is no full and also the sender proceeds the execution without any wait. The sender should block till there is a space available in the queue.

See more: The Two Forms Of Technology Are Better Devices And Improved ?

Unbounded Capacity

The queue length is infinite and any number of messages deserve to wait in it. The sender is never ever blocked. The is why the sender is never ever delayed.