Linux Inter-Process Communication
The types of inter process communication are:
- Signals - Sent by other processes or the kernel to a specific process to indicate various conditions.
- Pipes - Unnamed pipes set up by the shell normally with the "|" character to route output from one program to the input of another.
- FIFOS - Named pipes operating on the basis of first data in, first data out.
- Message queues - Message queues are a mechanism set up to allow one or more processes to write messages that can be read by one or more other processes.
- Semaphores - Counters that are used to control access to shared resources. These counters are used as a locking mechanism to prevent more than one process from using the resource at a time.
- Shared memory - The mapping of a memory area to be shared by multiple processes.
Message queues, semaphores, and shared memory can be accessed by the processes if they have access permission to the resource as set up by the object's creator. The process must pass an identifier to the kernel to be able to get the access.