Inter-Process Communication

Inter-Process Communication:

1. Inter-Process Communication (IPC) is the activity of sharing data across multiple and commonly specialized processes using communication protocols. 2. Typically, applications using IPC are categorized as clients and servers. 3. Client requests data and the Server responds to client requests. 4. IPC has ability to communicate between two cooperating process. 5. IPC is used in many contexts, such as a producer – consumer problem.

Contributor's Info

Synchronization Models | Software Solutions | Hardware Solutions | Solutions Based on Operating System | Solutions Based on Programming Language

IPC is mechanisms an operating system provides to allow processes it manages to share data. provides to allow processes it man There are various synchronization techniques, e.g., software solutions, hardware solutions, Operating system solutions, and compiler based solutions.

Software Solutions

(i) Strict alternation or turn variable or Dekker's algorithm

(ii) Use of flag variable

(iii) Peterson’s algorithm

(iv) Multiple process solution


Note:  Note that Peterson’s algorithm is a combination of strict alternation and use of flag variable techniques. There are some drawbacks of software solutions, e.g., busy waiting is possible, difficult assumption  for memory, complicated to program, blocking a process has more chances than waiting.


Hardware Solutions

(i) Test and Set (or Test and Set lock) instruction


Note:These mechanisms depends on machine instructions. There are some drawbacks of hardware solutions, e.g., deadlock, starvation and busy waiting may be possible.


Solutions Based on Operating System

(i) Counting Semaphore

(ii) Binary Semaphore


Note:Semaphore increases complexity when a algorithm require more than one semaphore. Incorrect use of semaphores can cause deadlock and mutual exclusion problem.


Solutions Based on Programming Language

(i) Monitor is solution based on compiler.

Contributor's Info

Created: Edited: