Load-Checking Atomic Section for Shared Memory Concurrency

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In shared-memory multiprocessor architectures, out-of-order execution of instructions can lead to data races and incorrect results due to concurrent modifications of shared memory locations, which existing technologies struggle to prevent or correct effectively, especially when speculative execution is involved.

Innovation Solution

The compiler transforms programs by speculatively advancing 'load' instructions out of atomic sections and adding check instructions within these sections to ensure that stores and checks remain within atomic sections, allowing for concurrent execution while maintaining logical order and preventing data races.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Speed

If out-of-order execution is used to improve performance, then execution speed increases, but data race errors and incorrect results occur

Engineering Contradiction:
Improveexecution speedVSAvoiddata correctness
Core Design Contradiction:
SpeedVSReliability

Solution Approach 1:

The patent applies preliminary action by executing load instructions before their logical order position (speculative execution) and using check instructions to validate results later. The advanced-load address table pre-tracks addresses accessed by advanced loads, enabling early execution while maintaining correctness through subsequent validation.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent implements feedback through check instructions that validate the results of advanced load instructions. If a check instruction detects that a memory location was modified between the advanced load and its logical position, the system corrects the error by reloading the correct value, thus providing feedback to ensure data correctness.

Inventive Principle:
Principle #23Feedback

2Reliability

If atomic sections are used to prevent data races, then data correctness is ensured, but lock contention and performance degradation occur

Engineering Contradiction:
Improvedata correctnessVSAvoidexecution performance
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent extracts load instructions from atomic sections by allowing them to execute outside the atomic boundary using advanced load instructions. Only the critical store operations remain within atomic sections, reducing the scope of mutual exclusion and minimizing lock contention while maintaining data correctness through check instructions.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent segments the atomic section into two parts: advanced load instructions that execute outside the atomic section for performance, and check instructions that validate within the atomic section for correctness. This segmentation allows concurrent execution without sacrificing data race prevention.

Inventive Principle:
Principle #1Segmentation

3Speed

If load instructions are advanced out of atomic sections to improve performance, then execution speed increases, but load validation complexity increases

Engineering Contradiction:
Improveexecution speedVSAvoidvalidation mechanism complexity
Core Design Contradiction:
SpeedVSDevice complexity

Solution Approach 1:

The patent introduces an advanced-load address table as an intermediary structure to track addresses accessed by advanced load instructions. This table mediates between the speculative execution mechanism and the validation mechanism, storing address information that enables check instructions to efficiently validate loads without complex validation logic.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS8694974B2Load-checking atomic section
Publication Date: 2014.04.08 VALTRUS INNOVATIONS LTD
  • US8694974B2 patent drawing
  • US8694974B2 patent drawing
  • US8694974B2 patent drawing

AI summary

A compiled program has an advanced-load instruction and a load-checking atomic section. The load-checking atomic section follows the advanced-load instruction in the compiled program. The advanced-load instruction, when executed, loads a value from a shared memory address. The load-checking atomic section includes a check instruction for checking the validity of the shared memory address.