With neat diagram explain inter process communication model.

Inter-process communication: Cooperating processes require an Interprocess communication (IPC) mechanism that will allow them to exchange data and information. There are two models of IPC 1. Shared memory
 





                                                               
                



 In this, all processes who want to communicate with other processes can access a region of the memory residing in an address space of a process creating a shared memory segment.  All the processes using the shared memory segment should attach to the address space of the shared memory. All the processes can exchange information by reading and/or writing data in shared memory segment.  The form of data and location are determined by these processes who want to communicate with each other.  These processes are not under the control of the operating system.  The processes are also responsible for ensuring that they are not writing to the same location simultaneously.  After establishing shared memory segment, all accesses to the shared memory segment are treated as routine memory access and without assistance of kernel. 2. Message Passing  In this model, communication takes place by exchanging messages between cooperating processes.  It allows processes to communicate and synchronize their action without sharing the same address space.  It is particularly useful in a distributed environment when communication process may reside on a different computer connected by a network.  Communication requires sending and receiving messages through the kernel.