Pause-less Activation Frames for Garbage Collection

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Garbage collection in high-performance, time-critical applications is hindered by unpredictable processor time consumption, leading to performance issues and response latency, particularly in Java virtual machines compared to traditional C-based applications.

Innovation Solution

Implementing a pause-less garbage collection method that interleaves garbage collection efforts with application execution, using pause-less activation frames to scan and manage live pointers concurrently with application threads, ensuring minimal disruption and efficient memory management.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If traditional garbage collection is used, then memory is freed and reused, but processor time consumption becomes unpredictable and causes performance issues

Engineering Contradiction:
Improvememory management reliabilityVSAvoidprocessor time consumption
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent segments the garbage collection process into two distinct phases: a mark phase where live objects are identified and marked, and a sweep phase where unmarked objects are collected. This segmentation allows the garbage collector to perform these operations in controlled intervals rather than as a single unpredictable blocking operation, improving processor time predictability while maintaining memory management reliability.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent performs the mark phase as a preliminary action before the sweep phase. By marking all live objects in advance during a controlled mark phase, the subsequent sweep phase can efficiently collect garbage without needing to perform complex analysis during the collection phase itself, reducing unpredictable processor time consumption.

Inventive Principle:
Principle #10Preliminary action

2Reliability

If garbage collection pauses application execution, then memory reclamation is performed, but response latency increases

Engineering Contradiction:
Improvememory reclamationVSAvoidresponse latency
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent implements periodic garbage collection where the mark phase is performed at predetermined intervals rather than continuously or on-demand. This periodic execution allows application threads to run uninterrupted between collection cycles, minimizing response latency while ensuring memory reclamation occurs regularly through the structured mark-and-sweep process.

Inventive Principle:
Principle #19Periodic action

Solution Approach 2:

The patent maintains continuity of useful action by allowing application threads to execute normally during the sweep phase while the garbage collector operates on marked objects. This non-blocking approach ensures that memory reclamation continues without interrupting application execution, thereby reducing response latency while maintaining reliable memory management.

Inventive Principle:
Principle #20Continuity of useful action

3Ease of operation

If Java virtual machine uses traditional garbage collection, then memory is automatically managed, but throughput is lower compared to C-based applications

Engineering Contradiction:
Improveautomatic memory managementVSAvoidapplication throughput
Core Design Contradiction:
Ease of operationVSProductivity

Solution Approach 1:

The patent segments garbage collection into non-blocking mark and sweep phases that can operate independently of application execution. This segmentation eliminates long blocking pauses that traditionally reduced Java throughput, allowing the JVM to maintain automatic memory management while achieving throughput comparable to C-based applications through more efficient, interrupt-free collection cycles.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS10831400B2Method and apparatus to represent activation frame for pause-less garbage collection
Publication Date: 2020.11.10 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US10831400B2 patent drawing
  • US10831400B2 patent drawing
  • US10831400B2 patent drawing

AI summary

According to one or more embodiments described herein, a method for pause-less garbage collection includes selecting, by a garbage collector, for garbage collection, a process thread that is executing a process. The method further includes causing a first activation frame that is associated with a first method to be scanned, either by a garbage collector thread or by the process thread that is presently executing. The method further includes instructing the process thread to subsequently scan a second pause-less activation frame that is associated with a second method from a process that the process thread is presently executing. The method further includes scanning using a garbage collector thread, a third pause-less activation frame that is associated with a third method from the process, wherein scanning a pause-less activation frame includes examining and overwriting one or more live pointers from a method corresponding to said pause-less activation frame being scanned.