Heap Reference GC State Tracking for Concurrent Collection

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing garbage collection systems cause applications to pause during non-concurrent operations, which can disrupt the execution of programs, and there is a need for methods to minimize these pauses while allowing concurrent garbage collection.

Innovation Solution

Implementing garbage collection states (colors) to track the progress of garbage collection operations with heap references, using reference load and write barriers to ensure that references are in a good state before being used, and storing GC states in a non-addressable portion of the reference to avoid disrupting application execution.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If concurrent garbage collection operations are implemented, then productivity is improved by reducing pause times, but device complexity increases due to the need for tracking GC states and implementing barriers

Engineering Contradiction:
ImproveproductivityVSAvoiddevice complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The reference structure is segmented into different portions: an addressable portion for memory addresses and a non-addressable portion for GC state tracking. This segmentation allows the GC system to maintain state information without interfering with normal reference dereferencing operations, enabling concurrent GC while managing complexity through structured organization.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

GC state tracking acts as an intermediary mechanism between the garbage collector and application threads. By introducing a dedicated state tracking system with barriers, the patent enables concurrent operations while mediating the interaction between GC progress and application execution, allowing both to proceed simultaneously without direct interference.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Measurement precision

If GC states are stored with heap references, then measurement precision is improved for tracking GC progress, but object-affected harmful factors increase due to potential disruption of application execution

Engineering Contradiction:
Improvemeasurement precisionVSAvoidobject-affected harmful factors
Core Design Contradiction:
Measurement precisionVSObject-affected harmful factors

Solution Approach 1:

Different portions of the reference structure have different properties: the addressable portion maintains canonical form for safe dereferencing, while the non-addressable portion stores GC state information. This local differentiation allows precise GC state tracking in one location while maintaining safe access properties in another, preventing harmful disruptions to application execution.

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

The patent adds a new dimension to the reference structure by incorporating GC state information in the non-addressable portion. This dimensional expansion allows the system to track GC progress without affecting the addressable portion's ability to safely dereference, separating measurement functions from execution functions.

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

3Reliability

If reference load and write barriers are implemented, then reliability is improved by ensuring references are in good state, but device complexity increases due to additional barrier operations

Engineering Contradiction:
ImprovereliabilityVSAvoiddevice complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

Write barriers perform preliminary actions by ensuring GC state information is properly set before a reference is written to the heap. Load barriers perform preliminary checks to verify the reference is in a good state before dereferencing. These preliminary actions prevent reliability issues by catching state inconsistencies early, while the systematic approach manages complexity through standardized barrier implementations.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentEP4237951B1Tracking garbage collection states of references
Publication Date: 2025.10.15 ORACLE INT CORP
  • EP4237951B1 patent drawingFigure 1
  • EP4237951B1 patent drawingFigure 2
  • EP4237951B1 patent drawingFigure 3

AI summary

Garbage collection (GC) states are stored within references stored on a heap memory to track a progress of GC operations with respect to the references. GC state may be stored in a non-addressable portion of references. Based on the GC state of a particular reference, a set of GC operations are selected and performed for the reference. However, references stored on a call stack do not include any indication of GC state. Hence, loading a reference from heap to call stack involves removing the indication of GC state. Writing a reference to heap involves adding the indication of GC state. References embedded within a compiled method also do not indicate any GC state. Metadata of the compiled method indicate a GC state, which is implicated to the embedded references. GC operations are selected and performed for each embedded reference based on the GC state of the compiled method.