Inter Process Communication
β Inter Process Communication
communication among processes
π‘ process have independent memory, is run independently
use semaphore, mutext(only one process for shared data)
β Types of Inter Process Communication
- pipe
- socket
- file
1. Anonymous PIPE
- one way communication
- PIPE can conenct two processes
- one process: only write, other process: only read
- used for when you know the other communicating process(like parent and child process communication)
- ππ» simple to use
- ππ» if both ways communication is needed, two PIPEs are required
2. Named PIPE
- when you donβt know the other process to communicate
> one way communication
3. Message Queue
- Queue: unlike pipe, is memory
- several process can use numbered data
4. Shared Memory
- share data among processes
- π‘ process have independent memory, other process cannot access
Shared Memory
lets process ot share memory space- ππ» fastest in IPC
5. Memory Map
- like
Shared Memory
, but shares by mapping open file to memory - share
file+memory
- ππ» for large files
6. Socket
- network socket communication
- client-server communication through socket
- server: bind, listen, accecpt/ client: connect
This post is licensed under CC BY 4.0 by the author.