Task scheduling method and system and electronic equipment

Through the task scheduling method in the field of AI computing, fine-grained preemption of task replicas is achieved, the destructive and resource waste problems of low-priority tasks in the existing technology are solved, and the computing resource utilization efficiency and task scheduling flexibility are improved.

CN118916140APending Publication Date: 2024-11-08GUANGZHOU BINGO SOFTWARE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411064244.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-05
Publication Date
2024-11-08

AI Technical Summary

Technical Problem

In the field of AI computing, the prior art cannot preempt the task copy fine-grained computing power without terminating the task, resulting in greater destructiveness of low-priority tasks and serious waste of resources.

Method used

Provide a task scheduling method, by determining the priority and computing power of the task to be executed, selecting the target preemption mode and task copy, to achieve fine-grained preemption of the task copy to be preempted, including partial preemption and complete preemption mode, using the scheduling module and computing Force-attachment module, control module and computing power hijacking module are used to adjust computing power.

Benefits of technology

Computing power adjustments are performed without interrupting tasks to be seized, reducing the destructive impact on low-priority tasks, effectively utilizing computing power resources, avoiding resource waste, and improving task scheduling flexibility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118916140A_ABST
    Figure CN118916140A_ABST
Patent Text Reader

Abstract

The invention provides a task scheduling method and system and electronic equipment, and the method comprises the steps: determining a to-be-preempted task according to a to-be-executed task; determining a target preemption mode according to the to-be-executed task and the to-be-preempted task; determining a to-be-preempted task copy of the to-be-preempted task according to the to-be-executed task; and preempting the to-be-preempted task copy according to the target preempting mode. Compared with the prior art, the task scheduling method provided by the invention has the beneficial effects that the to-be-preempted task copy of the to-be-preempted task is subjected to fine-grained preemption, so that the computing power can be adjusted under the condition of not interrupting the to-be-preempted task, the destructive influence on the low-priority task is reduced, and the task scheduling efficiency is improved. According to the task scheduling method and device, the task scheduling mode is optimized, computing power resources can be effectively utilized, resource waste caused by task interruption is avoided, meanwhile, different scheduling modes are provided for task scheduling through different target preemption modes, and the flexibility of a task scheduling application scene is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of AI computing power preemption technology, and in particular to a task scheduling method, system and electronic equipment. Background Art

[0002] In the field of AI computing, due to the scarcity of computing power, there are a lot of scenarios where computing power competition exists. In scenarios where computing power is preempted between tasks due to priorities, the general practice in the industry is to stop low-priority tasks, release computing power, and then deploy high-priority tasks. For example, in the scenario of integrated training and push, this situation of computing power competition is more obvious. Traditional integrated training and push solutions are based on the peak and trough strategy, forcibly recovering the computing power of training tasks and reallocating the released computing power to inference tasks.

[0003] Based on the above-mentioned current status of computing power preemption technology, during the computing power preemption process, preemption can only be performed on a task basis, and cannot be fine-grained to the task copy under the task. The preempted task must be stopped, which causes great destructiveness to the preempted tasks with low priority. No matter how much computing power is preempted, the task must be forcibly terminated. Summary of the invention

[0004] In order to overcome the shortcomings of the prior art, the purpose of the present invention is to provide a task scheduling method, system and electronic device, which can realize fine-grained computing power preemption of copies under the task without terminating the task, thereby improving the utilization efficiency of computing power resources and reducing the destructive impact on low-priority tasks.

[0005] In order to solve the above problems, the present invention is implemented according to the following scheme:

[0006] A task scheduling method is provided, comprising:

[0007] Determine the tasks to be preempted based on the tasks to be executed;

[0008] Determining a target preemption mode according to the tasks to be executed and the tasks to be preempted;

[0009] Determining, according to the task to be executed, a copy to be preempted of the task to be preempted;

[0010] The copy to be preempted is preempted according to the target preemption mode.

[0011] Compared with the prior art, the beneficial effects of a task scheduling method provided by the present invention are as follows: by performing fine-grained preemption on the copies of the tasks to be preempted, computing power can be adjusted without interrupting the tasks to be preempted, reducing the destructive impact on low-priority tasks, and effectively utilizing computing power resources, avoiding resource waste due to task termination. At the same time, through different target preemption modes, different scheduling methods are provided for task scheduling, thereby improving the flexibility of task scheduling application scenarios.

[0012] Optionally, determining the task to be preempted according to the task to be executed includes:

[0013] Determine the priority level of the task to be executed and the computing power to be executed;

[0014] Determine a set to be preempted according to the priority level;

[0015] According to the computing power to be executed, the task to be preempted is determined from the set to be preempted.

[0016] Optionally, determining a target preemption mode according to the task to be executed and the task to be preempted includes:

[0017] Determining the preemptible computing power of the task to be preempted;

[0018] The target preemption mode is determined according to the preemptible computing power and the computing power to be executed.

[0019] Optionally, determining the target preemption mode according to the preemptible computing power and the computing power to be executed includes:

[0020] When the preemptible computing power is greater than the to-be-executed computing power, the target preemption mode is a partial preemption mode;

[0021] When the preemptible computing power is less than or equal to the computing power to be executed, the target preemptive mode is a full preemptive mode.

[0022] Optionally, determining the task copy to be preempted of the task to be preempted according to the task to be executed includes:

[0023] Refining the granularity of the task to be preempted and determining a set of task copies;

[0024] According to the computing power to be executed, the task copy to be preempted is determined from the task copy set.

[0025] Optionally, preempting the task copy to be preempted according to the target preemption mode includes:

[0026] Determine the preemption ratio and the computing position of the task copy to be preempted according to the target preemption mode;

[0027] Determining the sleep time of the task copy to be preempted according to the preemption ratio and the operation position;

[0028] The task copy to be preempted is preempted according to the sleep time.

[0029] Optionally, determining the preemption ratio and the operation position according to the target preemption mode includes:

[0030] Determine the replica computing power of the task replica to be preempted;

[0031] When the target preemption mode is the partial preemption mode, the computing location is the first processor, and the preemption ratio is determined according to the to-be-executed computing power and the replica computing power;

[0032] When the target preemption mode is the full preemption mode, the operation location is the second processor, and the preemption ratio is a preset value.

[0033] Optionally, determining the sleep time of the task copy to be preempted according to the preemption ratio and the operation position includes:

[0034] When the operation location is the first processor, determining the calling time of the task copy to be preempted, and determining the sleep time according to the preemption ratio and the calling time;

[0035] When the operation location is the second processor, the sleep time is a preset value.

[0036] A task scheduling system is also provided, which is applied to the above-mentioned task scheduling method, comprising:

[0037] Scheduling module, computing power preemption module, preemption control module and computing power hijacking module;

[0038] The scheduling module is used to determine the copy of the task to be preempted according to the priority level of the task to be executed and the computing power to be executed;

[0039] The computing power preemption module is used to determine the computing power to be executed of the task to be executed, the copy computing power of the copy of the task to be preempted, and the preemption ratio;

[0040] The preemption control module is used to send a control signal according to the computing power to be executed, the replica computing power and the preemption ratio;

[0041] The computing power hijacking module is used to preempt the task copy to be preempted according to the control signal.

[0042] An electronic device is also provided, comprising a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, at least one program, a code set or an instruction set is loaded and executed by the processor to implement the above-mentioned task scheduling method. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 It is a flow chart of the task scheduling method of the present invention;

[0044] Figure 2 A schematic diagram of granularity refinement and computing power preemption for tasks in the present invention;

[0045] Figure 3 It is a flowchart of the task deployment dynamic library hijacking program in the present invention;

[0046] Figure 4 It is a schematic diagram of the preemption process of the task scheduling system of the present invention. DETAILED DESCRIPTION

[0047] The preferred embodiments of the present invention are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.

[0048] When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the attached claims. In the description of the present application, it should be understood that the terms "first", "second", "third", etc. are only used to distinguish similar objects, and do not have to be used to describe a specific order or sequence, nor can they be understood as indicating or implying relative importance. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood according to the specific circumstances.

[0049] See also Figure 1 As shown, the present invention provides a task scheduling method, comprising:

[0050] S1: Determine the tasks to be preempted based on the tasks to be executed, including:

[0051] First, determine the priority level and computing power to be executed of the task to be executed, and then determine the set to be preempted according to the priority level. The set to be preempted is composed of multiple preempted tasks with a lower level than the task to be executed. Finally, determine the task to be preempted from the set to be preempted according to the computing power to be executed, that is, determine the task to be preempted from multiple preempted tasks with a lower level than the task to be executed. The computing power of the processor occupied by the task to be preempted is greater than the computing power to be executed of the task to be executed, thereby ensuring that when the task to be preempted is preempted, the preempted computing power can meet the execution conditions of the task to be executed.

[0052] S2: Determine the target preemption mode based on the tasks to be executed and the tasks to be preempted.

[0053] First, determine the preemptible computing power of the task to be preempted, and determine the target preemption mode based on the preemptible computing power and the computing power to be executed. Specifically:

[0054] When the preemptible computing power is greater than the computing power to be executed, the target preemption mode is the partial preemption mode. At this time, preempting part of the computing power of the task to be executed can meet the execution conditions of the task to be executed, without the need to preempt all the computing power of the task to be preempted, that is, the task to be preempted can be executed without interrupting it. In the partial preemption mode, it will only increase the completion time of the task to be preempted, and will not directly stop the task to be preempted, thereby reducing the destructive impact on low-priority tasks; and through the partial preemption mode, computing power resources can be effectively utilized to avoid directly interrupting the task to be preempted, resulting in excess computing power resources Waste.

[0055] When the preemptible computing power is less than or equal to the computing power to be executed, the target preemption mode is the full preemption mode. At this time, all the computing power of the task copy to be preempted can meet the execution conditions of the task to be executed, and only part of the computing power of the task to be preempted cannot be preempted.

[0056] S3: Determine the task copy to be preempted of the task to be preempted according to the task to be executed, including:

[0057] First, the task to be preempted is refined to determine the task copy set. The task copy set consists of multiple task copies, and each task copy processes a different task type. Then, the task copy to be preempted is determined from the task copy set based on the computing power to be executed. Specifically:

[0058] When the target preemption mode is the partial preemption mode, the computing power of the processor occupied by each task copy is determined, and the task copy to be preempted is determined from the task copy set according to the computing power to be executed of the task to be executed, that is, the task copy to be preempted and its belonging node are determined from multiple task copies, and the computing power of the processor occupied by the task copy to be preempted is greater than the computing power to be executed of the task to be executed, thereby ensuring that when the task copy to be preempted is preempted, the preempted computing power can meet the execution conditions of the task to be executed.

[0059] When the target preemption mode is the full preemption mode, all task copies in the task copy set are determined as task copies to be preempted.

[0060] S4: Preempt the task copy to be preempted according to the target preemption mode, including:

[0061] First, according to the target preemption mode, determine the preemption ratio and the computing position of the task copy to be preempted; then determine the sleep time of the task copy to be preempted according to the preemption ratio and the computing position; finally, preempt the task copy to be preempted according to the sleep time, specifically:

[0062] When the target preemption mode is partial preemption mode, the operation location is the first processor GPU, that is, the GPU drives the API of the task to be executed; the preemption ratio is the ratio of the computing power to be executed and the computing power of the copy. The sleep time of the copy of the task to be preempted is adjusted by the preemption ratio. The sleep time is the delay time of the processor occupied by the copy of the task to be preempted, and the single sleep time must be less than the timeout time of the processor occupied by the copy of the task to be preempted; the larger the preemption ratio, the longer the sleep time, and the more computing power is preempted for the copy of the task to be preempted.

[0063] When the target preemption mode is the full preemption mode, the operation location is the second processor CPU, that is, the API of the CPU driving the copy of the task to be preempted; at this time, the model operation location is transferred from the first processor GPU to the second processor CPU, that is, the operation location of the copy of the task to be preempted is transferred from the first processor GPU to the second processor CPU, so that the computing power resources of the first processor GPU are idle, so that the task to be executed can be executed on the first processor GPU, and the sleep time at this time is 0, that is, there is no sleep time; after the task to be executed is executed in the first processor GPU, the model operation location is transferred from the second processor CPU back to the first processor GPU. Although in the full preemption mode, the copy of the task to be preempted occupies all the computing power of the processor, by transferring the model operation location from the first processor GPU to the second processor CPU, it can be achieved as in the partial preemption mode, without interrupting the task to be preempted, only reducing the computing efficiency of the task to be preempted, thereby reducing the destructive impact on low-priority tasks, that is, reducing the destructive impact on the task to be preempted.

[0064] Through the partial preemptive mode and the full preemptive mode, the application scenarios of the task scheduling method are increased, thereby improving the flexibility of the task scheduling application scenarios. There is no need to interrupt low-priority tasks, avoiding the waste of resources caused by task interruption, and only reducing the computing efficiency of the tasks to be preempted, thereby reducing the destructive impact on low-priority tasks.

[0065] Next, the task scheduling method is further explained in combination with the specific implementation process, as follows:

[0066] See also Figure 2 As shown in the figure, the distributed training tasks are tasks to be preempted. After the distributed training tasks (tasks to be preempted) are refined in granularity, the distributed training tasks (tasks to be preempted) include computing tasks A1 (task copy 1), computing tasks A2 (task copy 2) and computing tasks A3 (task copy 3), and computing task B is the task to be executed.

[0067] It can be seen from the figure that the three task copies of the distributed training task (task to be preempted), namely computing task A1, computing task A2 and computing task A3, are all calculated in the first processor GPU, and the computing power resources occupied by computing task B are part of the computing power of computing task A3, of which the gray shaded part is the computing power resources occupied by computing task A3 in the first processor GPU, and the rest is the computing power resources occupied by computing task B in the first processor GPU.

[0068] See also Figure 3 As shown, the tasks in the application are divided into low-priority tasks and high-priority tasks, wherein the LD_PRELOAD dynamic library hijacking program is deployed in the containers of the low-priority tasks and the high-priority tasks. Through the LD_PRELOAD dynamic library hijacking program, when the first processor GPU drives the API to calculate the task, the computing power of the task in the application can be hijacked or released. Specifically, the LD_PRELOAD dynamic library hijacking program of the container of the task to be executed hijacks the computing power of the LD_PRELOAD dynamic library hijacking program of the container of the task to be preempted, and the LD_PRELOAD dynamic library hijacking program of the container of the task to be preempted releases the computing power. At this time, the hijacked computing power is the same as the released computing power, thereby realizing the task scheduling method.

[0069] See also Figure 4 As shown in the figure, the high-priority task is the task to be executed, and the scheduling module allocates computing power to the high-priority task. When there is no excess computing power in the processor to be allocated to the high-priority task, the preemptive scheduling plug-in in the scheduling module deploys the computing power preemption task, and the preemption control module can send a control signal to the preempted container and the preempting container according to the computing power preemption task to control the release of computing power of the preempted container and control the preempting container to hijack the computing power of the preempted container.

[0070] The computing power preemption task includes the preempted container ID, the preemption ratio and the preempted container ID. The preemption ratio is used to determine the sleep time of the preempted container and the time for the preempted container to call the preempted container's computing power. This is the partial preemption mode, which controls the GPU driver's API call to hijack or release. The sleep time is the delay time caused to the API, which must be less than the API call timeout time. The preemption ratio is the hijacking ratio of the computing power hijacking module to all API calls. The higher the hijacking ratio, the longer the sleep time, and the more computing power the preempted container hijacks. The LD_PR of the preempted container The ELOAD dynamic library hijacking program maintains communication with the LD_PRELOAD dynamic library hijacking program of the preempted container. For each computing time (computing power) hijacked by the LD_PRELOAD dynamic library hijacking program of the preempted container, the LD_PRELOAD dynamic library hijacking program of the preempting container releases a portion of the computing time (computing power); conversely, if the computing power of the preempted container is not hijacked, the preempting container has no computing power resources for calculation and is in a dormant state; when the task to be executed completes the calculation, the computing power hijacking module cancels the dormant computing power, and the task to be preempted resumes normal computing performance.

[0071] When in full hijacking mode, the computing power of the preempted container is completely hijacked, and the preempted container releases all computing power resources. The preempting container fully calls the computing power resources of the preempted container, and the model calculation location is transferred from the processor GPU to the processor CPU at this time. All subsequent API calls and calculations will be performed in the processor CPU. The task to be preempted will not be interrupted during the preemption process, only the computing efficiency of the task to be preempted will be reduced. When the task to be executed completes the calculation, the computing power hijacking module moves the model calculation location from the processor CPU to the processor GPU, and the task to be preempted resumes normal computing performance.

[0072] Through the partial preemptive mode and the full preemptive mode, the application scenarios of the task scheduling method are increased, thereby improving the flexibility of the task scheduling application scenarios. There is no need to interrupt low-priority tasks, avoiding the waste of resources caused by task interruption, and only reducing the computing efficiency of the tasks to be preempted, thereby reducing the destructive impact on low-priority tasks.

[0073] In addition, the task scheduling method, system and electronic device of the present invention hijack the task computing power resources by deploying a dynamic library hijacking program, which only slows down the computing performance of low priority levels without intruding on the business. The business is also unaware of the entire hijacking process, and can achieve accurate on-demand hijacking. Compared with the traditional method that requires interrupting the task to release computing power, it greatly reduces the time cost and implementation difficulty, and reduces the impact range of the hijacking.

[0074] The present invention also provides a task scheduling system, which is applied to the above-mentioned task scheduling method, including a scheduling module, a computing power preemption module, a preemption control module and a computing power hijacking module.

[0075] The scheduling module is used to allocate computing power to the tasks to be executed, wherein the scheduling module includes a preemptive scheduling plug-in. When the scheduling module cannot allocate computing power to the tasks to be executed, the preemptive scheduling plug-in is used to find low-priority tasks (tasks to be preempted) that can be preempted globally according to the priority level of the tasks to be executed and the computing power to be executed. The computing power that can be preempted must meet the computing power requirements of the tasks to be executed, and the granularity of the tasks to be preempted is refined, the copies of the tasks to be preempted are determined from the set of task copies, and the tasks to be executed are scheduled to the nodes where the copies of the tasks to be preempted are located.

[0076] The computing power preemption module is used to determine the computing power to be executed of the task to be executed, the copy computing power of the task copy to be preempted and the preemption ratio according to the scheduling results of the preemption scheduling module, so that the computing power preemption task can be deployed according to the computing power to be executed of the task to be executed, the copy computing power of the task copy to be preempted and the preemption ratio, where the computing power preemption task includes the preemption container ID, the preempted container ID and the preemption ratio.

[0077] The preemption control module is used to send control signals according to the computing power to be executed, the replica computing power and the preemption ratio to control the computing power hijacking module to execute the computing power preemption tasks deployed by the computing power preemption module, including the preempted container control signal and the preemption container control signal.

[0078] The computing power hijacking module is used to preempt the copy of the task to be preempted according to the control signal, that is, to determine the sleep time of the copy of the task to be preempted according to the control signal of the preempted container, and to determine the time that the task to be executed occupies the processor according to the preempting container control signal; the computing power hijacking module includes the LD_PRELOAD dynamic library hijacking program, and the preempting container and the preempted are both deployed with the LD_PRELOAD dynamic library hijacking program, and the LD_PRELOAD dynamic library hijacking program is used to execute the preemption process, specifically, the LD_PRELOAD dynamic library hijacking program of the preempting container is used to hijack the computing power of the preempted container, and the LD_PRELOAD dynamic library hijacking program of the preempted container is used to release the computing power.

[0079] The present invention also provides an electronic device, comprising a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, at least one program, a code set or an instruction set is loaded and executed by the processor to implement the above-mentioned task scheduling method.

[0080] The processor can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0081] The memory can be used to store the computer program or module, and the processor realizes various functions of the task scheduling method by running or executing the computer program or module stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required for a function, etc.; the data storage area can store data created according to the use of the mobile phone, etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0082] The above are only preferred embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.

Claims

1. A task scheduling method, It is characterized in that include: Determine the tasks to be preempted based on the tasks to be executed; Determining a target preemption mode according to the tasks to be executed and the tasks to be preempted; Determining, according to the task to be executed, a task copy to be preempted of the task to be preempted; The to-be-preempted task copy is preempted according to the target preemption mode.

2. A task scheduling method according to claim 1, It is characterized in that Determining the tasks to be preempted according to the tasks to be executed includes: Determine the priority level of the task to be executed and the computing power to be executed; Determine a set to be preempted according to the priority level; According to the computing power to be executed, the task to be preempted is determined from the set to be preempted.

3. A task scheduling method according to claim 2, It is characterized in that The step of determining a target preemption mode according to the task to be executed and the task to be preempted includes: Determining the preemptible computing power of the task to be preempted; The target preemption mode is determined according to the preemptible computing power and the computing power to be executed.

4. A task scheduling method according to claim 3, It is characterized in that The determining the target preemption mode according to the preemptible computing power and the computing power to be executed includes: When the preemptible computing power is greater than the to-be-executed computing power, the target preemption mode is a partial preemption mode; When the preemptible computing power is less than or equal to the computing power to be executed, the target preemptive mode is a full preemptive mode.

5. A task scheduling method according to claim 3, It is characterized in that The step of determining the task copy to be preempted of the task to be preempted according to the task to be executed includes: Refining the granularity of the task to be preempted and determining a set of task copies; According to the computing power to be executed, the task copy to be preempted is determined from the task copy set.

6. A task scheduling method according to claim 4, It is characterized in that Preempting the task copy to be preempted according to the target preemption mode includes: Determine the preemption ratio and the computing position of the task copy to be preempted according to the target preemption mode; Determining the sleep time of the task copy to be preempted according to the preemption ratio and the operation position; The task copy to be preempted is preempted according to the sleep time.

7. A task scheduling method according to claim 6, It is characterized in that Determining the preemption ratio and the operation position according to the target preemption mode includes: Determine the replica computing power of the task replica to be preempted; When the target preemption mode is the partial preemption mode, the computing location is the first processor, and the preemption ratio is determined according to the to-be-executed computing power and the replica computing power; When the target preemption mode is the full preemption mode, the operation location is the second processor, and the preemption ratio is a preset value.

8. A task scheduling method according to claim 7, It is characterized in that The step of determining the sleep time of the task copy to be preempted according to the preemption ratio and the operation position includes: When the operation location is the first processor, determining the calling time of the task copy to be preempted, and determining the sleep time according to the preemption ratio and the calling time; When the operation location is the second processor, the sleep time is a preset value.

9. A task scheduling system, applied to the above claims 1-8, It is characterized in that include: Scheduling module, computing power preemption module, preemption control module and computing power hijacking module; The scheduling module is used to determine the copy of the task to be preempted according to the priority level of the task to be executed and the computing power to be executed; The computing power preemption module is used to determine the computing power to be executed of the task to be executed, the copy computing power of the copy of the task to be preempted, and the preemption ratio; The preemption control module is used to send a control signal according to the computing power to be executed, the replica computing power and the preemption ratio; The computing power hijacking module is used to preempt the task copy to be preempted according to the control signal.

10. An electronic device, It is characterized in that The electronic device includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, at least one program, a code set or an instruction set is loaded and executed by the processor to implement the task scheduling method as described in claims 1-8.