Prerequisite – Inter Process Communication
1. Shared Memory Model :
In this IPC model, a shared memory region is established which is used by the processes for data communication. This memory region is present in the address space of the process which creates the shared memory segment.The processes who want to communicate with this process should attach this memory segment into their address space.
2. Message Passing Model :
In this model, the processes communicate with each other by exchanging messages. For this purpose a communication link must exist between the processes and it must facilitate at least two operations send (message) and receive (message). Size of messages may be variable or fixed.
Difference between Shared Memory Model and Message Passing Model in IPC :
|S.No||Shared Memory Model||Message Passing Model|
|1.||Shared memory region is used for communication.||Message passing facility is used for communication.|
|2.||It is used for communication between processes on a single processor or multiprocessor systems where the communicating processes reside on the same machine as the communicating processes share a common address space.||It is typically used in a distributed environment where communicating processes reside on remote machines connected through a network.|
|3.||The code for reading and writing the data from the shared memory should be written explicitly by the Application programmer.||No such code required here as the message passing facility provides mechanism for communication and synchronization of actions performed by the communicating processes.|
|4.||It provides maximum speed of computation as communication is done through shared memory so system calls are made only to establish the shared memory.||It is time consuming as message passing is implemented through kernel intervention (system calls).|
|5.||Here the processes need to ensure that they are not writing to the same location simultaneously.||It is useful for sharing small amounts of data as conflicts need not to be resolved.|
|6.||Faster communication strategy.||Relatively slower communication strategy|
Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.
- IPC through shared memory
- Difference between Shared Nothing Architecture and Shared Disk Architecture
- IPC using Message Queues
- Message based Communication in IPC (inter process communication)
- Difference between Parallel Virtual Machine (PVM) and Message Passing Interface (MPI)
- Differences between Dynamic Binding and Message Passing in Java
- Message Passing in Java
- Algorithm for implementing Distributed Shared Memory
- Difference between Static and Shared libraries
- Difference between Shared Hosting and Dedicated Hosting
- Difference between Cloud hosting and Shared hosting
- Inter Process Communication (IPC)
- IPC technique PIPES
- Difference between Volatile Memory and Non-Volatile Memory
- Difference between Byte Addressable Memory and Word Addressable Memory
- Difference between Random Access Memory (RAM) and Content Addressable Memory (CAM)
- Difference between Virtual memory and Cache memory
- Difference between Uniform Memory Access (UMA) and Non-uniform Memory Access (NUMA)
- Difference between Circuit switching and Message switching
- Difference between Pipes and Message Queues
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.