Hierarchical Locks for Transactional Memory Concurrency

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In computer systems with hardware transactional memory, transaction aborts due to resource conflicts and capacity overflow occur, leading to serialization of threads across multiple cores, which diminishes concurrency and is not effectively addressed by conventional global lock mechanisms.

Innovation Solution

Implementing a hierarchical lock mechanism where each shared resource is associated with a lock, allowing the acquisition of bottom-level locks first and escalating to top-level locks upon conditions being met, to execute program regions without transactions and minimize serialization.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of operation

If a single global lock is used to support critical sections, then programming complexity is reduced, but transaction serialization occurs across all threads including SMT threads on different cores, diminishing concurrency

Engineering Contradiction:
Improveprogramming simplicityVSAvoidtransaction concurrency
Core Design Contradiction:
Ease of operationVSProductivity

Solution Approach 1:

The single global lock is segmented into multiple hierarchical locks organized in a tree structure. Each node in the lock hierarchy represents a shared resource, with root locks representing broader resource groups and leaf locks representing specific resources. This segmentation allows threads to acquire only the locks necessary for their specific resource access patterns, enabling concurrent execution of transactions that access different resources while maintaining serialization for transactions accessing the same resource hierarchy.

Inventive Principle:
Principle #1Segmentation

2Productivity

If hierarchical locks are implemented to reduce serialization, then transaction concurrency is improved, but device complexity increases due to multiple lock levels

Engineering Contradiction:
Improvetransaction concurrencyVSAvoidlock mechanism complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The lock mechanism transitions from a single-dimensional global lock to a multi-dimensional hierarchical structure organized as a tree. Each dimension in the hierarchy represents a level of resource abstraction, with threads navigating through multiple dimensions to acquire appropriate locks. This dimensional transformation enables fine-grained control over serialization scope while maintaining a systematic and manageable structure through the tree organization of locks and their associated resource hierarchies.

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

3Use of energy by moving object

If SMT threads share hardware resources for conflict detection and store buffering, then processor resource utilization is improved, but capacity-overflow aborts occur more frequently due to shared resource limitations

Engineering Contradiction:
Improveprocessor resource utilizationVSAvoidtransaction commit success rate
Core Design Contradiction:
Use of energy by moving objectVSReliability

Solution Approach 1:

The shared hardware resources for conflict detection and store buffering are logically segmented by introducing hierarchical locks that partition the transaction execution space. Each lock level creates a isolation boundary that effectively divides the shared hardware resources into smaller contention domains. This segmentation reduces the probability of capacity-overflow aborts by limiting the number of concurrent transactions competing for the same hardware resources at any given time, while still allowing high utilization through parallel execution in different lock partitions.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS10241700B2Execution of program region with transactional memory
Publication Date: 2019.03.26 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US10241700B2 patent drawing
  • US10241700B2 patent drawing
  • US10241700B2 patent drawing

AI summary

A method for executing a program region by a computer system with transactional memory support is disclosed. The computer system uses hierarchical locks for executing the program region. Determination is conducted whether a first condition related to a transaction abort is satisfied in beginning a transaction for the program region. If the first condition is satisfied, a bottom level lock corresponding to a bottom level resource among available resources is acquired to execute the program region in the transaction. If a second condition is determined to be satisfied, a next level lock corresponding to next level resource is acquired. If the acquired lock is a top level lock corresponding to a top level resource, the program region is executed without using the transaction.