Lockless FIFO LIFO Queue with Priority-Based Insertion
Find Innovative SolutionsGenerate 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
Engineering 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
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.
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.
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
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.
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.
Data Source
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.


