Widening Memory Access for Unaligned Atomic Operations

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

RISC-based processors that employ load-store architectures, such as ARM and PowerPC, face exceptions when performing unaligned atomic memory operations, which are not naturally aligned, leading to performance issues and resource demands.

Innovation Solution

The memory access is widened to the next larger power of two (e.g., 4-byte access is widened to 8 bytes, and 8-byte access is widened to 16 bytes) using data processing operations to align the memory access, and an emulator with a memory widening component and exception handler handles exceptions to ensure correct operation.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If unaligned atomic memory operations are performed on RISC processors, then the processor can access memory at arbitrary addresses, but the processor throws exception faults

Engineering Contradiction:
Improvememory access flexibilityVSAvoidexception fault occurrence
Core Design Contradiction:
Adaptability or versatilityVSReliability

Solution Approach 1:

The patent introduces an intermediary mechanism (emulator or software layer) that intercepts unaligned memory access requests, translates them into aligned access sequences, and manages exception handling. This intermediary allows the RISC processor to maintain its alignment requirement while providing unaligned access capability to applications, effectively mediating between the processor's constraints and application needs.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent segments unaligned memory access operations into multiple aligned access operations. For example, a single unaligned 4-byte access is divided into multiple aligned accesses to different memory regions, each handled separately by the processor. This segmentation allows the system to achieve unaligned access functionality while maintaining processor alignment requirements.

Inventive Principle:
Principle #1Segmentation

2Reliability

If exception handling is performed for unaligned memory operations, then correct operation is maintained, but processing cycles are increased and performance is reduced

Engineering Contradiction:
Improvecorrect operationVSAvoidprocessing cycles
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent performs preliminary actions by pre-processing memory access requests to determine alignment requirements before executing the actual memory operation. The system pre-calculates the sequence of aligned accesses needed, prepares appropriate masking and shifting operations, and sets up the execution plan in advance, thereby avoiding repeated exception handling during runtime.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent changes execution parameters by modifying memory access patterns from unaligned to aligned, adjusting data width parameters (e.g., using 8-byte or 16-byte aligned accesses instead of unaligned 4-byte accesses), and transforming operation sequences. These parameter changes enable the processor to execute operations efficiently without triggering exceptions.

Inventive Principle:
Principle #35Parameter changes

3Reliability

If memory access is widened to aligned addresses, then atomic memory operations can be performed without exceptions, but data processing operations are required to modify bytes

Engineering Contradiction:
Improveatomic operation successVSAvoiddata processing operations
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent extracts and isolates the data modification operations (shifting, rotating, bitfield manipulation) as separate preprocessing and postprocessing steps from the core atomic memory operation. By taking out these data processing operations, the system can perform the atomic memory access itself in a single aligned operation, while handling the byte modification requirements through separate, manageable steps before and after the atomic operation.

Inventive Principle:
Principle #2Taking out (Extraction)

Data Source

PatentUS11593113B2Widening memory access to an aligned address for unaligned memory operations
Publication Date: 2023.02.28 MICROSOFT TECHNOLOGY LICENSING LLC
  • US11593113B2 patent drawing
  • US11593113B2 patent drawing
  • US11593113B2 patent drawing

AI summary

Unaligned atomic memory operations on a processor using a load-store instruction set architecture (ISA) that requires aligned accesses are performed by widening the memory access to an aligned address by the next larger power of two (e.g., 4-byte access is widened to 8 bytes, and 8-byte access is widened to 16 bytes). Data processing operations supported by the load-store ISA including shift, rotate, and bitfield manipulation are utilized to modify only the bytes in the original unaligned address so that the atomic memory operations are aligned to the widened access address. The aligned atomic memory operations using the widened accesses avoid the faulting exceptions associated with unaligned access for most 4-byte and 8-byte accesses. Exception handling is performed in cases in which memory access spans a 16-byte boundary.