Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

INTER PROCESS COMMUNICATION (IPC)

Inter-process communication means the way in which processes communicate with each other. As we
know that there are different processes running in our systems. And these processes may need to
communicate with each other. So the way the processes communicate with each other is known as
inter-process communication.

When two or more processes are executing concurrently in the operating system, these processes may
either be independent processes or cooperating processes.

1. Independent processes: They cannot affect or be affected by the other processes executing in the
system.
2. Cooperating processes: They can affect or be affected by the other processes executing in the
system.

The cooperating processes are any process that shares data with other process. In cooperating
processes they are going to be affected by each other and they may need to communicate with each
other. So, mostly Inter-process communication is required in cooperating processes.

Reasons of Process Cooperation:

 Information Sharing: In this information sharing what we mean is that several users may be
interested in a single piece of information. So, we will have to provide an environment in which the
information can be accessed concurrently and several users communicate or cooperate with each
other in order to provide this information sharing.

 Computational Speed Up: Now in order to achieve computational speed up a single task can be
divide into several subtasks, and all these subtasks will be made to run concurrently. In that way,
we can speed up our system. Now, when a task is broken down into several different tasks, they are
assigned to several different processes and these processes belong to one single task. So, those
processes can communicate with each other and computational speedup achieves.

 Modularity: It means we divide the system into different modules, and these modules will later be
put together to work to achieve a single goal. So, when we want to achieve modularity, we are
dividing the system into several different modules and these modules will need to communicate or
cooperate with each other.

 Convenience: When we provide an environment in which the processes can cooperate with each
other, then it becomes very convenient for the user. For example, when a user listening to music,
typing a document, or printing a document at the same time, there are different processes running
at the same time. So these processes are running concurrently, and they need to cooperate with
each other so that all the tasks can run smoothly without clashing with each other.
Models of Inter Process Communication:

And there are two fundamental models of inter-process communication. The first one is called shared
memory and the second one is called message passing.

 Shared Memory Model: It is a region of memory that is shared by cooperating processes is


established and processes can then exchange information by reading and writing data to the shared
region. When process A wants to communicate to process B, what it will do is it will write the
information that it wants to communicate to the shared memory region. And what process B will do
is it will read the information that was written to the shared memory region by process A, and it will
understand what communication was A trying to make.

 Message Passing Communication Model: In message passing model, the two processes process A &
process B which are trying to communicate to each other. The process A wants to communicate to
process B, then It will create the message and the message will go to the kernel and the kernel
knows that this message is for process B. So the kernel will send this message to process B. And
process B gets the message.

Models of Inter Process Communication

You might also like