Ring Buffer Metadata for Concurrent Atomic Updates

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In data processing systems using ring buffers, multiple producers and consumers can create bottlenecks due to the need for synchronized access and the constraint of releasing updates in the order of acquisition, leading to non-determinism and scalability issues.

Innovation Solution

The implementation of ring buffer metadata with first and second reference indicators allows for atomic operations, enabling producers and consumers to release updates in-order or out-of-order while preserving the sequence order, using 'far' atomic operations to reduce latency and improve concurrency.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If lock-based approach is used for ring buffer access, then data consistency is maintained, but throughput becomes a significant bottleneck

Engineering Contradiction:
Improvedata consistencyVSAvoidthroughput
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent extracts the critical section protection from traditional lock-based approaches by using atomic operations (load-linked/store-conditional instructions) that operate without explicit locks. This removes the blocking mechanism while maintaining data consistency through hardware-supported atomicity, allowing multiple producers and consumers to access the ring buffer concurrently without throughput bottlenecks.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent introduces a metadata structure as an intermediary between producers and consumers. This metadata contains sequence numbers and state information that mediates access control and ordering requirements, allowing actors to coordinate their access to the ring buffer without direct blocking interactions, thus maintaining consistency while improving throughput.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Productivity

If lock-less ring buffer design is used, then throughput is improved, but non-determinism and scalability problems arise due to serialization of threads

Engineering Contradiction:
ImprovethroughputVSAvoiddeterminism
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent implements feedback mechanisms through metadata that tracks the state of each slot and the sequence of operations. This feedback allows actors to make informed decisions about their next actions, reducing non-determinism. The metadata provides visibility into the current state, enabling actors to proceed without unnecessary serialization while maintaining correct ordering through atomic operations that respect the observed state.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The patent performs preliminary actions by pre-establishing atomic operation sequences and metadata structures before conflicts occur. Actors prepare their atomic operations with expected state values, and the hardware atomicity guarantees resolve conflicts without serialization. This preliminary preparation reduces runtime non-determinism while maintaining throughput benefits of lock-less design.

Inventive Principle:
Principle #10Preliminary action

3Reliability

If updates are released in order of acquisition, then correct ordering of ring buffer is preserved, but later producers/consumers must wait for earlier ones completing

Engineering Contradiction:
Improveordering correctnessVSAvoidwaiting time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent makes the release ordering dynamic rather than static. Instead of requiring strict sequential release in acquisition order, the system uses atomic operations that can complete in any order while the metadata ensures correct final state. The dynamics of atomic operation completion allow overlapping execution without sacrificing ordering correctness, eliminating waiting time for later actors.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The patent segments the release operation into independent atomic steps for each slot, rather than requiring a monolithic sequential release. Each actor's release operations are segmented and can be interleaved with other actors' operations, with the metadata ensuring that the cumulative effect maintains correct ordering. This segmentation eliminates the blocking wait that would occur in strict sequential release.

Inventive Principle:
Principle #1Segmentation

4Reliability

If a single thread is dedicated to handle reordering results, then ordering is maintained, but a single-threaded bottleneck is created

Engineering Contradiction:
Improveordering maintenanceVSAvoidthroughput
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent implements self-service where each producer and consumer maintains its own ordering state through local metadata and atomic operations. Instead of a central thread managing reordering, each actor independently ensures its operations are ordered correctly through the atomicity guarantees and metadata tracking. This distributed self-service eliminates the single-threaded bottleneck while maintaining ordering through decentralized control.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS11822815B2Handling ring buffer updates
Publication Date: 2023.11.21 ARM LTD
  • US11822815B2 patent drawing
  • US11822815B2 patent drawing
  • US11822815B2 patent drawing

AI summary

Ring buffer storage circuitry is disclosed which stores a ring buffer comprising multiple slots to hold a queued se-quence of data items. Data processing circuitry executes a plurality of processes to add one or more data items to be processed to the queued sequence and to remove one or more data items for process-ing from the queued sequence. Each process is arranged to perform an acquire process to acquire at least one slot in the ring buffer and to subsequently perform a release process to release the at least one slot. Ring buffer metadata storage circuitry stores metadata for the ring buffer comprising a first reference indicator and a second reference indicator. Corresponding methods and instructions are also disclosed.