Memory management method and device for shared memory database

A technology of memory management and shared memory, which is applied in the field of memory database management, can solve problems such as address discontinuity, memory database access performance degradation, etc., and achieve the effect of increasing memory capacity without performance degradation

Active Publication Date: 2017-04-05
ZTE CORP
View PDF9 Cites 9 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] The technical problem to be solved by the present invention is to provide a memory management method and device for a shared memory database, which can solve the problems of the memory database access performance degradation caused by discontinuous multi-segment shared memory database addresses and the need to access data across segments; simplify It eliminates the management complexity caused by the need to remap the shared memory when the multi-segment shared memory database is expanded, and improves the program stability and access efficiency

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
  • Memory management method and device for shared memory database
  • Memory management method and device for shared memory database
  • Memory management method and device for shared memory database

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0047] like Figure 4 As shown, the memory management method of the shared memory database of the present embodiment includes:

[0048] Step 11: Allocate virtual memory space for the database according to the preset maximum value of the database capacity in the space for creating the database;

[0049] Step 12: Allocating a first physical memory for the database, setting the start address of the first physical memory as the start address of the virtual memory space, and inserting or modifying data in the first physical memory;

[0050] Step 13: judging whether the free memory of the database is less than a preset threshold, and obtaining a first judging result;

[0051]Step 14: When the first judgment result is yes, add the second physical memory with the preset expansion step size to the virtual memory space of the database, and set the start address of the second physical memory to The tail address of the previous physical memory;

[0052] Step 15: expand the available me...

Embodiment 2

[0063] This embodiment also provides a memory management device for a shared memory database, including:

[0064] Create a module for allocating virtual memory space for the database according to the preset maximum value of the database capacity in the space for creating the database;

[0065] The first allocation module is configured to allocate a first physical memory for the database, set the start address of the first physical memory as the start address of the virtual memory space, and insert or modify the first physical memory data;

[0066] A first judging module, configured to judge whether the free memory of the database is less than a preset threshold, and obtain a first judging result;

[0067] The second allocating module is configured to add a second physical memory with a preset expansion step size to the virtual memory space of the database when the first judgment result is yes, and add the second physical memory to the virtual memory space of the database. Th...

Embodiment 3

[0079] The memory management method of the shared memory database of the present embodiment comprises the following steps:

[0080] Step A: Set the initial value of the database capacity on the starting database node as required, the unit is M;

[0081] Step B: Set the maximum value of the database capacity on the starting database node as required, the unit is M;

[0082] Step C: Set the size of each expansion step of the database on the starting database node as required, and the unit is M;

[0083] Step D: Start the shared memory database. At this time, the virtual memory space is allocated according to the maximum capacity of the database in the space for creating the database (note: at this time, the physical memory of the maximum capacity of the database is not occupied, but so much is occupied in the process space. Virtual memory space, excess physical memory can be used by other processes);

[0084] Step E: Allocate physical memory with the size of the initial value ...

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 provides a memory management method and device of a shared memory database. The method comprises the following steps of: in a space for creating the database, according to the preset maximum value of database capacity, distributing a virtual memory space to the database; distributing a first physical memory to the database, setting the beginning address of the first physical memory as the beginning address of the virtual memory space so as to bring convenience for inserting or revising data in the first physical memory; judging whether the idle memory of the database is smaller than a preset threshold value or not so as to obtain a first judgment result; when the first judgment result shows that the idle memory of the database is smaller than the preset threshold value, adding a second physical memory with a preset dilatation step size into the virtual memory space of the database, and setting the beginning address of the second physical memory as the tail address of the previous physical memory; and expanding the available memory space of the database. By use of the method, the problem that the address of a multistage shared memory database is discontinuous can be solved, and management complexity caused in a way that the shared memory needs to be remapped when the multistage shared memory database is subjected to dilatation is simplified.

Description

technical field [0001] The invention relates to the field of memory database management, in particular to a memory management method and device for a shared memory database. Background technique [0002] In the current telecommunications field, business generally has high performance requirements for data access, especially when facing data used by a large number of users, not only requires high performance for data access and storage, but also requires reliable expansion functions To cope with the ever-increasing data in the telecommunications field. [0003] Therefore, in the field of telecommunication applications, storage technology must meet the expansion function with high reliability. As a high-performance data access storage technology, in-memory database can meet the above requirements and has been widely used in the field of telecommunication. [0004] In order to meet the needs of multi-core, multi-process (multi-thread) access to the memory database, and for hig...

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): G06F12/02G06F17/30
CPCG06F12/02
Inventor 耿常才李响葛聪
Owner ZTE CORP
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