Bounded Soft Reference Estimation for Garbage Collection

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional garbage collectors inefficiently manage memory allocated to soft references, as they lack precise estimation of reachable heap space, leading to excessive resource consumption and suboptimal decision-making during garbage collection.

Innovation Solution

Implementing a bounded estimation method to determine the amount of heap space reachable from each soft reference, allowing garbage collectors to intelligently decide whether to reclaim objects referenced by soft references, thereby reducing resource consumption and improving processing efficiency.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If conventional garbage collectors perform exhaustive investigation to accurately estimate heap space reachable from soft references, then measurement precision is improved, but loss of time and processing efficiency deteriorate

Engineering Contradiction:
Improveestimation accuracy of heap spaceVSAvoidprocessing time for garbage collection
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent applies partial action by performing bounded estimation that examines only a limited number of objects (up to N objects) reachable from each soft reference rather than conducting an exhaustive investigation of all reachable objects. This partial exploration provides sufficiently accurate estimates for garbage collection decisions while significantly reducing processing time and resource consumption.

Inventive Principle:
Principle #16Partial or excessive action

2Productivity

If conventional garbage collectors clear soft references without accurate estimation, then processing speed is improved, but measurement precision and decision quality deteriorate

Engineering Contradiction:
Improvegarbage collection speedVSAvoidheap space estimation accuracy
Core Design Contradiction:
ProductivityVSMeasurement precision

Solution Approach 1:

The patent implements a middle ground by performing partial estimation of heap space reachable from soft references. The bounded estimation examines a limited number of objects (up to N objects) to provide sufficiently accurate estimates that inform better garbage collection decisions, achieving both improved productivity through faster processing and maintained measurement precision through intelligent estimation.

Inventive Principle:
Principle #16Partial or excessive action

3Productivity

If bounded estimation with soft reference exploration bound N is used, then processing efficiency is improved, but measurement precision may be reduced compared to exhaustive investigation

Engineering Contradiction:
Improvegarbage collection efficiencyVSAvoidheap space estimation accuracy
Core Design Contradiction:
ProductivityVSMeasurement precision

Solution Approach 1:

The patent applies partial action by limiting the estimation to a bounded number of objects (N objects) reachable from each soft reference. This partial exploration provides sufficiently accurate estimates for practical garbage collection decisions while maintaining high processing efficiency. The bound N is chosen to balance between estimation accuracy and processing speed based on specific system requirements.

Inventive Principle:
Principle #16Partial or excessive action

Data Source

PatentUS8161084B2Memory management of soft references
Publication Date: 2012.04.17 ORACLE AMERICAN INC
  • US8161084B2 patent drawing
  • US8161084B2 patent drawing
  • US8161084B2 patent drawing

AI summary

A garbage collector determines a target amount of heap space to deallocate, estimates an amount of heap space reachable by a plurality of soft references by determining a cumulative size of no more than an exploration bound N number of objects reachable from each soft reference, and deallocates heap space based on the target amount and the estimate of the heap space reachable from the soft references. Deallocating heap space may include clearing at least one soft reference. If the estimate is inaccurate, it may be utilized regardless or modified to account for inaccuracy. The least-recently-used or the largest soft reference may be cleared until the total cleared space reachable exceeds the target amount. By performing a bounded analysis, the garbage collector may be able to make a more informed decision about whether to clear a soft reference without consuming the full amount of resources consumed by an exhaustive analysis.