Hardware Atomic Queue Allocation for Multi-Client Systems

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In computing systems with multiple asynchronous clients, the process of submitting payloads to a shared queue often results in conflicts due to race conditions, leading to inefficiencies and processing delays, as existing solutions like additional queues or mutex algorithms are either costly or cause serialization, undermining the benefits of decoupling in multi-threaded systems.

Innovation Solution

A method that uses atomic READ operations to obtain insertion pointers for payload allocation in a shared memory queue, allowing multiple clients to request space without interruption and retaining a horizon pointer to delay queue processing until prior clients complete their operations, ensuring efficient and conflict-free queue allocation.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If multiple asynchronous clients share a common queue, then queue utilization efficiency is improved, but race conditions and conflicts occur during queue allocation

Engineering Contradiction:
Improvequeue utilization efficiencyVSAvoidqueue allocation consistency
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent applies preliminary action by having the queue controller pre-allocate queue space and generate insertion pointers before clients actually insert their payloads. The controller reserves space in advance and provides clients with insertion pointers that guarantee future insertion locations, eliminating race conditions by ensuring space is secured before client actions occur.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The queue controller serves as an intermediary between multiple clients and the shared queue. It manages all queue allocation operations centrally, receiving requests from multiple clients, computing insertion pointers, and coordinating space allocation. This intermediary approach allows multiple clients to access the queue concurrently without direct conflicts, as the controller mediates all allocation decisions.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If mutual exclusion (mutex) algorithm is used to eliminate conflicts, then queue allocation consistency is improved, but processing speed deteriorates due to serialization

Engineering Contradiction:
Improvequeue allocation consistencyVSAvoidclient processing speed
Core Design Contradiction:
ReliabilityVSSpeed

Solution Approach 1:

The patent replaces the mechanical mutex locking system with an atomic hardware operation system. Instead of using software-based mutual exclusion that requires serialization and locking, the system uses atomic READ operations at the hardware level to allocate queue space. These atomic operations are inherently thread-safe and can be executed concurrently without serialization, maintaining both consistency and speed.

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

Solution Approach 2:

The system changes the operational parameters of queue allocation by using atomic memory read operations with specific address patterns. Clients perform atomic READ operations at calculated addresses (base address plus offset) to simultaneously obtain insertion pointers without conflict. This parameter-based approach transforms the allocation process from a serialized lock-based mechanism to a parallel atomic operation mechanism.

Inventive Principle:
Principle #35Parameter changes

3Adaptability or versatility

If queue space is allocated dynamically without pre-reservation, then queue flexibility is improved, but race conditions occur when multiple clients request space simultaneously

Engineering Contradiction:
Improvequeue space allocation flexibilityVSAvoidinsertion pointer uniqueness
Core Design Contradiction:
Adaptability or versatilityVSReliability

Solution Approach 1:

The system applies preliminary action by having the queue controller pre-reserve queue space and generate unique insertion pointers before clients actually need to insert their payloads. The controller maintains a horizon pointer that tracks the next available space and pre-allocates positions, ensuring that even if multiple clients request space simultaneously, each receives a unique, pre-reserved insertion pointer without race conditions.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS7631122B1System and method for fast hardware atomic queue allocation
Publication Date: 2009.12.08 NVIDIA CORP
  • US7631122B1 patent drawing
  • US7631122B1 patent drawing
  • US7631122B1 patent drawing

AI summary

One embodiment of the invention sets forth a method for performing a queue allocation operation that includes receiving a memory address associated with a queue allocation aperture, where the memory address is read by a client to request memory space in a memory queue for a payload, computing a payload size based on the memory address, determining an insertion pointer for the payload based on a first position of a horizon pointer, where the insertion pointer indicates a location within the memory queue for the client to insert the payload, adjusting the horizon pointer to a second position based on the payload size, and returning the insertion pointer to the client. Such an approach enables multiple clients to advantageously request and obtain space within a shared memory queue in a single atomic operation, thereby allowing clients to share a memory queue more efficiently relative to prior art approaches.