Shared Memory Partitioning for Parallel Web App Garbage Collection

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current deterministic parallel programming models for in-browser web applications face challenges in managing shared memory efficiently, leading to performance delays due to dynamic memory allocation and deallocation overhead, especially when dealing with large numbers of immutable objects, which limits the ability to leverage multi-core processors for parallel computing.

Innovation Solution

A system and method for automatic memory management that includes a memory management module monitoring thread execution and managing object life cycles within a shared memory space, partitioned into a nursery heap and mature heap with private nurseries, and a garbage collector module that performs safe-point-based garbage collection to optimize memory usage and reduce overhead.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If dynamic memory allocation and deallocation is performed for each thread in parallel processing, then memory flexibility is improved, but performance delays occur due to allocation overhead

Engineering Contradiction:
Improvememory flexibilityVSAvoidprocessing speed
Core Design Contradiction:
Adaptability or versatilityVSProductivity

Solution Approach 1:

The shared memory is segmented into multiple thread-local memory pools, with each pool dedicated to a specific thread. This segmentation allows each thread to allocate and deallocate memory independently within its own pool without affecting other threads, eliminating synchronization overhead and improving processing speed while maintaining memory flexibility.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

Memory pools are pre-allocated and initialized before parallel thread execution begins. Each thread is assigned a dedicated memory pool in advance, so that during parallel execution, threads can immediately allocate memory from their pre-configured pools without dynamic allocation overhead, thus improving processing speed while preserving adaptability through controlled memory management.

Inventive Principle:
Principle #10Preliminary action

2Quantity of substance

If shared memory is used for parallel threads, then memory utilization is improved, but synchronization overhead increases

Engineering Contradiction:
Improvememory utilizationVSAvoidsynchronization complexity
Core Design Contradiction:
Quantity of substanceVSDevice complexity

Solution Approach 1:

The shared memory space is divided into separate thread-local pools, where each thread has its own dedicated memory region. This segmentation maintains high memory utilization by allowing efficient allocation within each pool while eliminating the need for complex synchronization mechanisms between threads, as each thread operates independently within its own memory segment.

Inventive Principle:
Principle #1Segmentation

3Reliability

If immutable objects are created in large numbers, then program correctness is improved, but memory overhead increases

Engineering Contradiction:
Improveprogram correctnessVSAvoidmemory overhead
Core Design Contradiction:
ReliabilityVSQuantity of substance

Solution Approach 1:

The system automatically discards immutable objects that are no longer needed and recovers their memory space back to the thread-local memory pool. This allows the system to maintain program correctness by creating immutable objects when needed while minimizing memory overhead through automatic reclamation of unused objects, preventing memory leakage and optimizing memory utilization.

Inventive Principle:
Principle #34Discarding and recovering

Data Source

PatentEP2834744B1System and method for memory management
Publication Date: 2019.02.06 INTEL CORP
  • EP2834744B1 patent drawingFigure 1
  • EP2834744B1 patent drawingFigure 2
  • EP2834744B1 patent drawingFigure 3

AI summary

A system and method for automatic memory management of a shared memory during parallel processing of a web application. The system includes a computing system configured to allow parallel computing of a web application executed within a web browser. The computing system includes shared memory having a set of blocks distributed at least a first thread and at least one spawned thread of a processing function of the web application. The memory is partitioned into a nursery heap, a mature heap and a database having a plurality of private nurseries, wherein the first thread has access to the nursery heap and mature heap and the at least one spawned thread has access to an associated one of the plurality of private nurseries. During parallel computing of the web application, management of the shared memory includes garbage collection of at least each of the plurality of private nurseries.