Memory algorithm facing real-time system

A real-time system and memory technology, applied in the field of memory algorithm, can solve the problem of low memory utilization

Inactive Publication Date: 2013-01-16
FUZHOU UNIV
View PDF3 Cites 18 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

The proposal of the partner concept makes the memory allocation time efficiency of the system reach the , which fu

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 algorithm facing real-time system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0024] The present invention faces the memory algorithm of real-time system, such as figure 1 As shown, when searching for the target memory block, it is no longer limited to the traditional linked list traversal search method, but uses the red-black tree data structure to quickly find the required memory block, and realizes the process of releasing and reclaiming the memory block. It has high time efficiency. The algorithm defines the following four types of red-black trees:

[0025] Occupied red-black tree : It is used to store the information of the occupied memory block, including size, physical address, memory ID, etc. At the same time, the memory ID of the memory block is used as a comparison rule. When the program releases the memory, it quickly locates the memory block according to the memory ID and releases the memory. .

[0026] free red-black tree array :definition arrive A total of 18 red-black trees, corresponding to the memory size marked as 1, 2, 3, 4,...

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 relates to a memory algorithm facing a real-time system. A red-black tree data structure is adopted for quickly looking up a required memory block. An algorithm is used for defining an occupied red-black tree, an idle red-black tree array, a backward integration red-black tree and a forward integration red-black tree; when a memory application is in the presence, an idle memory block which meets the requirement is obtained from the idle red-black tree; whether the idle memory block needs to be cut is judged; corresponding processing is carried out; then, the idle memory block is added into the occupied red-black tree; the memory is distributed, and a relevant red-black tree is maintained; when the memory block needs to be released, the forward integration red-black tree and the backward integration red-black tree are inquired according to the head-tail address of a release memory block so as to judge whether backward integration and forward integration are required; the corresponding processing is carried out; then, the release memory block is added into the idle red-black tree; the memory is resealed; and the relevant red-black tree is updated. The algorithm is favorable for improving the memory distribution time efficiency.

Description

technical field [0001] The invention relates to a real-time system-oriented memory algorithm. Background technique [0002] In real-time operating systems, with regard to dynamic memory allocation algorithms and recycling algorithms, research hotspots mainly focus on how to improve the predictability of algorithms, improve memory utilization and reduce memory fragmentation. The traditional on-demand allocation algorithm uses linked list search to achieve high memory utilization, but due to its time efficiency , there is unpredictability in time. The buddy algorithm is a "divide and conquer" allocation algorithm. The proposal of the partner concept makes the memory allocation time efficiency of the system reach the , which fully meets the requirements of predictability, but the memory utilization rate is not high due to the existence of partners. [0003] In general, the basic strategies of the allocation algorithm can be divided into: [0004] 1. Sequential Fit. Also...

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
IPC IPC(8): G06F12/06
Inventor 吴英杰王一蕾夏李波唐文斌许孝盛
Owner FUZHOU UNIV
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