Inter-process communication between embedded Linux (v)--Introduction to interprocess communication

Source: Internet
Author: User

Inter - process communication between embedded Linux (v)--Introduction to interprocess communication I. Introduction to inter-process communication

    l inux process communication way linux of Bell Labs. system V IPC and BSD Socket two interprocess communication mechanisms

Linux inter-process communication methods include: Pipelines ,FIFO, signal , System v Message Queuing,System v semaphore,System v shared memory, Socket Communication.

Purpose of inter-process communication:

A, Data Transfer : inter-process needs to transfer data to each other

B, Shared data: multiple Inter -process operations sharing data

C, Notification Events : inter-process needs to notify the occurrence of an event

D, resource sharing: Sharing the same resources among multiple processes , requires the kernel to provide lock and sync mechanisms

E, Process Control: Some processes need to complete control over the execution of another process, such as Debug process)

Second, advantages and disadvantages of multi-process programming 1. Advantages

A, each process is independent of each other, does not affect the stability of the main program, the child process crashes okay

B, by increasing the CPU , you can easily expand performance

C, can minimize line Cheng / unlocking effect, greatly improving performance

D, each child process has 4GB address space and related resources, the overall performance limit can be very large

2. Disadvantages

A, logic control complex, need to interact with main program

B, need to cross process boundaries, if there is a large amount of data transfer, it is not very good, suitable for small data transfer, dense operation

C, multi-process scheduling overhead is relatively large


This article from "Endless life, Struggle not only" blog, reprint please contact the author!

Inter-process communication between embedded Linux (v)--Introduction to interprocess communication

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.