Differences between shared memory and message queue, FIFO, and message transmission in pipelines

Source: Internet
Author: User

The shared memory zone is the fastest available IPC format. Once such a memory zone is mapped to the address space of the process sharing it, the data transmitted between these processes is no longer transferred to each other by executing any system call into the kernel, saving time.
The differences between shared memory and message queue, FIFO, and message transmission in pipelines are as follows:
The latter, message queue, FIFO, and pipeline message transmission methods are generally
1: The server receives the input
2: Data is written to a message queue through an MPS queue, which usually needs to be copied from the process to the kernel.
3: the customer copies the data from the kernel to the process.
4: then copy the file from the process to the output file.
The above process usually takes four copies to complete file transfer.
The shared memory only needs
1: from the input file to the shared memory area
2: output from the shared memory area to the file

The above process does not involve kernel copying, so it takes less time.




Http://bbs.chinaunix.net/thread-2020589-1-1.html

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.