Circular Queue Split Index Lock-Free Management

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional circular queue management techniques face issues such as performance degradation due to locking mechanisms, inefficient memory utilization, and overhead from using NULL entries, which limit the maximum occupancy and cause problems in applications requiring large queue elements.

Innovation Solution

Implementing a lock-free circular queue system using split index values for front and rear pointers, where the rear pointer is updated during enqueue operations and the front pointer during dequeue operations, allowing for asynchronous and parallel operation without the need for locks, and distinguishing full and empty states without additional memory waste.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If separate flags are maintained for empty and full states, then queue states can be distinguished, but lock between enqueue and dequeue processes is required, slowing down queue performance

Engineering Contradiction:
Improvequeue state distinctionVSAvoidqueue performance
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The index field is segmented into two separate index fields (first index field and second index field) that work together to distinguish queue states. The first index field points to the head element and the second index field points to the tail element, with their relationship indicating whether the queue is full or empty without requiring additional flags or locks

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The solution moves from using a single-dimensional index to a two-dimensional index system where the relationship between the first and second index fields provides state information. This dimensional expansion allows the system to encode full/empty state distinction in the index relationship itself rather than requiring separate flag fields

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

2Reliability

If NULL entries are used to identify vacant queue elements, then empty elements can be distinguished, but substantial overhead is incurred for writing and verifying NULL entries

Engineering Contradiction:
Improvevacant element identificationVSAvoidoverhead for writing and verifying NULL entries
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The solution extracts the state identification function from the data field itself. Instead of using NULL data values to indicate vacant elements, the system uses the relationship between index fields to identify queue state, completely separating state management from data storage and eliminating the overhead of writing and verifying special data values

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The index fields serve as intermediaries that mediate between the queue structure and the state information. Rather than storing state information in the data elements themselves (like NULL values), the index fields indirectly represent queue state through their numerical relationship, reducing complexity at the data element level

Inventive Principle:
Principle #24Intermediary (Mediator)

3Reliability

If a Lamport queue reserves a vacant element ahead of the front of the queue, then full and empty states can be distinguished, but maximum occupancy is limited to N-1, leading to inefficient memory utilization

Engineering Contradiction:
Improvestate distinctionVSAvoidmemory utilization
Core Design Contradiction:
ReliabilityVSQuantity of substance

Solution Approach 1:

The solution applies local quality by making the index fields have different meanings and update behaviors depending on the queue operation. The first index field is updated by the enqueue operation while the second is updated by dequeue, and their relative values locally indicate queue state. This allows full utilization of all N elements while maintaining state distinction through the localized relationship between indices

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS11693663B2Circular queue management with split indexes
Publication Date: 2023.07.04 UT BATTELLE LLC
  • US11693663B2 patent drawing
  • US11693663B2 patent drawing
  • US11693663B2 patent drawing

AI summary

Methods and apparatus for managing circular queues are disclosed. A pointer designates an index position of a particular queue element and contains an additional pointer state, whereby two pointer values (split indexes) can designate the same index position. Front and rear pointers are respectively managed by dequeue and enqueue logic. The front pointer state and rear pointer state distinguish full and empty queue states when both pointers designate the same index position. Asynchronous dequeue and enqueue operations are supported, no lock is required, and no queue entry is wasted. Hardware and software embodiments for numerous applications are disclosed.