Pause-less Garbage Collection via Incremental Phase Switching

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Garbage collection processes in real-time applications are problematic due to unpredictable processor time consumption and frequent interruptions, which affect the responsiveness of applications in domains like semiconductor manufacturing, autonomous vehicles, and radar systems, necessitating a need for fast and efficient garbage collection methods.

Innovation Solution

A pause-less garbage collection method is implemented through incremental garbage collection across multiple phases, utilizing multiple function implementations with read and write barriers, and a hybrid approach combining mark-and-sweep and replicating garbage collection techniques to maintain application access and optimize memory utilization.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Quantity of substance

If traditional garbage collection is used, then memory is freed and reused, but processor time consumption becomes unpredictable and application responsiveness deteriorates

Engineering Contradiction:
Improvememory availabilityVSAvoidprocessor time unpredictability
Core Design Contradiction:
Quantity of substanceVSLoss of time

Solution Approach 1:

The garbage collection process is divided into multiple incremental phases (mark phase, sweep phase, copy phase) that execute in small steps interleaved with application execution. This segmentation allows GC to perform limited work during each application pause rather than stopping the application for extended periods, making processor time consumption more predictable while still freeing memory effectively.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The mark phase performs preliminary identification of live objects before the sweep or copy phases reclaim memory. By pre-marking all objects that are still in use during incremental steps, the system prepares for efficient memory reclamation without causing unpredictable processor time consumption during the actual freeing operation.

Inventive Principle:
Principle #10Preliminary action

2Reliability

If garbage collection is performed frequently to ensure timely responsiveness, then application responsiveness is maintained, but processor time consumption increases

Engineering Contradiction:
Improveapplication responsivenessVSAvoidprocessor time consumption
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

Garbage collection is performed periodically through incremental phases that execute at regular, predictable intervals during application runtime. The mark-sweep-copy cycle repeats in controlled steps, ensuring timely responsiveness through regular memory management while limiting processor time consumption to manageable periodic bursts rather than continuous or unpredictable interruptions.

Inventive Principle:
Principle #19Periodic action

3Productivity

If multiple function implementations are used for different garbage collection phases, then garbage collection efficiency is improved, but application complexity increases

Engineering Contradiction:
Improvegarbage collection efficiencyVSAvoidapplication complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The system dynamically selects and switches between different function implementations (first implementation for mark phase, second implementation for sweep/copy phases) based on the current garbage collection phase. This dynamic adaptation allows the application to optimize for each specific GC phase, improving overall GC efficiency while managing complexity through phase-based switching rather than requiring all implementations to be simultaneously active.

Inventive Principle:
Principle #15Dynamics

Data Source

PatentUS11550714B2Compiling application with multiple function implementations for garbage collection
Publication Date: 2023.01.10 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US11550714B2 patent drawing
  • US11550714B2 patent drawing
  • US11550714B2 patent drawing

AI summary

Functions of an application may include multiple implementations that have corresponding behaviors but perform different garbage collection-related activities such that the different implementations may be executed during different garbage collection phases to reduce overall garbage collection overhead during application execution.