- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Message Passing vs Shared Memory Process communication Models
Message passing model and shared memory model are models of interprocess communication. Details about these are given as follows −
Message Passing Process Communication Model
Message passing model allows multiple processes to read and write data to the message queue without being connected to each other. Messages are stored on the queue until their recipient retrieves them. Message queues are quite useful for interprocess communication and are used by most operating systems.
A diagram that demonstrates message passing model of process communication is given as follows −
In the above diagram, both the processes P1 and P2 can access the message queue and store and retrieve data.
An advantage of message passing model is that it is easier to build parallel hardware. This is because message passing model is quite tolerant of higher communication latencies. It is also much easier to implement than the shared memory model.
However, the message passing model has slower communication than the shared memory model because the connection setup takes time.
Shared Memory Process Communication Model
The shared memory in the shared memory model is the memory that can be simultaneously accessed by multiple processes. This is done so that the processes can communicate with each other. All POSIX systems, as well as Windows operating systems use shared memory.
A diagram that illustrates the shared memory model of process communication is given as follows:
In the above diagram, the shared memory can be accessed by Process 1 and Process 2.
An advantage of shared memory model is that memory communication is faster as compared to the message passing model on the same machine.
However, shared memory model may create problems such as synchronization and memory protection that need to be addressed.
- Shared Memory Model of Process Communication
- Message Passing Model of Process Communication
- Differentiate between shared memory and message passing model in OS.
- Difference between Shared Memory Multiprocessors and Message-Passing Multiprocessors in Computer Architecture.
- What are the different shared-memory multiprocessor models?
- Different Models of Interprocess Communication
- IPC through shared memory
- Process vs Parent Process vs Child Process
- Process Communication in Operating System
- What is Inter process communication?
- Algorithm for implementing Distributed Shared Memory
- What are Shared Memory MIMD Architectures?
- What is inter process communication (IPC)?
- What is shared memory in the OS?
- What is message passing technique in OS?