Inter-process communication-Message Queuing

Source: Internet
Author: User

1. IPC Identifiers:

Each of the I P C targets has a unique I p C identifier. The I P C target referred to here refers to a single message queue, a semaphore set, or a shared memory segment. The system kernel uses this identifier to indicate the I P C target in the system kernel.

2. IPC Keywords:

To obtain a unique identifier, you must use an I-P-c keyword. Both the client process and the server-side process must both agree on this keyword. This is the first step in building a client/server framework. In the system V IPC mechanism, it is directly related to the I P C keyword to establish a routing method for both ends of the connection. By setting the keyword value in your application, each keyword you use can be the same. In general, you can use the F-t o K () function to generate a keyword value for the client and server side.

3. Message Queuing Features:

Message Queuing is a list of messages that are stored and managed by the system kernel and referenced through a Message Queuing identifier. Message Queuing has significant advantages over several other IPC mechanisms:

1) Stray control: If the system resource (memory) is strained or the process receiving the message is too late to process the message in the queue, the process that sends the message will enter hibernation in the kernel's control, waiting for the condition to be satisfied and then

Wake up to continue sending messages;

2) record-oriented: sent as a message, a message is sent (received), the integrity of the message is maintained from the structure;

3) Type filtering: Extracts messages from the queue by type of message;

4) Natural synchronization: The empty queue is unreadable, the full queue is not writable, does not receive.

Https://en.wikipedia.org/wiki/Message_queue

Http://www.cnblogs.com/lpshou/p/3145651.html

Inter-process communication-Message Queuing

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.