Method for improving utilization ratio of Linux idle memory blocks

A technology of free blocks and memory blocks, which is applied in the field of memory management and can solve problems such as insufficient utilization of free memory blocks and waste of free memory resources.

Inactive Publication Date: 2014-01-08
CAPITAL NORMAL UNIVERSITY
View PDF0 Cites 4 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] The present invention aims to solve the problem of waste of free memory resources existing in the existing buddy algorithm. The free memory blocks in the memory are equal in size and have continuous addresses but do not satisfy the partnership relationship, and are also merged into a large memory block. request
[0007] The above-mentioned technical scheme proposed by the present invention overcomes the defect that the free memory blocks of equal size and continuous addresses but not in partnership cannot be fully utilized in the traditional buddy algorithm

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 for improving utilization ratio of Linux idle memory blocks
  • Method for improving utilization ratio of Linux idle memory blocks
  • Method for improving utilization ratio of Linux idle memory blocks

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0014] The optimization method proposed by the present invention aimed at the deficiency of the buddy algorithm in Linux memory management will be described below in conjunction with the accompanying drawings.

[0015] In view of the flaws in the above-mentioned partner algorithm, we relax the restrictions on the partner relationship, modify the partner algorithm, and add a two-dimensional array availablefreeblock[][2] and an unsigned integer variable availablecount to the free_area_struct structure. The array availablefreeblock[][2] is used to store the starting page numbers of two adjacent free blocks that are not in partnership in the next level of free_area_struct; the variable availablecount represents the number of two adjacent free blocks that relax the partnership. The optimization scheme also modifies the memory allocation and release functions of the buddy algorithm. Under normal circumstances, the original buddy algorithm is used to manage the allocation of free bloc...

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

Disclosed is a method for improving the utilization ratio of Linux idle memory blocks. The method is characterized in that in a Linux buddy system, limitations on partnerships are reduced, and two idle blocks, which are not disassembled from the same big block, of the same size and continuous addresses are combined to form a partnership extended block; meanwhile, a two-dimensional array and an integer variable are added to a partnership system structural body free_area_struct, wherein the two-dimensional array is used for recording the serial numbers of two idle blocks having the extended partnership in the next order, and the integer variable is used for recording the number of blocks having the extended partnership in the next order; if requirements for memory allocation of a requester can not be met by a system, idle blocks having the partnership to be extended will be searched by the system and are allocated to the requester, and accordingly the memory utilization ratio is effectively improved.

Description

technical field [0001] The invention belongs to the technical field of memory management, and in particular relates to the allocation and reclaim management of free memory blocks by a buddy algorithm in Linux memory management. Background technique [0002] All pages in Linux memory are divided according to the power of 2, and the exponent of the power is called the order. The order size is generally O-MAX_ORDER-1. When operating memory, these memory blocks are often divided into two blocks of equal size. These two blocks have a partnership relationship. When the system requests (0≤n<MAX_ORDER) page blocks of page size, the partner algorithm first in 2n free blocks Search, if found, it will be allocated, if not found, it will be searched in 2(n+1)~2(MAX_ORDER-1) free blocks at a time for allocation and insert the partner block into the corresponding linked list. When the page block is released, the buddy algorithm first checks whether its buddy block is in the free list...

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/06
Inventor 张树东孟兆飞周丽娟黄向阳任仲山
Owner CAPITAL NORMAL UNIVERSITY
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