Lockless Bimodal Queue for Selective Packet Capture

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Network performance optimization is challenging due to shifting micro-bottlenecks in interconnected systems, where optimizing one component can lead to overall performance degradation, and existing queue solutions face issues with size, locking, and producer-consumer synchronization, causing bottlenecks and inefficiencies.

Innovation Solution

A lockless bimodal queue system that allows simultaneous access by producer and consumer, with a consumer that can transition between active and sleep modes, and a producer that can pseudo-consume packets when the queue is full, enabling selective packet capture and improving system performance by avoiding stalls and packet corruption.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If a traditional queue with locking mechanisms is used for packet processing, then packet data integrity is maintained, but system throughput decreases due to locking overhead and producer stalls

Engineering Contradiction:
Improvesystem throughputVSAvoidpacket data integrity
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The queue is segmented into multiple independent circular buffers, each capable of being accessed by producer and consumer simultaneously without mutual exclusion. This segmentation allows parallel access to different buffer segments, eliminating locking overhead while maintaining data integrity through structured access patterns.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces an intermediary structure where the queue is divided into multiple buffers that act as intermediaries between producer and consumer. This allows both parties to access different buffers simultaneously without direct conflict, achieving lockless operation while preserving data integrity through the structured buffer architecture.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Productivity

If the queue size is increased to handle burst traffic, then packet loss during bursts is reduced, but memory usage and system complexity increase

Engineering Contradiction:
Improveburst handling capabilityVSAvoidqueue structure complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The queue is divided into multiple smaller circular buffers instead of using a single large queue. This segmentation allows the system to handle burst traffic efficiently by distributing packets across multiple buffers, reducing the complexity of managing a single large structure while maintaining burst handling capability.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The queue structure dynamically adapts to traffic patterns by allowing producer and consumer to operate on different buffer segments simultaneously. This dynamic allocation of buffer access rights enables efficient burst handling without requiring a statically large queue structure, reducing overall system complexity.

Inventive Principle:
Principle #15Dynamics

3Speed

If the consumer always remains active to process packets immediately, then system responsiveness is improved, but energy consumption and processing overhead increase

Engineering Contradiction:
Improvesystem responsivenessVSAvoidconsumer energy consumption
Core Design Contradiction:
SpeedVSUse of energy by moving object

Solution Approach 1:

The consumer operates periodically rather than continuously, entering sleep mode when no packets are available and waking up to process packets when needed. The multi-buffer structure enables this periodic operation by allowing the consumer to efficiently check for and process packets across different buffers without requiring constant active monitoring, thus reducing energy consumption while maintaining responsiveness.

Inventive Principle:
Principle #19Periodic action

Solution Approach 2:

The queue structure itself manages the coordination between producer and consumer operations, enabling the consumer to efficiently determine when to wake and process packets. The structured buffer architecture provides self-service mechanisms that reduce the need for continuous consumer activity while maintaining system responsiveness.

Inventive Principle:
Principle #25Self-service

4Reliability

If locking mechanisms are used to prevent packet corruption during simultaneous access, then data integrity is maintained, but operational overhead and processing delay increase

Engineering Contradiction:
Improvepacket data integrityVSAvoidprocessing delay
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The queue is segmented into multiple independent circular buffers that can be accessed simultaneously by producer and consumer without locking. Each buffer segment maintains its own integrity through the structured architecture, eliminating the need for locking mechanisms and associated processing delays while preserving packet data integrity.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The multi-buffer structure acts as an intermediary that enables simultaneous access without direct conflict between producer and consumer. This intermediary architecture maintains packet integrity through its structured design rather than through locking mechanisms, thereby eliminating operational overhead and processing delay associated with locks.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS11588747B2Systems and methods for providing lockless bimodal queues for selective packet capture
Publication Date: 2023.02.21 QUALCOMM INC
  • US11588747B2 patent drawing
  • US11588747B2 patent drawing
  • US11588747B2 patent drawing

AI summary

In a network system, an application receiving packets can consume one or more packets in two or more stages, where the second and the later stages can selectively consume some but not all of the packets consumed by the preceding stage. Packets are transferred between two consecutive stages, called producer and consumer, via a fixed-size storage. Both the producer and the consumer can access the storage without locking it and, to facilitate selective consumption of the packets by the consumer, the consumer can transition between awake and sleep modes, where the packets are consumed in the awake mode only. The producer may also switch between awake and sleep modes. Lockless access is made possible by controlling the operation of the storage by the producer and the consumer both according to the mode of the consumer, which is communicated via a shared memory location.