top of page

Inter Process Communication


The way in which processes are communicate with other is known as inter process communication.

Processes executing concurrently in the operating system it may be independent or cooperating processes.


Independent Process: The process that can not effect or not to be affected by other process is called Independent process.


cooperating processes: They can affect or be affected by other process executing in the system is called cooperating process.


Why Need Inter Process Communication:

  • Information sharing

  • Computation Speedup

  • Modularity

  • Convenience

The way to achieve Inter Process Communication

  • Shared Memory

  • Message Passing

  • Pipe

  • signal

Shared Memory:

IPC using shared memory requires communicating process to establish a region of shared memory.

Typically shared memory region resides in the address space of the process creating the shared memory segment.

Other process that wish to communicate using this shared memory segment must attach it to there address space.

Example of shared Memory:

Producer Consumer Problem:

Types of Buffered:

Unbounded Buffer

Bounded Buffer


Message-Passing System:


Message Passing provides a mechanism to allow process to communicate and to synchronize their action without sharing the same address space and is particularly useful in a distributed environment, where the communicating processes may reside on different computers connected by a network.

Message Passing facility provides at least two operation:

  • send(message)

  • receive(message)

Message sent by a process can be of either fixed or variable size.

Fixed Size: The system level implementation is straightforward. But makes the task of programming more difficult.

Variable Size: Requires a more complex system-level implementation. But the programming task becomes simpler.A communication link must exist between them.



This link can be implemented in a verity of ways.

There are several method for logically implementing a link and the send()/receive() operation

  • Direct and indirect communication

  • Synchronous or asynchronous communication

  • Automatic and explicit buffering.

There are several issue Related with this features:

  • Naming

  • Synchronization

  • Buffering





Comments


bottom of page