Lock-Free Vector Data Structure Access via Garbage Collection

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In database systems, memory allocation and deallocation are hindered by parallel threads, leading to performance bottlenecks due to the need for locking mechanisms, which are costly in terms of synchronization overhead.

Innovation Solution

Implementing a lock-free read access mechanism using garbage collection, where memory is attached to a garbage collection system to ensure it is freed at a future time when no parallel threads are operating on the data.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If locking mechanisms are used to ensure data consistency during parallel operations, then data reliability is improved, but system performance deteriorates due to synchronization overhead

Engineering Contradiction:
Improvedata consistencyVSAvoidsystem performance
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent extracts the locking mechanism from the memory management process entirely. Instead of using locks to protect memory operations, the system uses garbage collection with version tags to automatically manage memory lifecycle. This removes the synchronization overhead while maintaining data consistency through the versioning mechanism.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent introduces version tags as an intermediary between the memory manager and parallel threads. These tags act as mediators that allow the memory manager to track which memory portions are actively used by which threads, enabling safe memory reclamation without locks. The version tags serve as the communication bridge that replaces the need for direct thread coordination through locking.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Quantity of substance

If memory is immediately freed after data structure growth, then memory utilization is improved, but system reliability deteriorates due to premature memory deallocation

Engineering Contradiction:
Improvememory utilizationVSAvoidmemory safety
Core Design Contradiction:
Quantity of substanceVSReliability

Solution Approach 1:

The patent applies preliminary action by attaching version tags to memory portions before they are freed. This allows the system to pre-track the lifecycle of each memory portion, knowing exactly when it becomes safe to reclaim. The version tags are set in advance during memory allocation and growth operations, enabling the memory manager to make informed decisions about when memory can be safely freed without interfering with ongoing parallel operations.

Inventive Principle:
Principle #10Preliminary action

3Reliability

If read/write locks are used for data structure access, then data consistency is improved, but device complexity increases due to lock management overhead

Engineering Contradiction:
Improvedata consistencyVSAvoidlock management
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent completely removes the lock management subsystem from the system architecture. Instead of implementing read/write locks with their associated acquisition, release, and contention handling, the system uses a lock-free approach based on version tags and garbage collection. This extraction eliminates the complexity of lock management while maintaining data consistency through the versioning mechanism.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The memory management system becomes self-service through automatic garbage collection based on version tags. Instead of requiring external lock management to coordinate access, the system autonomously tracks memory usage through version tags and automatically reclaims memory when safe. This self-service mechanism eliminates the need for complex lock management infrastructure.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS12242727B2Lock-free read access to vector data structures
Publication Date: 2025.03.04 SAP SE
  • US12242727B2 patent drawing
  • US12242727B2 patent drawing
  • US12242727B2 patent drawing

AI summary

Disclosed herein are system, method, and computer program product embodiments for providing a lock-free read access to one or more data structures. An embodiment operates by allocating a first portion of a memory corresponding to a first data structure of the one or more data structures, the first data structure comprising a size. The embodiment then performs a first operation associated with the first data structure. The embodiment then receives a first request to insert second data to the first data structure, and determines whether an increase of the size is to be executed. The embodiment then, based on the determination that an increase of the size is to be executed, inserting the second data to a modified first data structure, comprising: executing garbage collection to free-up the first portion of the memory based on at least one parallel operation associated with the first data structure.