IPC communication method based on shared memory pool

A technology of shared memory and communication method, applied in the field of IPC communication based on shared memory pool, which can solve the problems of no mechanism to ensure the correctness of memory operation and no actual problem solving.

Pending Publication Date: 2020-07-17
BEIJING ZUOJIANG TECH
View PDF5 Cites 12 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] The technical solution described in the Chinese patent "CN130514053 A Communication Method Based on Shared Memory" When a process occupies read and write permissions for a long time, it will inevitably produce various uncertain results for other processes. Although there is an elimination mechanism, there is no practical solution problem, but only guarantees the normal operation of the system, which is guaranteed by sacrificing the running time of other processes
In addition, the technical solution only checks the read and write permissions. Although the relative independence of the data of each process is guaranteed to a certain extent, there is no mechanism to ensure the correctness of the memory operation of the owner of the shared memory segment.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • IPC communication method based on shared memory pool
  • IPC communication method based on shared memory pool
  • IPC communication method based on shared memory pool

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0021] In order to make the purpose, content, and advantages of the present invention clearer, the specific implementation manners of the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments.

[0022] A kind of IPC communication method based on shared memory pool of the present invention comprises:

[0023] figure 1 Shown is a schematic diagram of the organizational structure of shared memory management. As shown in the figure, shared memory management includes:

[0024] Use SMCB (share memory control block, shared memory control management block), shared memory minimum management unit BLK (block), shared memory minimum management unit header information BLK_HEAD, shared memory minimum management unit tail information BLK_TAIL, doubly linked list and other data The structure uniformly manages the system application for shared memory, including:

[0025] 1. BLK: The smallest management unit of shared memory,...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses an IPC communication method based on a shared memory pool. The method comprises the steps: carrying out the IPC communication, which comprises message receiving and message sending; wherein the message sending comprises the steps of applying for a shared memory, continuing if the application succeeds, otherwise ending; writing message data into the shared memory; convertingthe applied virtual address of the shared memory into a logic address; sending the logic address to a destination receiving queue; message receiving of the receiving queue comprises the steps that the receiving message queue receives the logic address; restoring the logic address into a memory pool ID and a shared memory minimum management unit logic address according to a conversion formula; obtaining a virtual address through the memory pool ID logic address, wherein the sum of the virtual address and the shared memory minimum management unit logic address is equal to the actual storage address of the message; processing the message; releasing the logic address; memory pool creation management. According to the method provided by the invention, the information copying times of the kernel during IPC communication are reduced. The system overhead is reduced.

Description

technical field [0001] The invention relates to computer communication technology, in particular to an IPC communication method based on a shared memory pool. Background technique [0002] There are many tools to choose from for IPC communication under the Linux system, including pipes, FIFOs, sockets, message queues and shared memory. All tools can be divided into two categories, data transfer tools and shared memory. The data transfer tool requires two data transfers between user memory and kernel memory, one transfer is from user memory to kernel memory when writing, and the other transfer is kernel memory to user memory when reading; shared memory Processes are allowed to complete information interaction by putting data into a piece of memory shared between processes. A process can make other processes read the data by putting data into a shared memory block. Shared memory is very fast because the communication does not require system calls and data transfers between u...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/54
CPCG06F9/544
Inventor 杜若蒙魏志锋
Owner BEIJING ZUOJIANG TECH
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products