# US 2023/0409330 A1 · Process parasitism-based branch prediction method and device for serverless computing, electronic device, and readable storage medium

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2023/0409330 A1
- Document ID: US20230409330A1
- Status: Published application
- Kind: A1
- Application number: 18/459,397
- Filed: 2023-08-31
- Published: 2023-12-21
- Earliest claimed: 2021-12-18
- Assignees: Shenzhen Institutes of Advanced Technology
- Applicants: Shenzhen Institutes of Advanced Technology
- Inventors: KEJIANG YE; YANYING LIN; CHENGZHONG XU
- Web page: https://patentgrep.com/patent/US20230409330A1

## CPC

- G06F 9/3806: {using address prediction, e.g. return stack, branch history buffer}
- G06F 9/3844: {using dynamic branch prediction, e.g. using branch history tables}
- G06F 9/50: Allocation of resources, e.g. of the central processing unit [CPU]
- G06F 30/20: Design optimisation, verification or simulation (optimisation, verification or simulation of circuit designs G06F30/30)
- G06F 30/27: using machine learning, e.g. artificial intelligence, neural networks, support vector machines [SVM] or training a model
- G06N 5/046: Forward inferencing; Production systems
- G06F 2119/02: Reliability analysis or reliability optimisation; Failure analysis, e.g. worst case scenario performance, failure mode and effects analysis [FMEA]
- G06N 3/10: Interfaces, programming languages or software development kits, e.g. for simulating neural networks
- Y02D 10/00: Energy efficient computing, e.g. low power processors, power management or thermal management
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- Y02D: CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE

## Abstract

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.

## Claims

### Claim 1

A process parasitism-based branch prediction method for serverless computing comprising the following steps: 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, wherein the parasitic process is configured for initiating a system call, and triggering a system kernel to select a target template function according to a type of the target function and copying the target template function N times; and using execution data of the copied N target template functions as training data to train a branch predictor on the new server.

### Claim 2 (depends on 1)

The process parasitism-based branch prediction method for serverless computing according to claim 1, after the receiving a calling request of a user for a target function, further comprising: determining whether there is a running instance executing no function task in a current computing environment; if there is, scheduling the target function to the instance executing no function task in the current computing environment, and executing a calculation task of the target function using the instance.

### Claim 3 (depends on 2)

The process parasitism-based branch prediction method for serverless computing according to claim 2, further comprising: if there is no running instance executing no function task in the current computing environment, determining whether the current computing environment requires capacity expansion; if capacity expansion is not required, generating an instance in the current computing environment, and executing a calculation task of the target function using the instance.

### Claim 4 (depends on 3)

The process parasitism-based branch prediction method for serverless computing according to claim 3, wherein the determining whether the current computing environment requires capacity expansion comprises: determining whether CPU usage of all instances in the current computing environment exceeds a preset value; if yes, determining that the current computing environment requires capacity expansion.

### Claim 5 (depends on 1)

The process parasitism-based branch prediction method for serverless computing according to claim 1, further comprising: after the container is initialized on the new server, generating an instance, and executing a calculation task of the target function using the instance.

### Claim 6 (depends on 1)

The process parasitism-based branch prediction method for serverless computing according to claim 1, wherein the type of the target function is inferred using Python deep learning algorithm.

### Claim 7 (depends on 1)

The process parasitism-based branch prediction method for serverless computing according to claim 1, wherein the target template function is centered around programming languages, if-else logic structures, for loop position features, and function features.

### Claim 8

A process parasitism-based branch prediction device for serverless computing comprising: a receiving module configured to receive a calling request of a user for a target function; a scheduling module configured to: when capacity expansion is required, schedule 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; a calling module configured to: trigger the parasitic process when the container is initialized on the new server, wherein the parasitic process is configured to initiate a system call, and trigger a system kernel to select a target template function according to a type of the target function and copy the target template function N times; and a training module configured to use execution data of the copied N target template functions as training data to train a branch predictor on the new server.

### Claim 9 (depends on 1)

An electronic device comprising a processor and a memory, wherein the memory stores a computer program, and the computer program, when being executed by the processor, implements the steps of the process parasitism-based branch prediction method for serverless computing according to claim 1.

### Claim 10 (depends on 1)

A readable storage medium, wherein the readable storage medium stores a computer program, and the computer program, when being executed by a processor, implements the steps of the process parasitism-based branch prediction method for serverless computing according to claim 1.
