Concurrent Bag Data Structure for Low-Lock Enumeration

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Concurrent processes in computer systems face performance and scalability issues due to synchronization overhead when multiple threads access shared data, leading to serialization and inhibited performance.

Innovation Solution

A concurrent bag data structure is introduced, utilizing a global lock and local locks on linked lists, allowing for efficient enumeration and minimizing synchronization while maintaining thread safety, by using a dictionary to manage local lists created by threads and optimizing operations based on the number of data elements.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If synchronization mechanisms (locks) are used to ensure thread safety during concurrent data access, then data integrity is maintained, but processing overhead increases and performance deteriorates

Engineering Contradiction:
Improvedata integrityVSAvoidprocessing throughput
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The data structure is divided into multiple independent local lists, each protected by its own lock. This segmentation allows different threads to access different local lists simultaneously without requiring a global lock, thereby maintaining data integrity while reducing synchronization overhead and improving concurrent throughput.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

Each local list has its own lock with specific properties tailored to that list's access patterns. This local quality approach allows fine-grained control over synchronization, where only the specific local list being accessed requires locking, rather than locking the entire data structure, thus improving performance while ensuring reliability.

Inventive Principle:
Principle #3Local quality

2Reliability

If a global lock is used to protect the entire data structure during enumeration, then thread safety is ensured, but access serialization occurs and scalability is inhibited

Engineering Contradiction:
Improvethread safetyVSAvoidscalability
Core Design Contradiction:
ReliabilityVSAdaptability or versatility

Solution Approach 1:

The enumeration operation is segmented across multiple local lists, each with its own lock. Threads can enumerate different local lists in parallel without conflicting with each other, allowing the system to scale with the number of processing resources while maintaining thread safety through local locks rather than a single global lock.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces a new dimension of concurrency by organizing data into multiple independent local lists that can be accessed simultaneously. This dimensional organization allows enumeration operations to proceed in parallel across different local lists, breaking the serialization bottleneck of global locking and enabling scalability.

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

3Productivity

If multiple threads concurrently access and modify the same data structure, then processing parallelism is achieved, but synchronization overhead increases and performance is inhibited

Engineering Contradiction:
Improveconcurrent processing capabilityVSAvoidsynchronization overhead
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

By segmenting the data structure into multiple local lists with independent locks, the patent enables multiple threads to concurrently access different segments without interfering with each other. This reduces the time spent on synchronization operations, as threads only need to acquire locks on the specific local lists they access, not on the entire data structure, thereby maintaining high concurrent processing capability while minimizing synchronization overhead.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS9418175B2Enumeration of a concurrent data structure
Publication Date: 2016.08.16 MICROSOFT TECHNOLOGY LICENSING LLC
  • US9418175B2 patent drawing
  • US9418175B2 patent drawing
  • US9418175B2 patent drawing

AI summary

An enumerable concurrent data structure referred to as a concurrent bag is provided. The concurrent bag is accessible by concurrent threads and includes a set of local lists configured as a linked list and a dictionary. The dictionary includes an entry for each local list that identifies the thread that created the local list and the location of the local list. Each local list includes a set of data elements configured as a linked list. A global lock on the concurrent bag and local locks on each local list allow operations that involve enumeration to be performed on the concurrent bag.