Interprocess communication

Inter Process Communication (IPC)




Shared memory Messsage passing

Question :- Explain inter process communication in detail.     ( 6 m) ( May- June 18 )

Ans :- Exchange of data between two or more separate, independent processes/ threads is possible using IPC ( Inter Process Communication ) Operating system provide facilities / resources for IPC, such as message queues, semaphores, and shared memory. A complex programming environment often uses multiple cooperating processes  to perform related operations . These processes must communicate with each other and share resources and information. The kernel must provide mechanisms that make this possible. These mechanisms are collectively referred to as interprocess communication.

                Distributed computing systems make use of these facilities / resources to provide application programming interface ( API ) which allows IPC to be programmed at a higher level of abstraction ( e.g  send and receive. )

Five types of inter – process communication are as follows :-

1) Shared memory permits processes to communicate by simply reading and writing to a specified memory location.

2) Mapped memory is similar to shared memory, except that it is associated with a file in the file system.

3) Pipes must permit sequential communication from one process to a related process.

4) FIFO are similar to pipes, except that unrelated processes can communicate because the pipe is given a name in the file system.

5) Sockets support communication between unrelated processes even on different computers.

Purposes of IPC :-

1) Data transfer :- One process may wish to send data to another process.

2) Sharing data :- Multiple processes may wish to operate on shared data, such that if a process modifies the data, that change will be immediately visible to other process sharing it.

3) Event modification :- A process may wish to notify another process or set of processes that some event has occurred.

4) Resource sharing :- The kernel provides default semantics for resource allocation; they are not suitable for all application.

5) Process Control :- A process such as a debugger may wish to assume complete control over the execution of another process.


  • WikiNote Foundation

Last modified: Friday, 20 September 2019, 10:19 AM