Circular Buffer Synchronization Using Lock-Free Lapping Logic

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing solutions for determining the full or empty state of shared circular buffers in embedded systems are inefficient, resource-intensive, and prone to issues like deadlocks, priority inversion, and hardware dependency, especially in real-time systems.

Innovation Solution

A system and method using lapping and paperclipping logic to manage producer and consumer entities in circular buffers, allowing parallel processing without locks, by tracking lap indicators and resolving race conditions through paperclip indicators.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If locking mechanisms (mutual exclusion) are used to manage buffer access, then data corruption is prevented, but system throughput decreases due to sequential operation and potential deadlocks

Engineering Contradiction:
Improvedata integrityVSAvoidsystem throughput
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent extracts the synchronization logic from traditional locking mechanisms by using separate lap and paperclip indicator variables that can be independently updated by producer and consumer entities. This allows parallel access to buffer metadata while maintaining data integrity through the mathematical relationship between indicators, eliminating the need for mutual exclusion locks and enabling concurrent operations without deadlocks

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent introduces lap indicators and paperclip indicators as intermediary variables that mediate between the producer and consumer entities. These intermediaries encode the buffer state and synchronization information, allowing both entities to operate independently while maintaining consistency through the indicator relationship, thus avoiding direct conflict and enabling parallel processing

Inventive Principle:
Principle #24Intermediary (Mediator)

2Productivity

If semaphores are used to allow concurrent access, then resource utilization improves, but complexity increases due to overhead and potential priority inversion

Engineering Contradiction:
Improveresource utilizationVSAvoidsynchronization complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent uses simple integer variables (lap indicators and paperclip indicators) as disposable synchronization objects that can be freely created and updated without the overhead of complex semaphore structures. These lightweight indicators provide sufficient synchronization information without the memory management, blocking, and priority inversion issues associated with traditional semaphore implementations

Inventive Principle:
Principle #27Cheap short-living objects (Disposable)

Solution Approach 2:

The patent replaces the mechanical semaphore system (with its blocking, waiting, and signaling mechanisms) with a mathematical indicator system based on modular arithmetic relationships. This substitution eliminates the need for complex synchronization primitives while maintaining concurrent access capabilities through pure computational logic

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

3Reliability

If critical sections are used to manage concurrent access, then data consistency is maintained, but execution time increases due to serialization overhead

Engineering Contradiction:
Improvedata consistencyVSAvoidexecution time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent segments the buffer management state into separate indicator variables (lap indicators for each entity) that can be updated independently without requiring critical sections. By dividing the synchronization state into independent components that follow a mathematical relationship, the system allows parallel updates to different segments, eliminating serialization overhead while maintaining overall consistency

Inventive Principle:
Principle #1Segmentation

4Productivity

If a buffer slot is sacrificed to demarcate full or empty states, then parallel processing is enabled, but buffer capacity decreases

Engineering Contradiction:
Improveparallel processing capabilityVSAvoidbuffer capacity
Core Design Contradiction:
ProductivityVSQuantity of substance

Solution Approach 1:

The patent moves the full/empty state information from the buffer data dimension to a separate indicator dimension (lap and paperclip variables). Instead of using buffer slots to encode state information, the system uses external variables that track the logical state through their mathematical relationship, thereby preserving 100% of buffer capacity for actual data while enabling parallel access

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

5Ease of manufacture

If busy waiting or polling mechanisms are used to check buffer status, then simple implementation is achieved, but processor time is wasted on repeated checking

Engineering Contradiction:
Improveimplementation simplicityVSAvoidprocessor time consumption
Core Design Contradiction:
Ease of manufactureVSUse of energy by moving object

Solution Approach 1:

The patent implements a feedback mechanism where the lap and paperclip indicators provide continuous information about buffer state and entity progress. Instead of busy-waiting or polling, entities can efficiently determine buffer status by checking the relationship between their own lap indicator and the other entity's indicator, enabling event-driven operation that consumes processor time only when necessary

Inventive Principle:
Principle #23Feedback

Data Source

PatentUS12567998B2Systems and methods for data synchronization
Publication Date: 2026.03.03 PATTERSON THOMAS J
  • US12567998B2 patent drawing
  • US12567998B2 patent drawing
  • US12567998B2 patent drawing

AI summary

A system and method for data synchronization in a circular buffer architecture is disclosed. Embodiments describe a data synchronization mechanism, focusing on the efficient management of the circular buffer between producer and consumer processes. In an embodiment, a method uses a lapping technique to facilitate parallel processing without the need for locking mechanisms, ensuring continuous data flow and real-time responsiveness. Further, the method uses modulated lap indicators and associated paperclip indicators at each buffer slot to track access history and resolve race conditions. The method determines valid access sequences through indicator comparison, enabling reliable conflict resolution, computes warp distances to guide synchronization updates, and dynamically adjusts buffer configurations in response to system events. The method also preserves access states across interrupts or context switches, enabling seamless continuation of operations. The method provides a lock-free synchronization mechanism that enables precise state tracking and efficient coordination of concurrent buffer access.