Linux process communication is basically inherited from Unix, and the two major contributors are AT & amp; T and bsd which have different emphasis on processes, the former focuses on the expansion of communication between early processes and forms & quot; SystemvIPC & quot;. the communication process is limited to a single computer ,...
Linux process communication is basically inherited from Unix, and the two major contributors to this are AT&T and bsd with different emphasis on processes, the former focuses on the expansion of communication between early processes, forming a "System v IPC". the communication process is limited to a single computer, while the latter skips this restriction, it forms inter-process communication based on a set of interfaces, while Linux inherits two aspects.
Linux communication methods are as follows:
1. pipeline and famous Pipeline: pipeline can be used for communications between processes with kinship. famous pipeline customer service has no name restrictions on the pipeline. Therefore, in addition to the characteristics of pipeline, it also allows communication between unrelated processes
2. signal. A signal is a complex communication method used to notify a process that something happens. in addition to notifying the process, it can also notify itself. in addition to signal, it also supports the sigaction function based on bsd, which can implement the signal function again.
3. message queue. A message queue is a chain table of messages, including a Posix System V Message Queue. a process with sufficient permissions can add information to the queue. a process with read/write permissions can take messages from the queue, the message queue overcomes the disadvantages of few signal-carrying information. the pipeline can only bear unformatted byte streams and the limitations of the buffer zone.
4. shared memory. This allows multiple processes to access the same memory region. it is the fastest available IPC form. it is generally used in combination with semaphores to achieve synchronization and mutex between processes.
5. semaphores. It is mainly used for synchronization between different processes and different threads of the same process.
6. set of interfaces. More common inter-process communication. It can be used for process communication between different machines.
Generally, Linux processes include the following elements:
1. contains a piece of runable code
2. dedicated system stack space
3. there Are system control blocks in the kernel, which describe the status and time of the system and are controllable by the kernel.
4. independent storage space
Processes are often not directly differentiated from threads, but are often analyzed based on context.
Author: "dancer blog"