Heap Object Isolation via Faulting Address Traps

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing methods for performing atomic operations on a subset of objects in a memory, such as object relocation or schema evolution, often require 'stop-the-world' pauses which are undesirable in real-time or interactive applications, and introduce significant overhead due to the use of explicit barriers.

Innovation Solution

Transforming references to the subset of objects in a reversible manner to raise a fault on ordinary memory operations, using techniques like misaligning addresses or setting them to protected memory ranges, allowing the faulting thread to be suspended or redirected to perform the atomic operation, thereby avoiding the need for explicit barriers.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If stop-the-world pauses are used to perform atomic operations on a subset of objects, then atomicity is guaranteed, but application responsiveness deteriorates due to long pauses

Engineering Contradiction:
ImproveatomicityVSAvoidapplication pause time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent segments the memory space into protected regions and unprotected regions. Only the subset of objects requiring atomic operations are placed in protected regions with transformed references, while other objects remain in unprotected regions. This segmentation allows concurrent access to unprotected objects while maintaining atomicity for protected objects, eliminating the need for stop-the-world pauses.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent applies memory protection and reference transformation locally only to the specific subset of objects that require atomic operations, rather than protecting the entire heap. This local quality approach minimizes the impact on application threads by allowing them to freely access unprotected objects while the atomic operation progresses on protected objects.

Inventive Principle:
Principle #3Local quality

2Reliability

If explicit barriers are introduced to synchronize atomic operations with application threads, then atomicity is maintained, but operation overhead increases

Engineering Contradiction:
ImproveatomicityVSAvoidbarrier overhead
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent replaces the mechanical barrier system with a fault-based detection mechanism. Instead of inserting explicit barrier instructions into every memory access, the system transforms references to protected objects so that accessing them triggers a fault condition. This fault mechanism automatically suspends the application thread and redirects control to the atomic operation thread, eliminating the need for complex barrier management.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

Solution Approach 2:

The transformed references themselves carry the protection information and automatically trigger the fault condition when accessed. The system serves its own synchronization needs through the inherent behavior of the transformed references, rather than requiring external barrier management. The faulting address trap mechanism automatically handles thread suspension and redirection without additional software overhead.

Inventive Principle:
Principle #25Self-service

3Reliability

If memory protection is applied to all objects in the heap, then atomic operations can be performed, but performance deteriorates due to constant protection overhead

Engineering Contradiction:
Improveatomic operation capabilityVSAvoidmemory access performance
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent divides the heap into protected regions containing objects requiring atomic operations and unprotected regions for normal objects. This segmentation ensures that memory protection overhead is incurred only for the small subset of objects that need atomic operations, while the majority of objects can be accessed without protection overhead, maintaining high performance.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

Instead of applying memory protection to all objects (excessive action), the patent applies protection only to the specific subset of objects that require atomic operations (partial action). This selective approach minimizes the performance impact while providing sufficient protection for the critical subset.

Inventive Principle:
Principle #16Partial or excessive action

Data Source

PatentUS7313566B1Method and apparatus for isolating selected heap objects using a faulting address trap
Publication Date: 2007.12.25 ORACLE AMERICAN INC
  • US7313566B1 patent drawing
  • US7313566B1 patent drawing
  • US7313566B1 patent drawing

AI summary

All references to an object subset to which an atomic operation is to be applied are deliberately transformed so that an attempt by an application thread to dereference such a transformed reference will raise a faulting address trap. When the faulting address trap is raised, the faulting thread will enter a trap handler, which suspends the faulting thread. The atomic operation can then be applied and the faulting thread restarted.