- Pipe (PIPE)
- FIFO (named pipe)
- XSI message queue
- XSI semaphores
- XSI shared memory
- POSIX semaphores
- Domain sockets (Domain Socket)
- Signal (Signal)
- Mutex (Mutex)
Wherein the signal (Signal) and semaphore (semaphore) is not regarded as essentially inter-process communication, inter-process mode should be synchronized, but may also play a role in communication, it is also listed above. Further common action between thread synchronization mutex is used, it may be processes A and B share a memory initialization mutex, you can use this mutex used by the inter-process communication.
And compare the advantages and disadvantages of various means of communication
-
Pipeline: slow, limited capacity, only a parent and child can communicate
-
FIFO: can any interprocess communication, but slower
-
Message Queuing: system capacity is restricted, and care should be first read, not to consider the last data read
-
Semaphore: complex message is not transmitted, synchronization can only be used
-
Shared memory: the ability to easily control capacity, it is among the fastest way synchronization process, but to keep pace, such a process at the time of writing, another process should pay attention to the issue of literacy, which is equivalent thread-safe thread and, of course, can also be used as a shared memory area inter-thread communication, but will not be necessary, inter-thread already has shared a piece of memory within the same process