Thread Waiting via Atomic Memory Transactions

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Processor architectures face inefficiencies when threads wait on input/output or synchronization operations, leading to resource wastage and increased latency due to busy polling, especially in single-threaded or hyperthreaded cores without hardware thread switching capabilities.

Innovation Solution

Implementing atomic memory transactions that allow threads to monitor multiple memory addresses, enabling quick resumption and minimizing impact on other concurrent threads by using a transactional memory system to specify memory addresses, initiate transactions, and receive signals for aborting or continuing execution.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Loss of time

If busy polling or spin polling is implemented on memory addresses to avoid context switching overhead, then latency is reduced, but execution resources are wasted and other hyperthreads go unused

Engineering Contradiction:
ImprovelatencyVSAvoidexecution resources
Core Design Contradiction:
Loss of timeVSLoss of energy

Solution Approach 1:

The patent extracts the waiting thread from active execution and places it in a dormant state using atomic memory transactions. The thread initiates an atomic transaction that blocks it from further execution until another thread accesses the monitored memory address, at which point the transaction aborts and the waiting thread is quickly reactivated. This removes the wasteful busy polling loop while maintaining low latency through quick resumption.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The atomic memory transaction serves as an intermediary mechanism between the waiting thread and the memory address it monitors. Instead of directly polling the memory address in a busy loop, the thread uses the atomic transaction as a mediator that automatically detects when the monitored address is accessed by another thread and triggers resumption.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If a numerous number of memory addresses are polled to monitor multiple synchronization points, then comprehensive monitoring is achieved, but additional latency is caused

Engineering Contradiction:
Improvemonitoring coverageVSAvoidlatency
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent merges multiple memory address monitoring operations into a single atomic memory transaction. The transaction can monitor multiple memory addresses simultaneously, and the thread is reactivated when any one of the monitored addresses is accessed. This combines multiple polling operations into one unified mechanism, achieving comprehensive monitoring without the cumulative latency of sequential polling.

Inventive Principle:
Principle #5Merging (Combining)

3Productivity

If context switching is used to yield threads during waiting periods, then resource utilization is improved, but overhead and latency increase

Engineering Contradiction:
Improveresource utilizationVSAvoidcontext switching overhead
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The patent extracts the thread from the standard context switching mechanism and uses atomic memory transactions instead. The thread is taken out of active execution and placed in a transactional waiting state, which eliminates the need for context switching overhead while maintaining resource utilization by allowing other threads to execute concurrently.

Inventive Principle:
Principle #2Taking out (Extraction)

4Productivity

If atomic memory transactions are used to monitor memory addresses, then quick resumption is enabled and resource utilization is optimized, but transaction abort overhead may occur

Engineering Contradiction:
Improveresource utilizationVSAvoidtransaction management complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The atomic memory transaction mechanism is self-service in that it automatically monitors the specified memory addresses and autonomously aborts the transaction when another thread accesses the monitored address. The waiting thread does not need to implement complex polling logic or manually check conditions; the atomic transaction handles all monitoring and resumption triggers automatically, reducing the complexity of transaction management.

Inventive Principle:
Principle #25Self-service

Data Source

PatentEP3140729B1Thread waiting in a multithreaded processor architecture
Publication Date: 2020.08.19 GOOGLE LLC
  • EP3140729B1 patent drawingFigure 1
  • EP3140729B1 patent drawingFigure 2A~2B
  • EP3140729B1 patent drawingFigure 3

AI summary

Methods, systems, and apparatus, including computer programs encoded on computer storage media, for thread waiting. One of the methods includes starting, by a first thread on a processing core, a task by starting to execute a plurality of task instructions; initiating, by the first thread, an atomic memory transaction using a transactional memory system, including: specifying, to the transactional memory system, at least a first memory address for the atomic memory transaction and temporarily ceasing the task by not proceeding to execute the task instructions; receiving, by the first thread, a signal as a consequence of a second thread accessing the first memory address specified for the atomic memory transaction; and as a consequence of receiving the signal, resuming the task, by the first thread, and continuing to execute the task instructions.