Summary of inter-process communication

Source: Internet
Author: User

1. Unknown pipeline (PIPE): pipeline is a half-duplex communication method. data can only flow in one direction and can only be used between unrelated processes. The kinship of a process usually refers to the parent-child process relationship.

2. named pipe: A famous pipe is also a half-duplex communication method, but it allows unrelated processes to communicate with each other.

3. semophore: a semaphore is a counter that can be used to control access to shared resources by multiple processes. It is usually used as a lock mechanism to prevent other processes from accessing the shared resource when a process is accessing the shared resource. Therefore, it is mainly used for synchronization between processes and between different threads in the same process.

4. message queue: a message queue is a linked list of messages stored in the kernel and identified by the message queue identifier. MQ Customer Service has disadvantages such as low signal transmission information, the pipeline can only carry non-Format byte streams, and limited buffer size.

5. signal: a signal is a complex communication method used to notify the receiving process that a certain time has occurred.

6. shared memory: the shared memory is mapped to a memory that can be accessed by other processes. The shared memory is created by one process, but can be accessed by multiple processes. Shared memory is the fastest IPC method. It is specially designed for the low efficiency of communication between other processes. It is often used with other communication mechanisms, such as semaphores, to achieve synchronization and communication between processes.

7. socket: the socket is also a persistent inter-process communication mechanism. Different from other mechanisms, it can be used for process communication between different hosts.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.