Lockless Resource Reclamation in Single Writer Multiple Reader Systems

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional single writer multiple reader technologies face inefficiencies in resource reclamation due to locking mechanisms and read counting procedures, which impair performance by consuming processing power and time.

Innovation Solution

Implementing a lockless resource reclamation method that maintains a set of fleeting contexts to represent a lockless data structure, determines the oldest context, identifies references to objects in a discard list, and reclaims memory locations, allowing multiple readers to access shared memory simultaneously without locking or tracking read counts.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If a locking mechanism is implemented to enable readers and writer to lock objects in shared memory, then data consistency is ensured, but performance deteriorates due to time consumption and processing power usage

Engineering Contradiction:
Improvedata consistencyVSAvoidperformance
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent extracts the locking mechanism entirely from the system, replacing it with a lockless architecture using version counters and atomic operations. This removes the source of performance degradation while maintaining data consistency through alternative mechanisms like the w (writer) counter and r (reader) counter that enable readers to access data without acquiring locks.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent replaces the mechanical locking system with atomic memory operations and version-based validation. Instead of using locks that block access, the system uses atomic read and write operations with version counters that allow concurrent access while ensuring consistency through mathematical validation of read and write sequences.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

2Reliability

If a read counting mechanism is implemented to track readers accessing objects, then resource reclamation is enabled, but performance deteriorates due to time consumption and processing power usage

Engineering Contradiction:
Improveresource reclamationVSAvoidperformance
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent merges the read counting function into the existing version counter mechanism. The r (reader) counter serves dual purposes: it tracks the number of active readers for resource reclamation decisions and simultaneously participates in the version validation logic that ensures data consistency, eliminating the need for separate read counting infrastructure.

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

The version counters (w and r) are designed to be multi-functional, serving both as consistency validation mechanisms and as resource management trackers. The same counters that validate read-write sequences also determine when objects can be safely reclaimed, eliminating redundant tracking systems.

Inventive Principle:
Principle #6Universality (Multi-functionality)

3Reliability

If locking mechanisms and read counting are used, then resource reclamation can be performed, but system complexity increases

Engineering Contradiction:
Improveresource reclamationVSAvoidsystem complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent extracts the separate read counting mechanism and replaces it with the version counter system, reducing the number of independent components. By using the same w and r counters for both consistency validation and resource reclamation, the system eliminates redundant data structures and simplifies the overall architecture.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent applies local quality by making the version counters context-dependent, where the same counters serve different functions in different contexts (consistency validation vs. resource management). This contextual multi-functionality reduces the need for separate global tracking systems.

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS11307896B1Apparatus, system, and method for lockless resource reclamation in single writer multiple reader technologies
Publication Date: 2022.04.19 JUNIPER NETWORKS INC
  • US11307896B1 patent drawing
  • US11307896B1 patent drawing
  • US11307896B1 patent drawing

AI summary

A disclosed method may include (1) maintaining a set of fleeting contexts that represent a lockless data structure at different moments in time, (2) determining an oldest context within the set of fleeting contexts, (3) identifying, within a discard list of the oldest context, a reference to an object stored in shared memory, and then (4) reclaiming, in the shared memory, a memory location occupied by the object whose reference was identified within the discard list of the oldest context. Various other apparatuses, systems, and methods are also disclosed.