Turn from: http://blog.csdn.net/chen825919148/article/details/8146128
How processes are communicated (1) pipelines (Pipe): Pipelines can be used for communication between relational processes, allowing one process to communicate with another process that has a common ancestor.
(2) Named pipe (named pipe): The named pipe overcomes the restriction that the pipe has no name, so it allows communication between unrelated processes in addition to the functionality that the pipe has. Named pipes have corresponding file names in the file system. Named pipes are created by command Mkfifo or system call Mkfifo.
(3) signal (Signal): signal is a more complex means of communication, used to inform the acceptance process has some kind of event, in addition to communication between processes, the process can also send signals to the process itself; Linux in addition to supporting the UNIX early signal semantic function Sigal outside, It also supports the signal function sigaction of semantics conforming to POSIX.1 standard (in fact, the function is based on BSD, BSD in order to achieve reliable signal mechanism, but also can unify the external interface, with the Sigaction function to realize the signal function).
(4) Message queue: Message Queuing is a linked table of messages, including POSIX Message Queuing system V Message Queuing. A process with sufficient permissions can add messages to the queue, and processes that are given Read permission can read messages in the queue. Message Queuing overcomes the lack of signal-carrying information, the pipeline can only host unformatted byte streams, and the buffer size is restricted.
(5) Shared memory: Allows multiple processes to access the same memory space, is the fastest available IPC form. is designed for the low efficiency of other communication mechanisms. It is often used in conjunction with other communication mechanisms, such as semaphores, to achieve synchronization and mutual exclusion between processes.
(6) Memory mapping (mapped memory): Memory mappings allow any number of interprocess communications, and each process that uses the mechanism implements it by mapping a shared file to its own process address space.
(7) Semaphore (semaphore): primarily as a synchronization between processes and different threads of the same process.
(8) Socket: A more general interprocess communication mechanism that can be used for interprocess communication between different machines. Originally developed by the BSD branch of the UNIX system, it is now generally possible to migrate to other Unix-like systems: Linux and System V variants support sockets.