Cache Line Marking for Transactional Memory

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Transactional execution and atomic operations in modern computer systems are costly due to the need for dedicated hardware structures to detect and handle interfering data accesses, and atomic instructions require draining the store queue every time they are encountered.

Innovation Solution

The system employs load-marks and store-marks on cache lines to prevent interfering accesses from other threads, allowing speculative execution of critical sections of code, with load-marks preventing writes and store-marks preventing reads and writes, facilitating efficient transactional execution and atomic operations without the need for constant store queue drainage.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If transactional execution uses dedicated hardware structures to detect interfering data accesses, then reliability of transactional memory is improved, but device complexity increases

Engineering Contradiction:
Improvereliability of transactional memoryVSAvoiddevice complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The cache line marking mechanism serves multiple functions: it detects interfering data accesses, prevents unauthorized accesses during transactions, and manages cache coherence. By making the cache marking system universal rather than dedicated, the patent reduces hardware complexity while maintaining transactional memory reliability.

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

Solution Approach 2:

The cache coherence protocol automatically manages transactional memory operations through self-service mechanisms. The marking and unmarking of cache lines occurs automatically during cache operations without requiring dedicated transactional memory hardware, allowing the system to serve itself rather than requiring separate specialized structures.

Inventive Principle:
Principle #25Self-service

2Reliability

If atomic instructions drain the store queue every time they are encountered, then reliability of atomic operations is improved, but productivity decreases

Engineering Contradiction:
Improvereliability of atomic operationsVSAvoidproductivity
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The store queue is drained in advance before atomic operations are executed, rather than being drained repeatedly during each atomic instruction encounter. This preliminary action ensures the store queue is clear before the critical operation, maintaining reliability while avoiding repeated productivity losses.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

Instead of continuously draining the store queue with every atomic instruction, the system performs periodic draining at appropriate intervals or conditions. This reduces the frequency of store queue drainage operations while still ensuring atomic operation reliability when needed.

Inventive Principle:
Principle #19Periodic action

3Reliability

If the system prevents interfering accesses during transactional execution, then reliability of transactional memory is improved, but loss of time increases due to aborts and retries

Engineering Contradiction:
Improvereliability of transactional memoryVSAvoidloss of time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The system allows speculative execution to proceed quickly through critical sections without immediate intervention, only checking for interfering accesses at key points. This rushing through of the critical section reduces the time spent on frequent checks and aborts, while still maintaining reliability through the cache marking mechanism.

Inventive Principle:
Principle #21Skipping (Rushing through)

Solution Approach 2:

The patent changes the state parameters of cache lines (marked vs. unmarked) to dynamically control access during transactions. By changing the marking parameter based on transaction state, the system can efficiently prevent interfering accesses without constant aborts, as the marked state provides continuous protection information.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS9268710B1Facilitating efficient transactional memory and atomic operations via cache line marking
Publication Date: 2016.02.23 SUN MICROSYSTEMS INC
  • US9268710B1 patent drawing
  • US9268710B1 patent drawing
  • US9268710B1 patent drawing

AI summary

One embodiment of the present invention provides a system that facilitates efficient transactional execution. The system starts by executing a transaction for a thread, wherein executing the transaction involves placing load-marks on cache lines which are loaded during the transaction and placing store-marks on cache lines which are stored to during the transaction. Upon completing the transaction, the system releases the load-marks and the store-marks from the cache lines which were load-marked and store-marked during the transaction. Note that during the transaction, the load-marks and store-marks prevent interfering accesses from other threads to the cache lines.