Multithreaded Fork Operation for In-Memory Checkpointing

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

The fork function does not work well with multithreaded programs because only the thread calling the operation is duplicated, and other threads are not present in the child process, leaving synchronization points in an undefined state.

Innovation Solution

A method that directs a multithreaded program to execute only one primary thread, stops other threads, duplicates the code to create a child process with a copy of the primary thread, restarts the other threads, and recreates synchronization points to mirror the original multithreaded execution.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If fork operation is used to create memory image in multithreaded program, then in-memory checkpointing is enabled, but only the calling thread is duplicated and other threads are not present in the child process

Engineering Contradiction:
Improvecheckpointing accuracyVSAvoidthread management complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent applies preliminary action by suspending all threads before the fork operation and then restoring them after the child process is created. This ensures that the fork operation captures a consistent state of all threads, not just the calling thread, enabling accurate in-memory checkpointing of multithreaded programs.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent uses an intermediary mechanism (thread suspension and restoration logic) to coordinate between the fork operation and multithreaded execution. This intermediary layer manages the complexity of capturing multiple thread states by temporarily stopping thread execution, performing the fork, then restoring threads to continue execution from suspended points.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If fork operation is used to create memory image, then program state can be saved, but all thread synchronization points are left in undefined state

Engineering Contradiction:
Improvestate consistencyVSAvoidsynchronization management
Core Design Contradiction:
ReliabilityVSEase of operation

Solution Approach 1:

The patent applies preliminary action by suspending all threads before the fork operation. This ensures that thread synchronization points are in a known, consistent state when the fork occurs, rather than being left in undefined states. After the fork, threads are restored and resume from their suspended points, maintaining synchronization integrity.

Inventive Principle:
Principle #10Preliminary action

3Productivity

If fork operation is used while program is running, then program execution is not suspended, but only the calling thread is duplicated

Engineering Contradiction:
Improveexecution continuityVSAvoidthread state completeness
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent applies preliminary action by temporarily suspending all threads before the fork operation. This allows the fork to capture complete thread states while maintaining the ability to restore execution continuity. The threads are then restored and resume execution from their suspended points, maintaining productivity while ensuring reliability.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS20250291593A1Method for performing a fork operation on a multithreaded application to support in-memory checkpointing
Publication Date: 2025.09.18 ARM LTD
  • US20250291593A1 patent drawing
  • US20250291593A1 patent drawing
  • US20250291593A1 patent drawing

AI summary

A method for performing a fork operation on a multithreaded application includes executing a component-based code including a set of instructions comprising multiple threads. The method further includes receiving a request from a controlling process to perform a fork operation on the component-based code at an instruction within the component-based code and directing the fork operation on the component-based code. The method further includes causing the component-based code to execute only one primary thread of the multiple threads by stopping execution of the other multiple threads, duplicating the component-based code at the instruction to create a child process comprising a copy of the primary thread, restarting execution of the other multiple threads in the component-based code, performing a correction of the child process, and creating multiple threads of the child process. The multiple threads of the child process mirror the multiple threads of the component-based code.