Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Method of managing memory database space by using bitmap

A database and bitmap technology, applied in the management field of in-memory database systems, can solve the problems of reducing system reliability and maintainability, reducing memory space utilization, and low overall space management efficiency, so as to improve multi-task performance, memory The effect of high space utilization and good scalability

Inactive Publication Date: 2013-06-05
东莞市邻工帮帮电子商务有限公司
View PDF5 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

And the larger the managed space, the longer the linked list, the more serious the contention, and the lower the overall space management efficiency
[0011] 2. A large number of linked list structures consume a lot of memory space, reducing the utilization rate of memory space, and the larger the space, the more waste
[0012] 3. The logic of managing a large number of linked lists is very complicated, which greatly reduces the reliability and maintainability of the entire system

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
  • Method of managing memory database space by using bitmap
  • Method of managing memory database space by using bitmap
  • Method of managing memory database space by using bitmap

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0101] Example 1, such as image 3 As shown, in a typical application scenario, the complete process of initializing and allocating a data page includes the following steps:

[0102] Step A1: It is set in the database system configuration that m MB of memory will be used, where m is a positive integer; and the host supports memory allocation of this capacity. At the same time, set the size of each page as p KB; where, p is a positive integer.

[0103] Step B1: After the database system is started, allocate m by opening up shared memory or similar methods

[0104] MB memory. Assume that the first address of the memory segment is g, where g is a natural number.

[0105] Step C1: Calculate the required primary bitmap area size b1=(m*1024) / (p*8), unit byte.

[0106] Step D1: reserve b1 byte space at the beginning of the total memory segment as a first-level bitmap area, and initialize the bitmap area to all 0s.

[0107] Step E1: Allocate space for the first-level bitmap auxil...

Embodiment 2

[0115] Example 2, such as Figure 4 As shown, in a typical application scenario, the complete process of applying for a record space includes the following steps:

[0116] Step A2: The upper layer business sends a request to apply for a record space in the nth data page.

[0117] Step B2: Locate the first address of the secondary bitmap area of ​​the data page according to the algorithm of steps I1 and J1, find the first available bit in this area according to a certain algorithm, if found, set it to 1, indicating that it has been allocated, and Return success; if not found, go to step C2.

[0118] Step C2: Return the error message "No space left on this page" to the caller

Embodiment 3

[0119] Example 3, such as Figure 5 As shown, in a typical application scenario, the complete process of releasing a record space includes the following steps:

[0120] Step A3: The upper layer business sends a request to release the nth record space in the mth data page. Among them, m and n are natural numbers.

[0121] Step B3: Locate the first address of the secondary bitmap area of ​​the data page according to the algorithm of steps I1 and J1, locate the nth bit, and set it to 0, indicating that it has been recycled, and return successfully; if not found, go to Step C3.

[0122] Step C3: return the error message "page number or record number is illegal" to the caller.

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 a method of managing a memory database space by using a bitmap, comprising the following steps operated in a system memory area: establishing a first-class bitmap area, establishing a first-class bitmap area auxiliary link list, establishing a second-class bitmap area, distributing data pages, distributing records, releasing the records and releasing the data pages. A second-class bitmap structure is combined with the auxiliary link list to control the management of the distribution and the recovery of the data pages and the records. The invention thoroughly overcomes the problem that only one threading operation is available to the same time intervals in the whole structure of the link list, improves the multitasking performance, ensures the high memory database space utilization rate, can manage a large amount of memory, adopts the bit arithmetic, has high efficiency and stable performance, avoids the performance limitation of the page layer and the record layer at the same time and ensures that the database has excellent expansibility, thereby being suitable for wide popularization and application in the filed.

Description

technical field [0001] The invention relates to a management method of a memory database system, in particular to a method for efficiently managing memory database space by using a bitmap. Background technique [0002] Traditional database management systems manage all data on disks, so they are called disk databases. The disk database needs to frequently access the disk to perform data operations. On the one hand, the operation of reading and writing data on the disk requires the mechanical movement of the head, and on the other hand, it is affected by the system call time. When the amount of data is large, the operation is frequent and complicated. , many problems will be exposed. [0003] In recent years, memory capacity has continued to increase and prices have continued to fall. After computers have entered the 64-bit era, the operating system can already support larger address spaces. At the same time, the industry's requirements for real-time response capabilities of...

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 Patents(China)
IPC IPC(8): G06F17/30G06F12/02
Inventor 丁奇鹏印和平卢勤元常二鹏
Owner 东莞市邻工帮帮电子商务有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products