Transactional Memory Suspend Resume Control Transfer

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Traditional Hardware Transactional Memory (HTM) designs face correctness and security issues due to transparent execution of program control transfers, leading to potential system failures and security vulnerabilities, especially when transactions are aborted during operating system interactions.

Innovation Solution

A processor is configured to suspend and resume transactional mode execution in response to control transfers, marking data as speculative only when in transactional mode, and delaying aborts until the mode is resumed, thus preventing unintended rollbacks and maintaining security by managing privilege levels.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of operation

If traditional HTM systems transparently execute program control transfers during transactional execution, then the system maintains simplicity in transaction management, but correctness and security issues arise when transactions are aborted during operating system interactions

Engineering Contradiction:
Improvetransparent transaction managementVSAvoidsystem correctness
Core Design Contradiction:
Ease of operationVSReliability

Solution Approach 1:

The HTM system dynamically changes its operational mode based on execution context. When a control transfer to the operating system is detected, the system transitions from transactional execution mode to a suspended state, where speculative memory accesses are no longer marked. This dynamic adaptation allows the system to maintain simple transparent transaction management during application execution while preventing correctness issues during OS interactions.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The patent introduces an intermediary mechanism that detects control transfers and mediates between the transactional execution engine and the operating system. This intermediary monitors execution flow, identifies when control transfers occur, and triggers the suspension/resumption of transactional mode, thereby preventing the harmful interaction between transactional aborts and OS code execution without requiring complex changes to either the HTM system or the operating system.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Device complexity

If traditional HTM systems allow transactions to include operating system code, then the transaction boundary remains simple and well-defined, but security vulnerabilities occur due to privilege level leaks on abort

Engineering Contradiction:
Improvetransaction boundary managementVSAvoidsecurity vulnerability
Core Design Contradiction:
Device complexityVSObject-affected harmful factors

Solution Approach 1:

The system performs preliminary detection of control transfer instructions during transactional execution. Before the transaction can include operating system code, the HTM system identifies the control transfer instruction and proactively suspends transactional mode. This preliminary action prevents the security vulnerability from occurring in the first place, rather than attempting to restore privilege levels after an abort has already compromised security.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent extracts the operating system code execution from the transactional execution context by suspending the transactional mode when control transfers are detected. This separation ensures that OS code executes in a non-speculative, non-transactional context, eliminating the security vulnerability while maintaining the simplicity of transaction boundaries for application code.

Inventive Principle:
Principle #2Taking out (Extraction)

3Productivity

If transactions are aborted during device driver execution, then resource conflicts can be resolved, but system failures occur due to inconsistent hardware state

Engineering Contradiction:
Improvetransaction conflict resolutionVSAvoidhardware state integrity
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The HTM system dynamically adjusts its behavior based on the execution context. When executing in device driver code following a control transfer, the system operates in a suspended state where memory accesses are not marked as speculative. This dynamic adaptation prevents aborts from occurring during critical hardware control sequences, thereby maintaining hardware state integrity while still enabling conflict resolution in application-level transactions.

Inventive Principle:
Principle #15Dynamics

Data Source

PatentUS8739164B2Automatic suspend atomic hardware transactional memory in response to detecting an implicit suspend condition and resume thereof
Publication Date: 2014.05.27 ADVANCED MICRO DEVICES INC
  • US8739164B2 patent drawing
  • US8739164B2 patent drawing
  • US8739164B2 patent drawing

AI summary

An apparatus and method is disclosed for a computer processor configured to access a memory shared by a plurality of processing cores and to execute a plurality of memory access operations in a transactional mode as a single atomic transaction and to suspend the transactional mode in response to determining an implicit suspend condition, such as a program control transfer. As part of executing the transaction, the processor marks data accessed by the speculative memory access operations as being speculative data. In response to determining a suspend condition (including by detecting a control transfer in an executing thread) the processor suspends the transactional mode of execution, which includes setting a suspend flag and suspending marking speculative data. If the processor later detects a resumption condition (e.g., a return control transfer corresponding to a return from the control transfer), the processor is configured to resume the marking of speculative data.