Common communication modes between processes

Source: Internet
Author: User
Tags message queue semaphore

1 Pipe : Pipe is a half-duplex communication mode, the data can only flow in one direction, and can only be used between the process of affinity. A process's affinity usually refers to a parent-child process relationship.

2. Named pipe FIFO: A well-known pipe is also a half-duplex mode of communication, but it allows communication between unrelated processes.

4. Message Queuing MessageQueue: Message Queuing is a linked list of messages, stored in the kernel and identified by message queue identifiers. Message Queuing overcomes the disadvantages of less signal transmission information, only unformatted byte stream, and limited buffer size.

5. Shared storage sharedmemory: Shared memory is the mapping of memory that can be accessed by other processes, which is created by a process, but can be accessed by multiple processes. Shared memory is the fastest IPC approach and is specifically designed for low-efficiency operation of other interprocess communication modes. It is often used with other communication mechanisms, such as signal two, to achieve synchronization and communication between processes.

6. Semaphore Semaphore: Semaphore is a counter that can be used to control the access of multiple processes to shared resources. It is often used as a locking mechanism to prevent a process from accessing the shared resource while other processes are accessing the resource. Therefore, it is primarily used as a means of synchronization between processes and between different threads within the same process.

7. Socket SOCKET : The socket is also an inter-process communication mechanism, which differs from other communication mechanisms in that it can be used for different processes and communication between them.

8. Signal (sinal): signal is a more complex mode of communication for notifying the receiving process that an event has occurred.

Common communication modes between processes

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.