Lockless FIFO LIFO Queue with Priority-Based Insertion

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing queue management systems face issues with scalability and priority handling, as locking mechanisms can be expensive and lead to delays in processing high-priority data elements in FIFO queues, and traditional FIFO queues do not efficiently handle urgent data elements.

Innovation Solution

A lockless FIFO/LIFO queue system that uses priority types to determine data element placement, allowing high-priority elements to be inserted closer to the head and processed before lower-priority ones, utilizing atomic compare-and-swap instructions to manage shared resources without locks, ensuring consistent and efficient data element insertion and removal.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If a locking mechanism is implemented to ensure thread safety, then queue consistency is maintained, but system scalability and performance deteriorate due to the expensive cost of acquiring and releasing locks

Engineering Contradiction:
Improvequeue consistencyVSAvoidsystem scalability
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent extracts the locking mechanism from the queue management system entirely, replacing it with a lockless design that uses atomic operations and hazard pointers. This removes the bottleneck of lock acquisition and release while maintaining thread safety through alternative mechanisms.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent substitutes the mechanical locking system with a software-based atomic operation system using compare-and-swap (CAS) instructions and hazard pointers. This replaces the traditional mutex lock mechanism with a more efficient atomic reference counting approach that avoids the overhead of lock management.

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

2Ease of manufacture

If a FIFO queue structure is used, then simple implementation is achieved, but high-priority requests must wait for lower-priority requests resulting in undesirable performance

Engineering Contradiction:
Improveimplementation simplicityVSAvoidpriority handling efficiency
Core Design Contradiction:
Ease of manufactureVSProductivity

Solution Approach 1:

The patent segments the queue into multiple priority levels (at least two distinct priority queues), allowing requests to be organized and processed according to their priority. This segmentation enables high-priority requests to be handled separately from low-priority requests, eliminating the waiting problem in traditional FIFO queues.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent implements a dynamic queue structure where the processing order can change based on request priority rather than strict insertion order. The system can dynamically switch between processing elements from different priority queues, allowing adaptive response to varying priority requirements while maintaining operational simplicity.

Inventive Principle:
Principle #15Dynamics

Data Source

PatentUS9246836B2Single producer, single consumer lockless FIFO/LIFO queue
Publication Date: 2016.01.26 SYBASE INC
  • US9246836B2 patent drawing
  • US9246836B2 patent drawing
  • US9246836B2 patent drawing

AI summary

A query inserter receives data elements having individual priority types for placement in a queue, and utilizes the priority types of the received data elements to determine placement in the queue relative to an initial location established when a first data element is placed in an empty queue in order to manage the queue with a combination of first-in first-out and last-in first-out queue functionality.