Interprocess Communication: Shared Memory & Message Passing

Опубликовано: 03 Март 2023
на канале: Shahid Nihal
1,596
26

Interprocess communication is a mechanism which helps 2 processes to talk to each other. Once fork() creates 2 processes, we can have 2 types of processes:
1. Independant processes
2. Cooperating processes
Independant processes are those which do not affect other processes or cannot get affected by other processes. These do not share data/info with other processes. Cooperating processes are those which can get affected by other processes or can affect other processes. These share data/info with other processes.
The cooperating processes talk to each other via Interprocess Communication mechanisms. There are 2 types of IPC mechanisms:
1. Shared Memory Model
2. Message Passing Model
Shared Memory model is a type of IPC model where the 2 cooperating processes have a common memory region shared by the address spaces of the 2 processes, whereas Message Passign model uses a communication link to share data/info between the processes.

TextBook: https://amzn.to/3MpnwUX