Comparison of communication modes between IPC processes

Source: Internet
Author: User

How to communicate between processes:

1) There are also named pipes and non-named pipes in the pipeline, non-named pipes can only be used for parent-child process communication, named pipes can be used for non-parent-child processes, named Pipes are FIFO, pipeline is a first-out communication mode. FIFO is a first-in-one-out queue. It is similar to a pipeline that allows only one-way flow of data. Each FIFO has a name that allows unrelated processes to access the same FIFO and therefore also becomes a named tube.

2) Message Queuing: is used for communication between two processes, first creating a message queue in one process, then writing the data to the message queue, and the other process fetching data from that message queue. Note that Message Queuing is created by creating a file, and if one process writes data to a message queue, the other process does not take out the data, even though the process of writing data to the message queue has ended, the data saved in the message queue does not disappear. That is, the next time from this message queue to read data, is the last data!!!

3) Semaphore, can not transmit complex messages, can only be used to synchronize

4) shared memory, as long as the first to create a shared memory area, other processes follow certain steps to access the data in this shared memory area, of course, can be read and write, the fastest.


Comparison of communication modes between IPC 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.