Atomic Read-Modify-Write Translation for Unaligned Memory Access

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Translating atomic read-modify-write accesses between different computer processors is challenging due to incompatibilities in how they support these operations, leading to issues such as incorrect results, slow processing times, and computational inefficiencies when running applications designed for one processor on another.

Innovation Solution

A system and method that translates atomic read-modify-write accesses by generating machine instructions for the destination processor to handle aligned addresses natively and use a global lock for unaligned addresses, ensuring atomicity while optimizing performance.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If atomic read-modify-write accesses are translated using global locks for unaligned addresses, then correctness is ensured, but processing overhead increases

Engineering Contradiction:
Improvecorrectness of atomic operationsVSAvoidprocessing overhead
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent applies different translation strategies based on address alignment: aligned addresses use native atomic instructions while unaligned addresses use global lock-based synchronization. This local differentiation optimizes performance for the common case (aligned accesses) while ensuring correctness for the less common case (unaligned accesses).

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

The translation process changes the operational parameters of atomic instructions based on the target processor's capabilities and the address alignment. The system dynamically selects between different instruction sequences (native atomic vs. lock-based) depending on whether the address is aligned, thereby adapting the translation strategy to minimize overhead while maintaining correctness.

Inventive Principle:
Principle #35Parameter changes

2Productivity

If native atomic instructions are used for aligned addresses, then processing efficiency is improved, but compatibility with different processor architectures is reduced

Engineering Contradiction:
Improveprocessing efficiencyVSAvoidprocessor architecture compatibility
Core Design Contradiction:
ProductivityVSAdaptability or versatility

Solution Approach 1:

The patent segments the translation process into two distinct paths: one for aligned addresses using native atomic instructions and another for unaligned addresses using global locks. This segmentation allows each path to be optimized for its specific use case while maintaining overall compatibility across different processor architectures.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The translation layer acts as a universal interface that handles both aligned and unaligned atomic operations across different processor architectures. By providing a unified translation mechanism that adapts to the target architecture's capabilities, the system maintains compatibility while enabling efficient execution on diverse processors.

Inventive Principle:
Principle #6Universality (Multi-functionality)

3Reliability

If global locks are used for all atomic accesses, then correctness is ensured, but concurrent operation performance deteriorates

Engineering Contradiction:
Improvecorrectness of atomic operationsVSAvoidconcurrent operation performance
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent applies global locks only locally to unaligned atomic operations where they are strictly necessary for correctness, while allowing concurrent native atomic operations to proceed without locking for aligned addresses. This selective application of locking minimizes the performance impact on concurrent operations.

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

Instead of applying global locks to all atomic operations, the patent applies locking only partially - specifically to unaligned operations where it is required for correctness. This partial action approach avoids the excessive overhead of universal locking while still ensuring correctness where needed.

Inventive Principle:
Principle #16Partial or excessive action

Data Source

PatentEP3417372B1Translating atomic read-modify-write accesses
Publication Date: 2026.04.29 MICROSOFT TECHNOLOGY LICENSING LLC
  • EP3417372B1 patent drawingFigure 1
  • EP3417372B1 patent drawingFigure 2
  • EP3417372B1 patent drawingFigure 3

AI summary

Various systems and methods for translating atomic read-modify-write accesses are described herein. In one example, a method includes determining that a machine instruction of a first language specifies an atomic read-modify-write access. The method includes generating machine instructions of the second language to perform an atomic access for the address if the address is aligned. The method includes generating machine instructions of a second language to acquire a global lock if the address is unaligned. Additionally, the method includes generating machine instructions of the second language to perform a non-atomic access for the address if the address is unaligned. Also, the method includes generating machine instructions of the second language to release the global lock if the address is unaligned.