Hardware Atomic Queue Allocation for Shared Memory

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 either require additional queues or serialization through mutex algorithms, which are costly and performance-reducing.

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 delaying queue processing until prior clients complete their operations, thereby avoiding conflicts and maintaining efficiency.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Quantity of substance

If a single shared queue is used by multiple asynchronous clients, then queue space utilization is improved, but race conditions and conflicts occur during payload submission

Engineering Contradiction:
Improvequeue space utilizationVSAvoidconflict-free payload submission
Core Design Contradiction:
Quantity of substanceVSReliability

Solution Approach 1:

The patent implements preliminary action by having the queue controller pre-generate and store insertion pointers in an insertion pointer array before clients need them. When a client requests queue space, the controller atomically retrieves a pre-computed insertion pointer and updates the horizon pointer, eliminating the need for clients to compute differences between head and tail pointers. This preliminary preparation of insertion pointers resolves race conditions while maintaining high queue space utilization.

Inventive Principle:
Principle #10Preliminary action

2Reliability

If mutual exclusion (mutex) algorithms are used to coordinate queue access, then conflicts between clients are eliminated, but processing speed deteriorates due to serialization

Engineering Contradiction:
Improveconflict-free queue accessVSAvoidpayload submission speed
Core Design Contradiction:
ReliabilityVSSpeed

Solution Approach 1:

The patent replaces the mechanical mutex-based serialization mechanism with an atomic hardware operation system. Instead of using software mutexes that force sequential access, the implementation uses atomic read operations on the insertion pointer array and horizon pointer, leveraging hardware-level atomicity guarantees. This substitution eliminates the need for client-side serialization while maintaining conflict-free access, thereby preserving high payload submission speed.

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

3Ease of manufacture

If queue allocation is performed using three-step software process, then queue management is achieved, but processing delays occur due to software overhead

Engineering Contradiction:
Improvequeue management capabilityVSAvoidqueue allocation time
Core Design Contradiction:
Ease of manufactureVSLoss of time

Solution Approach 1:

The patent replaces the three-step software-based queue allocation process with a streamlined hardware-accelerated mechanism. Instead of software computation of head-tail differences, insertion pointer validation, and horizon pointer updates, the system uses atomic hardware operations to retrieve pre-computed insertion pointers from an array and update the horizon pointer in a single atomic step. This substitution dramatically reduces queue allocation time by eliminating software overhead while maintaining proper queue management.

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

Data Source

PatentUS7865638B1System and method for fast hardware atomic queue allocation
Publication Date: 2011.01.04 NVIDIA CORP
  • US7865638B1 patent drawing
  • US7865638B1 patent drawing
  • US7865638B1 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.