Transactional Memory Object Visibility Tracking

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current transactional memory implementations face challenges in ensuring atomicity when objects are accessed concurrently by both transactional and non-transactional code, leading to potential deadlocks and performance issues, and existing hardware-based solutions are not robust or portable.

Innovation Solution

The solution involves tracking the visibility of objects using access-mode information, ensuring that objects accessible by multiple threads are accessed only through transactional code, while allowing non-transactional access to objects accessed by a single thread, thereby preventing concurrent access and maintaining atomicity. This is achieved by modifying get and set methods to check access-mode information and using transactional or non-transactional code accordingly, with support from both compiler-inserted code and runtime checks.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If all memory accesses are replaced with transactional version to ensure atomicity, then atomicity is preserved, but performance overhead increases significantly

Engineering Contradiction:
ImproveatomicityVSAvoidperformance
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent applies local quality by differentiating access modes for different objects. Instead of uniformly using transactional access for all objects, the system tracks visibility information per object and applies transactional access only when necessary (when objects are visible to multiple threads), while allowing non-transactional access for objects visible to single threads, thus optimizing performance while maintaining atomicity where required

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

The patent implements preliminary action by tracking visibility information in advance before actual memory accesses occur. The system maintains visibility tracking data structures that record which threads can access which objects, allowing the system to determine the appropriate access mode (transactional vs. non-transactional) before executing memory operations, thereby avoiding unnecessary transactional overhead

Inventive Principle:
Principle #10Preliminary action

2Reliability

If programmer manually tracks object visibility to ensure atomicity, then atomicity is maintained, but software engineering complexity increases

Engineering Contradiction:
ImproveatomicityVSAvoidsoftware engineering complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent implements self-service by automatically tracking object visibility without requiring programmer intervention. The system maintains visibility tracking data structures and automatically updates them based on object creation, assignment, and access patterns. This automated approach eliminates the burden of manual visibility tracking while ensuring atomicity is preserved, thereby reducing software engineering complexity

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The patent applies feedback by continuously monitoring and updating visibility information as objects are created, assigned, and accessed. The visibility tracking system provides real-time feedback about which objects are visible to which threads, allowing the system to dynamically adjust access modes and maintain atomicity without programmer intervention

Inventive Principle:
Principle #23Feedback

3Productivity

If hardware transactional memory is used to improve efficiency, then execution speed increases, but robustness decreases due to fixed size limitations

Engineering Contradiction:
Improveexecution speedVSAvoidrobustness
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent applies dynamics by implementing a hybrid approach that adapts to different transaction sizes and characteristics. The system uses visibility tracking to identify objects that require transactional access and dynamically selects between hardware transactional memory (for small, cache-friendly objects) and software transactional memory (for larger or more complex objects), thereby optimizing both execution speed and robustness based on actual runtime conditions

Inventive Principle:
Principle #15Dynamics

Data Source

PatentUS8117605B2Method and apparatus for improving transactional memory interactions by tracking object visibility
Publication Date: 2012.02.14 ORACLE AMERICAN INC
  • US8117605B2 patent drawing
  • US8117605B2 patent drawing
  • US8117605B2 patent drawing

AI summary

In a multi-threaded computer system that uses transactional memory, object fields accessed by only one thread are accessed by regular non-transactional read and write operations. When an object may be visible to more than one thread, access by non-transactional code is prevented and all accesses to the fields of that object are performed using transactional code. In one embodiment, the current visibility of an object is stored in the object itself. This stored visibility can be checked at runtime by code that accesses the object fields or code can be generated to check the visibility prior to access during compilation.