Memory Pool Management Using Binary Search Tree Allocation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In computing systems, memory fragmentation leads to scattered logical pages, reducing GPU-to-memory efficiency when fetching data from non-contiguous pages, as recent memory technologies like DDR and LPDDR5 perform poorly with scattered pages compared to contiguous ones.
Innovation Solution
A memory management process that adds physical addresses of available memory blocks to a binary search tree, allowing for efficient allocation of memory in physical address order, using a red-black tree to maintain and rebalance memory allocations, thereby ensuring more contiguous memory blocks are allocated to processes.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If memory is allocated using traditional methods, then memory allocation is simple, but memory blocks become scattered and GPU-to-memory efficiency decreases
Solution Approach 1:
The patent applies preliminary action by pre-organizing available memory blocks into a binary search tree data structure before allocation occurs. The memory management process inserts each available memory block's physical address into the binary search tree, which automatically sorts them in physical address order. This preliminary organization enables efficient contiguous allocation when requests come in, without requiring complex real-time sorting or searching operations during the allocation itself.
2Stability of the object's composition
If memory blocks are allocated in physical address order, then memory contiguity improves, but allocation process complexity increases
Solution Approach 1:
The patent introduces a binary search tree as an intermediary data structure between the memory management process and the physical memory blocks. This intermediary automatically maintains memory blocks in sorted physical address order through its inherent tree structure, allowing the allocation process to simply traverse the tree in-order to retrieve contiguous blocks. The binary search tree handles the complexity of sorting and organizing memory addresses, while the allocation process remains relatively simple.
3Productivity
If a binary search tree is used to manage memory allocations, then memory allocation efficiency improves, but memory management complexity increases
Solution Approach 1:
The patent changes the organizational parameter of memory management from traditional free-list or buddy allocation methods to a binary search tree structure organized by physical address. This parameter change enables efficient retrieval of contiguous memory blocks by leveraging the sorted nature of the binary search tree. The tree structure allows for O(log n) insertion and O(n) in-order traversal to find contiguous blocks, improving allocation efficiency compared to linear search through unorganized memory lists.
Data Source
AI summary
Adding, by a memory management process executing in a computing device, a physical address of each of a plurality of available blocks of memory to a binary search tree based on the physical address. After the adding, receiving, by the memory management process, a request for a memory allocation, the memory allocation to be from the plurality of available blocks. Allocating, by the memory management process and in response to the request, blocks of memory in physical address order from the binary search tree.


