Serverless Branch Prediction via Parasitic Process Training

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In serverless computing, initial branch prediction accuracy is low due to the short running time of functions, leading to significant performance overhead, and current solutions require hardware modifications to redesign branch predictors, reducing versatility.

Innovation Solution

A process parasitism-based branch prediction method that schedules a container with a pre-added parasitic process to a new server, uses execution data of copied template functions to train a branch predictor, and determines capacity expansion based on CPU usage, improving prediction accuracy without modifying hardware.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If branch prediction algorithms are redesigned to expand sensing range and use time locality, then branch prediction accuracy is improved, but hardware modification is required which reduces versatility

Engineering Contradiction:
Improvebranch prediction accuracyVSAvoidversatility of branch predictor
Core Design Contradiction:
Measurement precisionVSAdaptability or versatility

Solution Approach 1:

The patent creates virtual copies of branch predictor states through process parasitism. A parasitic process is spawned alongside the target process, and both share the same branch predictor hardware state. The parasitic process executes training workloads that populate the branch predictor with predictive information, which then benefits the target process without requiring hardware modification. This copying approach maintains hardware universality while achieving improved prediction accuracy.

Inventive Principle:
Principle #26Copying

Solution Approach 2:

The parasitic process acts as an intermediary between the training workload and the target process. Instead of directly modifying hardware or injecting code into the target process, the system introduces a separate parasitic process that shares the branch predictor state. This intermediary approach allows training to occur without direct interference with the target process while still achieving the goal of improving prediction accuracy for that process.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Measurement precision

If branch predictors are trained with sufficient data to achieve stable high prediction accuracy, then prediction accuracy is improved, but execution time increases which reduces performance in serverless computing

Engineering Contradiction:
Improvebranch prediction accuracyVSAvoidfunction execution time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The system performs preliminary training action by executing a parasitic process that populates the branch predictor with training data before the target process needs accurate predictions. The parasitic process runs concurrently during initialization, performing the necessary training workload in advance. This allows the branch predictor to be pre-warmed with predictive information, so when the target process executes its actual workload, the predictions are already accurate without adding execution time to the critical path.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The training occurs periodically during container initialization or when processes are scheduled, rather than continuously interfering with target process execution. The parasitic process is triggered at specific moments (when containers are initialized on new servers) to perform training, then exits or remains dormant. This periodic training approach ensures the branch predictor is refreshed with current workload patterns without requiring continuous training overhead during target process execution.

Inventive Principle:
Principle #19Periodic action

3Measurement precision

If branch prediction training is performed on new servers, then prediction accuracy is improved, but additional computational overhead is introduced during container initialization

Engineering Contradiction:
Improvebranch prediction accuracyVSAvoidinitialization complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The parasitic process is automatically triggered during container initialization without requiring external intervention or complex orchestration. The system embeds the training mechanism within the container lifecycle itself - when a container is initialized on a new server, the parasitic process automatically starts, performs the training workload, and exits. This self-service approach simplifies the overall system complexity by making the training process autonomous and tightly coupled with the container management workflow, eliminating the need for separate training orchestration infrastructure.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS11915003B2Process parasitism-based branch prediction method and device for serverless computing, electronic device, and non-transitory readable storage medium
Publication Date: 2024.02.27 SHENZHEN INST OF ADVANCED TECH
  • US11915003B2 patent drawing
  • US11915003B2 patent drawing

AI summary

Disclosed are a process parasitism-based branch prediction method and device for serverless computing, an electronic device, and a readable storage medium. The method includes: receiving a calling request of a user for a target function; when capacity expansion is required, scheduling a container executing the target function to a new server that has not executed the target function in a preset period of time, wherein a parasitic process is pre-added to a base image of the container; triggering the parasitic process when the container is initialized on the new server, the parasitic process being used for initiating a system call, and triggering a system kernel to select a target template function according to the type of the target function and copying the target template function N times; using execution data of the copied N target template functions as training data to train a branch predictor on the new server.