Dynamic Lock-Free Hash Table Concurrency Management

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

High-performance systems, such as web servers and database servers, face challenges in maintaining efficient hash table operations as the number of items in the cache varies greatly, leading to increased costs and concurrency issues during insertions, lookups, and deletions, especially when the hash table size needs to be dynamically adjusted.

Innovation Solution

A dynamic lock-free linear hash table manager that includes a table update component, capacity status component, and maintenance component, enabling lock-free merges and splits of hash table buckets based on capacity indicators, with linked lists ordered in reverse-split ordering to ensure efficient and concurrent operations.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If the hash table size is dynamically adjusted to match the number of items, then the operation cost efficiency is improved, but the concurrency issues and blocking operations worsen during resizing

Engineering Contradiction:
Improveoperation cost efficiencyVSAvoidconcurrency safety
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The hash table implements dynamic resizing capability where the table size can be automatically adjusted based on the number of items stored. The system monitors capacity indicators and triggers expansion or contraction operations to maintain optimal load factors, ensuring O(1) operation costs while adapting to varying workloads.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The hash table is divided into multiple buckets that can be independently managed. During expansion, new buckets are created and integrated; during contraction, excess buckets are removed. This segmentation allows resizing operations to proceed without blocking concurrent access to other buckets, maintaining concurrency safety while enabling dynamic size adjustment.

Inventive Principle:
Principle #1Segmentation

2Productivity

If lock-free operations are implemented for merges and splits, then the blocking operations are reduced, but the operational complexity increases

Engineering Contradiction:
Improveconcurrency throughputVSAvoidoperational complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The system replaces traditional locking mechanisms (mechanical synchronization) with atomic operations and memory barriers. Instead of using mutexes or semaphores that block threads, the implementation uses lock-free data structures with compare-and-swap (CAS) instructions and hazard pointers to manage concurrent access during bucket merges and splits, eliminating blocking while managing complexity through standardized atomic primitives.

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

Solution Approach 2:

The patent introduces intermediary structures such as dummy buckets and transition states that facilitate lock-free merges and splits. These intermediaries act as buffers during reorganization operations, allowing concurrent threads to safely access modified buckets without direct locking. The complexity is managed by confining the sophisticated logic to these intermediary mechanisms rather than throughout the entire data structure.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Ease of manufacture

If buckets are merged and split in fixed order, then the implementation simplicity is improved, but the performance under high concurrency worsens

Engineering Contradiction:
Improveimplementation simplicityVSAvoidconcurrency performance
Core Design Contradiction:
Ease of manufactureVSProductivity

Solution Approach 1:

The system transitions from fixed-order bucket reorganization to dynamic, parallel reorganization. Multiple buckets can be merged or split simultaneously in different orders based on availability and concurrency conditions. This dynamic approach maintains implementation simplicity by preserving the logical sequence while allowing physical parallelization, thereby improving concurrency performance without sacrificing ease of implementation.

Inventive Principle:
Principle #15Dynamics

Data Source

PatentUS8812555B2Dynamic lock-free hash tables
Publication Date: 2014.08.19 MICROSOFT TECHNOLOGY LICENSING LLC
  • US8812555B2 patent drawing
  • US8812555B2 patent drawing
  • US8812555B2 patent drawing

AI summary

A table update component may perform updates on a dynamic linear hash table, the updates requested by clients based on request item values. A table capacity status component may determine first capacity indicators associated with the dynamic linear hash table, based on results of the update requests. A table maintenance component may initiate lock-free merges and lock-free splits of hash table buckets associated with the dynamic linear hash table, based on initiating lock-free merges and lock-free splits of linked lists included in hash table buckets associated with the dynamic linear hash table, based on the determined first capacity indicators, the linked lists including hashed items stored in the dynamic linear hash table.