15th. Inter-process Access 15.6 XSI IPC 15.7 Message Queuing

Source: Internet
Author: User

15.6 XSI IPC

(1) 3 types of IPC known as XSI IPC are:

1) Message Queuing

2) Signal Volume

3) Shared memory


(2) Identifiers and keys

1) Identifier: is a non-negative integer used to reference the IPC structure. is the internal name of the IPC object.

2) Key: The external name of the IPC object. Enables multiple collaborative processes to converge on the same IPC object.


(3) Ipc_private key:

Used to create a new IPC structure. You cannot specify this key to reference an existing IPC structure.


(4) Ftok function:

A key is generated by a path name and a project ID.


(5) Ipc_perm Structural body

Specifies the authority and owner of the IPC structure.


(6) Structural Limitations:

The XSI IPC architecture has built-in limitations that can be changed by reconfiguring the kernel.

1) sysctl Command: Observe and modify kernel configuration parameters.

2) Ipcs-l: Displays IPC-related restrictions.


(7) The difference between IPC structure and pipeline, FIFO:

The IPC structure functions in a system-wide and does not have a reference count.


(8) The IPC structure does not have a name in the file system; IPC does not use file descriptors.

15.7 Message Queuing

(1) Do not use Message Queuing in new applications. They have shortcomings. (15.6.4)


(2) Two-way traffic between the client process and the server process, either using Message Queuing or a full-duplex pipeline.

15.8 Signal Volume

(1) A resource is shared among multiple processes, and can be reconciled using one of the semaphores, record locks, and mutexes.


(2) The number of mutexes in shared storage is the fastest, but the author still prefers to use record locks for two reasons:

1) <459>

2)<459>

15.9 Shared storage

(1) The role of shared storage:

Allows two or more processes to share a given storage area.

It is the fastest kind of IPC because data does not need to replicate between client processes and server processes.


(2) The only trick you need to know when using shared storage:

Sync: Read again after writing. (Semaphore , record lock, and mutex )

15th. Inter-process Access 15.6 XSI IPC 15.7 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.