Message storage method and message reading method based on shared memory
A technology for storing messages and messages, applied in communication between programs, instruments, multi-program devices, etc., can solve the problems of "real-time" performance, high learning and maintenance costs, and inflexible configuration, etc., to improve efficiency and configure Flexible, achieve high-speed transfer effect
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0039] This embodiment provides a storage space. First, by applying for storage space, the storage space is divided into a message control area and a message storage area. The message storage area is used to store data and includes multiple storage sub-queues. The message control area is used to store Record the array of read and write information of the storage subqueue, including storage subqueue capacity, write process / thread write message sequence, read process / thread read message sequence, sub-message size, storage subqueue start address and other information . Such as figure 1 As shown, assuming that there are process 1 and process 2 now, the two processes go to the user-level page table through the virtual address space, and then map to the same memory area of physical memory through the user-level page table, and realize inter-process communication through the shared memory area .
[0040] Multiple storage sub-queues are stored in the storage space, and are stored ...
Embodiment 2
[0047] This embodiment provides a message storage method, which can be used in the billing system of the telecommunications industry. It is necessary to realize the real-time billing requirements of high concurrency and low delay, and realize the storage of messages in the storage space described in Embodiment 1. First, the Store the message in the storage space, and then determine the start of the storage sub-queue by obtaining the length of the message to be stored, the start address of the storage sub-queue corresponding to the stored message, and the message storage location number of the storage sub-queue address offset, and then determine the storage address of the message, and store the message to be stored, such as Figure 4 As shown, the message storage method includes the following steps:
[0048] S21: Obtain the length of the message to be stored.
[0049] S22: Obtain the start address of the storage sub-queue corresponding to the message to be stored and the messa...
Embodiment 3
[0073] This embodiment provides a method for reading a message, which is used to read the message stored by the method in Embodiment 2, such as Figure 8 shown, including:
[0074] S31: Obtain the length of the message to be read. The starting position of the storage subqueue of the message to be read in the memory space is further obtained through the length of the message to be read.
[0075] S32: Obtain the start address of the storage subqueue corresponding to the message to be read and the position number of the message to be read according to the array in the message control area. The starting address is the memory location corresponding to the storage subqueue where the message is located, and is used to determine the storage address corresponding to the message to be read. The location number of the message to be read is the location number in the storage subqueue where the message is to be read. It is used to correspond to the storage address of the message in the s...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com