Non-blocking Parallel Memory Grid for Database Garbage Collection
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In large-scale relational database management systems, timely garbage collection is challenging due to the finite capacity of main memory, especially when hundreds of database engines run in parallel and perform thousands of transactions per second, leading to inefficiencies in memory management and potential deletion of incorrect versions.
Innovation Solution
A non-blocking parallel memory mechanism is implemented using a grid structure with vertical and horizontal singly linked lists, where a thread can traverse and set row versions as 'GC ready' without blocking, ensuring instant garbage collection and minimizing memory access through compare-and-swap operations, preventing stale pointers and incorrect deletions.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If traditional garbage collection is applied in large-scale relational database management systems with hundreds of database engines running in parallel, then memory management is performed, but timely garbage collection becomes challenging and inefficient due to blocking operations and potential deletion of incorrect versions
Solution Approach 1:
The patent segments the memory management space into multiple independent grid structures, each handling a portion of the heap. Multiple threads can simultaneously traverse and collect garbage in different grids without blocking each other. This segmentation enables parallel garbage collection while maintaining reliability through isolated operations in each grid segment.
Solution Approach 2:
The patent implements dynamic thread assignment and grid traversal mechanisms where threads can be dynamically allocated to different grids based on workload. The system dynamically adjusts the traversal order and timing of garbage collection operations across multiple grids, enabling non-blocking parallel execution that maintains correctness while improving collection speed.
2Productivity
If parallel garbage collection is implemented to improve collection speed, then productivity increases, but blocking operations may occur and cause threads to wait, reducing efficiency
Solution Approach 1:
By dividing the heap into multiple independent grids, the patent enables true parallel garbage collection where threads work simultaneously on different segments without blocking each other. Each thread traverses its assigned grid independently, eliminating waiting time while maintaining high throughput through coordinated multi-threaded operation.
Solution Approach 2:
The patent introduces grid structures as intermediary containers that organize heap objects and manage thread access. These grids act as mediators that coordinate parallel thread operations, allowing threads to process different grids concurrently without direct interference, thus eliminating blocking while maintaining systematic control over the garbage collection process.
3Productivity
If more memory is allocated to support parallel operations and grid structures, then garbage collection capability improves, but memory capacity is consumed
Solution Approach 1:
The grid structures serve multiple functions: they organize heap objects, enable parallel thread execution, track object versions, and manage garbage collection state. By making the grid structure multi-functional, the patent avoids needing separate data structures for each function, thereby reducing overall memory overhead while enabling sophisticated parallel garbage collection capabilities.
Solution Approach 2:
The patent changes the organizational parameters of memory from traditional linear or hierarchical structures to a grid-based parameterization. This parameter change enables more efficient memory utilization by allowing compact representation of multi-dimensional object relationships and enabling parallel access patterns that reduce the total memory footprint required for garbage collection metadata.
Data Source
AI summary
A transaction descriptor associated with a vertical chain of row versions is received. The vertical chain of row versions is traversed. The vertical chain is part of a grid structure formed by a number of vertical chains intersected with a number of horizontal chains. A link to a current row version is terminated. A link from the current row version to an older row version in a horizontal chain is locally stored and terminated. The older row version is set as ready for garbage collection. The current row version is set as ready for garbage collection. A link from the current row version to a next row version in the horizontal chain is locally stored and terminated. The next row version is appointed as current.


