Task scheduling device, method and storage medium
By combining task detectors, core performance monitors and schedule optimizers in the task scheduling device, dynamically schedule task allocation, the problem of uneven resource allocation in the asymmetric core environment is solved, and high efficiency and high performance computing are achieved.
Patent Information
- Application Number
- CN202411813484.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-10
- Publication Date
- 2025-04-04
AI Technical Summary
The existing technology cannot effectively schedule tasks in a computing environment with asymmetric cores, resulting in higher performance cores waiting for weaker cores to complete tasks, resulting in waste of resources and processing bottlenecks, and unable to meet the needs of high-efficiency and high-performance computing.
A task scheduling device is designed, including a task detector, a core performance monitor and a schedule optimizer. By monitoring the initiation of target tasks and the status of each candidate core, the optimal task allocation plan is analyzed and determined, and the tasks are assigned to the most suitable core for execution.
In the computing environment of asymmetric core, task allocation and communication paths are dynamically adjusted, the potential of asymmetric core devices is fully utilized, performance bottlenecks caused by uneven resource allocation are reduced, resource utilization and computing efficiency are improved, and high-efficiency and high-performance computing needs are met.
Smart Images

Figure CN119759519A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of artificial intelligence technology, and in particular to a task scheduling device, method and storage medium. Background Art
[0002] The field of artificial intelligence technology involves the training and reasoning of large deep learning models, and the current frameworks of large deep learning models are usually designed to work in a symmetric core computing environment, where all processor cores have the same or similar computing power. Therefore, the current task scheduling schemes are generally designed to assume that all cores can perform tasks with equal efficiency, and use static or simple load balancing strategies to implement task scheduling, such as polling or random assignment of tasks. In the scenario of asymmetric cores, the current technical solutions will cause the higher-performance cores to wait for the weaker cores to complete their tasks, resulting in resource waste and processing bottlenecks, and cannot meet the needs of high-efficiency and high-performance computing. Summary of the invention
[0003] In view of this, the present disclosure proposes a task scheduling device, method and storage medium.
[0004] According to one aspect of the present disclosure, a task scheduling device is provided. The device includes:
[0005] Task detector, used to monitor the initiation of target tasks and determine the categories and resource requirements of target tasks. The categories of target tasks include computing tasks and communication tasks.
[0006] a core performance monitor for determining current status information of each candidate core, each candidate core including cores having different task processing performances;
[0007] A scheduling optimizer is used to analyze the category of the target task, resource requirement information and current status information of each candidate core, determine the optimal task allocation scheme that meets the preset scheduling target, and allocate the target task to the target core indicated by the optimal task allocation scheme among the candidate cores;
[0008] The task executor is used to execute the target task on the target core.
[0009] In a possible implementation, the device further includes:
[0010] A dependency analyzer is used to determine the dependency relationship between the target task and the tasks being executed on each candidate core. The dependency relationship indicates whether the target task and the tasks being executed must be executed serially.
[0011] Scheduling optimizer for:
[0012] In response to the dependency indicating that the target task and the task being executed must be executed serially, an analysis is performed based on the category of the target task, resource requirement information and current status information of each candidate core, an optimal task allocation scheme that meets the preset scheduling goals is determined, and the target task is allocated to the target core among the candidate cores indicated by the optimal task allocation scheme.
[0013] In a possible implementation, the scheduling optimizer is further used to:
[0014] In response to the dependency indicating that the target task and the task being executed do not need to be executed serially, the target task is allocated to a preset core among the candidate cores, wherein the preset core is a core other than the target core;
[0015] Task executors are also used to:
[0016] Execute the target task on the specified core.
[0017] In a possible implementation, the scheduling optimizer is used to:
[0018] Determine the priority of the target task based on the category and resource requirement information of the target task, wherein the target task with a higher priority has a higher demand for computing resources and a stricter requirement on the execution order;
[0019] According to the priority of the target task and the current status information of each candidate core, an optimal task allocation scheme that meets the preset scheduling goal is determined, and the target task is allocated to the target core indicated by the optimal task allocation scheme among the candidate cores.
[0020] In a possible implementation, the scheduling optimizer is used to:
[0021] Determine the score of each candidate core based on its current status information and its matching degree with the target task;
[0022] According to the priority of the target task and the score of each candidate core, an optimal task allocation scheme that meets the preset scheduling goal is determined, and the target task is allocated to the target core indicated by the optimal task allocation scheme among the candidate cores.
[0023] In a possible implementation, the current status information of each candidate core includes the task processing speed, current load information and task queue length of each candidate core, and the preset scheduling goal includes minimizing the time and space resources occupied by the task.
[0024] In a possible implementation, the scheduling optimizer is used to:
[0025] According to the category of the target task, resource requirement information and the current status information of each candidate core, a machine learning model or a preset algorithm is used for analysis to determine the optimal task allocation plan that meets the preset scheduling goals, and the target task is allocated to the target core among the candidate cores indicated by the optimal task allocation plan.
[0026] In a possible implementation, the device further includes:
[0027] The performance feedback system is used to collect the performance data of the task during execution and feed it back to the scheduling optimizer. The performance data of the task during execution includes the time and space resources occupied by the task during execution.
[0028] The scheduler optimizer is also used to:
[0029] Fine-tune machine learning models or adjust preset algorithms based on performance data during task execution.
[0030] According to another aspect of the present disclosure, a task scheduling method is provided. The method comprises:
[0031] The task detector monitors the initiation of target tasks and determines the categories and resource requirement information of target tasks. The categories of target tasks include computing tasks and communication tasks.
[0032] The core performance monitor determines current status information of each candidate core, each candidate core including a core having different task processing performance;
[0033] The scheduling optimizer analyzes the target task category, resource requirement information, and current status information of each candidate core, determines the optimal task allocation scheme that meets the preset scheduling target, and allocates the target task to the target core indicated by the optimal task allocation scheme among the candidate cores;
[0034] The TaskExecuter executes the target task on the target core.
[0035] In a possible implementation, the method may further include:
[0036] The dependency analyzer determines the dependency between the target task and the tasks being executed on each candidate core.
[0037] The dependency relationship may indicate whether the target task and the task being executed need to be executed serially.
[0038] The scheduling optimizer analyzes the target task category, resource requirement information, and current status information of each candidate core, determines the optimal task allocation scheme that meets the preset scheduling target, and allocates the target task to the target core indicated by the optimal task allocation scheme among the candidate cores, which may include:
[0039] In response to the dependency indicating that the target task and the task being executed must be executed serially, the scheduling optimizer analyzes the category of the target task, resource requirement information and the current status information of each candidate core, determines the optimal task allocation plan that meets the preset scheduling goals, and allocates the target task to the target core indicated by the optimal task allocation plan among the candidate cores.
[0040] In a possible implementation, the method may further include:
[0041] The scheduling optimizer allocates the target task to a preset core in each candidate core in response to the dependency indicating that the target task and the task being executed do not need to be executed serially, wherein the preset core is a core other than the target core;
[0042] The TaskExecuter executes the target task on the specified core.
[0043] In a possible implementation, the method may further include:
[0044] The scheduling optimizer determines the priority of the target task based on the category and resource requirement information of the target task, where the target task with a higher priority has a higher demand for computing resources and a stricter requirement on the execution order;
[0045] The scheduling optimizer analyzes the target task category, resource requirement information, and current status information of each candidate core, determines the optimal task allocation scheme that meets the preset scheduling target, and allocates the target task to the target core indicated by the optimal task allocation scheme among the candidate cores, including:
[0046] The scheduling optimizer analyzes the priority of the target task and the current status information of each candidate core, determines the optimal task allocation plan that meets the preset scheduling goals, and allocates the target task to the target core indicated by the optimal task allocation plan among the candidate cores.
[0047] In a possible implementation, the method may further include:
[0048] The scheduling optimizer determines the score of each candidate core based on the current status information of each candidate core and the degree of matching with the target task;
[0049] The scheduling optimizer analyzes the target task category, resource requirement information, and current status information of each candidate core, determines the optimal task allocation scheme that meets the preset scheduling target, and allocates the target task to the target core indicated by the optimal task allocation scheme among the candidate cores, including:
[0050] The scheduling optimizer analyzes the priority of the target task and the score of each candidate core, determines the optimal task allocation plan that meets the preset scheduling goals, and allocates the target task to the target core indicated by the optimal task allocation plan among the candidate cores.
[0051] In a possible implementation, the scheduling optimizer analyzes the category of the target task, resource requirement information, and current status information of each candidate core, determines an optimal task allocation scheme that meets a preset scheduling target, and allocates the target task to the target core indicated by the optimal task allocation scheme among the candidate cores, which may include:
[0052] The scheduling optimizer uses a machine learning model or a preset algorithm to analyze the target task category, resource requirement information, and current status information of each candidate core, determines the optimal task allocation plan that meets the preset scheduling goals, and allocates the target task to the target core among the candidate cores indicated by the optimal task allocation plan.
[0053] In a possible implementation, the method may further include:
[0054] The performance feedback system collects the performance data of the task during execution and feeds it back to the scheduling optimizer. The performance data of the task during execution includes the time and space resources occupied by the task during execution.
[0055] The scheduling optimizer fine-tunes the machine learning model or adjusts the preset algorithm based on the performance data of the task execution.
[0056] According to another aspect of the present disclosure, a task scheduling device is provided, comprising: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to implement the above method when executing the instructions stored in the memory.
[0057] According to another aspect of the present disclosure, a non-volatile computer-readable storage medium is provided, on which computer program instructions are stored, wherein the computer program instructions implement the above method when executed by a processor.
[0058] According to another aspect of the present disclosure, a computer program product is provided, including a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the above method.
[0059] According to the embodiments of the present disclosure, by monitoring the initiation of the target task, determining the category and resource requirement information of the target task, determining the current status information of each candidate core, analyzing according to the category of the target task, the resource requirement information and the current status information of each candidate core, determining the optimal task allocation scheme that meets the preset scheduling target, and allocating the target task to the target core indicated by the optimal task allocation scheme among the candidate cores to execute the target task on the target core. Since each candidate core includes cores with different task processing performance and the category of the target task includes computing tasks and communication tasks, it is possible to take into account the asymmetry of performance between different cores in an asymmetric core computing environment, dynamically adjust task allocation and communication paths, give full play to the potential of asymmetric core devices, reduce performance bottlenecks caused by uneven resource allocation, improve resource utilization and computing efficiency, and meet the needs of high-efficiency and high-performance computing.
[0060] Further features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate exemplary embodiments, features, and aspects of the disclosure and, together with the description, serve to explain the principles of the disclosure.
[0062] Figure 1 A schematic diagram showing an application scenario according to an embodiment of the present disclosure.
[0063] Figure 2 A structural diagram of a task scheduling device according to an embodiment of the present disclosure is shown.
[0064] Figure 3 A flowchart of a task scheduling method according to an embodiment of the present disclosure is shown.
[0065] Figure 4 It is a block diagram of a device 1900 for task scheduling according to an exemplary embodiment. DETAILED DESCRIPTION
[0066] Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise specified.
[0067] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.
[0068] In addition, in order to better illustrate the present disclosure, numerous specific details are given in the following specific embodiments. It should be understood by those skilled in the art that the present disclosure can also be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present disclosure.
[0069] The field of artificial intelligence technology involves the training and reasoning of large deep learning models, and the current frameworks of large deep learning models are usually designed to work in a symmetric core computing environment, where all processor cores have the same or similar computing power. Therefore, the current task scheduling schemes are generally designed to assume that all cores can perform tasks with equal efficiency, and use static or simple load balancing strategies to implement task scheduling, such as polling or random assignment of tasks. In the scenario of asymmetric cores, the current technical solutions will cause the higher-performance cores to wait for the weaker cores to complete their tasks, resulting in resource waste and processing bottlenecks, and cannot meet the needs of high-efficiency and high-performance computing.
[0070] In view of this, the present disclosure provides a task scheduling device, method and storage medium. The device of the embodiment of the present disclosure monitors the initiation of the target task by using a task detector, determines the category and resource requirement information of the target task, and determines the current state information of each candidate core by using a core performance monitor, and uses a scheduling optimizer to analyze according to the category, resource requirement information and current state information of each candidate core, determines the optimal task allocation scheme that meets the preset scheduling target, and allocates the target task to the target core indicated by the optimal task allocation scheme among the candidate cores, so as to use a task executor to execute the target task on the target core. Since each candidate core includes cores with different task processing performance and the category of the target task includes computing tasks and communication tasks, it can be realized in an asymmetric core computing environment to take into account the asymmetry of performance between different cores, dynamically adjust task allocation and communication paths, give full play to the potential of asymmetric core devices, reduce performance bottlenecks caused by uneven resource allocation, improve resource utilization and computing efficiency, and meet the needs of high-efficiency and high-performance computing.
[0071] Figure 1 A schematic diagram showing an application scenario according to an embodiment of the present disclosure is shown. Figure 1As shown, the task scheduling device of the embodiment of the present disclosure can be deployed in a large model framework (such as TensorFlow, PyTorch, Megatron-LM, Colossal-AI, etc.), and is used to implement the scheduling of computing tasks and communication tasks in the asymmetric core computing environment during the training and reasoning process of the deep learning model. The large model framework can be used to support the construction and execution of complex models. A heterogeneous computing system containing different types of cores can be used in the asymmetric core computing environment. The system can be a combination of cores with different processing performances, for example, a combination of a central processing unit (CPU) and a graphics processing unit (GPU) or a GPU with different processing performances.
[0072] In an exemplary scenario, for example, in the process of training a deep learning model based on a large model framework, the task scheduling device disclosed in the present invention can evaluate the resource requirements of the computing tasks and communication tasks initiated during the training process, and take into account the performance status of each core in a heterogeneous computing system, dynamically allocate tasks to the most suitable core for execution, so as to improve the parallelism and overall efficiency of task execution.
[0073] The above-mentioned large model framework can be deployed in a terminal device or a server. The terminal device can be any one or more of a mobile phone, a foldable electronic device, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a personal digital assistant (PDA), and a vehicle-mounted device. The embodiments of the present disclosure do not impose any special restrictions on the specific type of the terminal device, and the terminal device can have a wired or wireless communication function.
[0074] The server can be located locally or in the cloud, and can be a physical device or a virtual device, such as a virtual machine, a container, etc., and has a wireless communication function, wherein the wireless communication function can be set in the chip (system) or other parts or components of the server. The wireless communication function can be realized, for example, through mobile communication technologies such as 2G / 3G / 4G / 5G, as well as Wi-Fi, Bluetooth, frequency modulation (FM), digital radio, satellite communication, etc. Communication can also be carried out through wired connection to achieve interaction with other devices.
[0075] Figure 2 FIG. 2 shows a structural diagram of a task scheduling device according to an embodiment of the present disclosure. Figure 2As shown, the task scheduling device of the embodiment of the present disclosure may include:
[0076] The task detector 201 is used to monitor the initiation of the target task and determine the category and resource requirement information of the target task.
[0077] A core performance monitor 202, for determining current status information of each candidate core, each candidate core including cores having different task processing performance;
[0078] The scheduling optimizer 203 is used to analyze the category of the target task, resource requirement information and current status information of each candidate core, determine the optimal task allocation scheme that meets the preset scheduling target, and allocate the target task to the target core indicated by the optimal task allocation scheme among the candidate cores;
[0079] The task executor 204 is used to execute the target task on the target core.
[0080] Among them, the categories of target tasks include computing tasks and communication tasks. Computing tasks and communication tasks can be tasks in the process of deep learning model training or reasoning. Computing tasks may include mathematical operations that the model needs to perform during training or reasoning, and communication tasks may include data transmission between different cores (such as CPU, GPU, TPU, etc.). By scheduling computing tasks and communication tasks in the model training process, the task scheduling device disclosed in the present invention can speed up the training speed of large-scale deep learning models and reduce energy consumption and costs.
[0081] Resource requirement information may include the time and space (such as memory / video memory usage) required to execute the target task.
[0082] Each candidate core may include a core in a heterogeneous computing system. Each candidate core includes a core with different task processing performance. The cores with different task processing performance may be cores of different types, such as a CPU and a GPU, or cores of the same type but with different task processing performance, such as GPUs with different task processing performance.
[0083] The current status information of the candidate cores may include the task processing speed, current load information and task queue length of each candidate core. The task processing speed may be used to indicate the ability of the core to complete tasks within a given time; the current load information may include the number of tasks being executed, the current utilization of the core, and the usage of the core's resources (such as memory or video memory); the task queue length may indicate the number of tasks waiting to be processed in the core.
[0084] In the process of the scheduling optimizer 203 determining the optimal task allocation plan, based on the current status information of each candidate core, when the resources of the candidate cores are sufficient, the target task can be allocated to the core with stronger performance; when the resources of the candidate cores are insufficient, the target task can be allocated to the core with moderate or weaker performance.
[0085] By allocating the target task to the target core indicated by the optimal task allocation scheme among the candidate cores, the target task can meet the preset scheduling target when executed on the target core. The preset scheduling target includes minimizing the time and space resources occupied by the task.
[0086] The scheduling optimizer 203 can be used to:
[0087] According to the category of the target task, resource requirement information and the current status information of each candidate core, a machine learning model or a preset algorithm is used for analysis to determine the optimal task allocation plan that meets the preset scheduling goals, and the target task is allocated to the target core among the candidate cores indicated by the optimal task allocation plan.
[0088] The machine learning model can be pre-trained based on historical data. The historical data may include data within a preset historical period, such as: task category, resource requirement information of the task, current status information of the core, and performance data when the task is executed. Performance data is, for example, the time and space resources occupied when the task is executed. The trained machine learning model can predict the time, space, etc. occupied by the target task when executed on each candidate core based on the category of the target task, resource requirement information, and current status information of each candidate core, so that the candidate core that meets the preset scheduling target can be selected as the target core.
[0089] The preset algorithm is, for example, a heuristic search algorithm such as a genetic algorithm, so that a solution can be performed in a complex decision space (the category of the target task, resource demand information, and the current state information of each candidate core) to obtain a fast convergence to obtain an optimal solution (target core).
[0090] According to the embodiment of the present disclosure, a task detector is used to monitor the initiation of a target task, the category and resource requirement information of the target task are determined, and a core performance monitor is used to determine the current status information of each candidate core. A scheduling optimizer is used to analyze the category, resource requirement information and current status information of the target task, determine the optimal task allocation scheme that meets the preset scheduling target, and allocate the target task to the target core indicated by the optimal task allocation scheme among the candidate cores, so that the task executor is used to execute the target task on the target core. Since each candidate core includes cores with different task processing performance and the category of the target task includes computing tasks and communication tasks, it is possible to take into account the asymmetry of performance between different cores in an asymmetric core computing environment, dynamically adjust task allocation and communication paths, give full play to the potential of asymmetric core devices, reduce performance bottlenecks caused by uneven resource allocation, improve resource utilization and computing efficiency, and meet the needs of high-efficiency and high-performance computing.
[0091] See also Figure 2 , the task scheduling device of the present disclosure may also include:
[0092] The dependency analyzer 205 is used to determine the dependency relationship between the target task and the tasks being executed on each candidate core.
[0093] The dependency relationship may indicate whether the target task and the task being executed need to be executed serially.
[0094] The tasks being executed may include all or part (for example, a certain category) of tasks being executed on each candidate core.
[0095] When it is indicated that the target task and the task being executed do not need to be executed serially, it can be indicated that there is no strict execution order between the tasks, that is, the tasks can be executed in parallel.
[0096] At this time, the scheduling optimizer 203 may be used to: in response to the dependency indicating that the target task and the task being executed do not need to be executed in series, allocate the target task to a preset core among the candidate cores for execution;
[0097] The task executor 204 may be used to:
[0098] Execute the target task on the specified core.
[0099] Among them, the preset core can be a core other than the target core, that is, a core in each candidate core that is dedicated to executing tasks that do not have a strict execution order, and can execute tasks in parallel with other candidate cores. The preset core may include a dedicated communication core for processing communication tasks and a dedicated computing core for processing computing tasks. The type of the preset core assigned to the target task can be determined according to the category of the target task. For example, when the target task is a communication task, the assigned preset core can be a dedicated communication core, on which the communication task can be executed, and the dedicated communication core can execute tasks in parallel with other cores (such as cores for executing computing tasks).
[0100] According to the embodiments of the present disclosure, by determining the dependencies between tasks and allocating them to preset cores for execution when tasks do not need to be executed serially, the task scheduling efficiency in an asymmetric core environment can be further improved, computing bottlenecks caused by unbalanced allocation can be reduced, the parallelism of task execution can be improved, task dependencies can be ensured to be met, and execution delays and idle resources can be reduced.
[0101] When it is indicated that the target task and the task being executed must be executed serially, the scheduling optimizer 203 may be used to:
[0102] In response to the dependency indicating that the target task and the task being executed must be executed serially, an analysis is performed based on the category of the target task, resource requirement information and current status information of each candidate core, an optimal task allocation scheme that meets the preset scheduling goals is determined, and the target task is allocated to the target core among the candidate cores indicated by the optimal task allocation scheme.
[0103] The scheduling optimizer 203 may select a target core from other cores. At this time, the target core may be assigned to the target task based on the above method, for example, according to the current status information of each candidate core, when the resources of the candidate core are sufficient, the target core indicated by the optimal task assignment scheme is determined to be a core with a stronger performance, and when the resources of the candidate core are insufficient, the target core indicated by the optimal task assignment scheme is determined to be a core with a moderate or weaker performance.
[0104] The scheduling optimizer 203 may also be used to:
[0105] Determine the priority of target tasks based on their categories and resource requirements;
[0106] According to the priority of the target task and the current status information of each candidate core, an optimal task allocation scheme that meets the preset scheduling goal is determined, and the target task is allocated to the target core indicated by the optimal task allocation scheme among the candidate cores.
[0107] Among them, the higher the priority of the target task, the higher the demand for computing resources and the stricter the execution order. Tasks with high computing resource requirements usually involve a large number of computing operations, which will consume a large number of core resources. Tasks with strict execution order can be tasks that must be executed in a predetermined order and cannot be changed at will.
[0108] The above-mentioned machine learning model or preset algorithm can be used to determine the optimal task allocation plan that meets the preset scheduling goals based on the priority of the target task and the current status information of each candidate core, and allocate the target task to the target core indicated by the optimal task allocation plan.
[0109] Optionally, the scheduling optimizer 203 may also be used to:
[0110] Determine the score of each candidate core based on its current status information and its matching degree with the target task;
[0111] According to the priority of the target task and the score of each candidate core, an optimal task allocation scheme that meets the preset scheduling goal is determined, and the target task is allocated to the target core indicated by the optimal task allocation scheme among the candidate cores.
[0112] The degree of matching with the target task can be determined based on the category of the target task, resource requirement information, and current status information of each candidate core. A candidate core with a higher degree of matching can better meet the requirements of the target task.
[0113] The faster the task processing speed of each candidate core, the smaller the current load, the shorter the task queue length, and the higher the degree of matching with the target task, the higher its score can be.
[0114] The above-mentioned machine learning model or preset algorithm can be used to analyze the priority of the target task and the score of each candidate core, determine the optimal task allocation plan that meets the preset scheduling goals, and allocate the target task to the target core indicated by the optimal task allocation plan.
[0115] Thus, task scheduling can be achieved in a more targeted and efficient manner, execution delays and resource limitations can be reduced, and resource utilization and execution efficiency of asymmetric core computing devices can be further optimized.
[0116] Optionally, the device may further include:
[0117] The performance feedback system 206 is used to collect the performance data of the task execution and feed back the performance data of the task execution to the scheduling optimizer 203;
[0118] The scheduling optimizer 203 may also be used to:
[0119] Fine-tune machine learning models or adjust preset algorithms based on performance data during task execution.
[0120] Among them, the performance data fed back to the scheduling optimizer 203 by the performance feedback system 206 can also be used together with the data provided by the task detector 201, the core performance monitor 202, and the dependency analyzer 205 obtained by the scheduling optimizer 203 as data for fine-tuning the machine learning model or adjusting the preset algorithm, thereby further improving the scheduling effect of subsequent tasks and enabling the task scheduling device of the disclosed embodiment to have stronger real-time response capabilities and flexibility.
[0121] The performance data of the task execution may include the time and space resources occupied by the task execution. For example, through adjustment, the task execution time can be shortened and the space resources occupied can be reduced in the subsequent task scheduling process.
[0122] Figure 3 FIG. 1 is a flowchart of a task scheduling method according to an embodiment of the present disclosure. Figure 3 As shown, the method may include:
[0123] Step S301 : The task detector monitors the initiation of a target task and determines the category and resource requirement information of the target task.
[0124] The categories of target tasks may include computing tasks and communication tasks.
[0125] Step S302: The core performance monitor determines the current status information of each candidate core.
[0126] The candidate cores may include cores having different task processing performances.
[0127] In step S303, the scheduling optimizer analyzes the category of the target task, resource requirement information and current status information of each candidate core, determines the optimal task allocation scheme that meets the preset scheduling target, and allocates the target task to the target core indicated by the optimal task allocation scheme among the candidate cores.
[0128] Step S304: the task executor executes the target task on the target core.
[0129] In a possible implementation, the current status information of each candidate core includes the task processing speed, current load information and task queue length of each candidate core, and the preset scheduling goal includes minimizing the time and space resources occupied by the task.
[0130] In a possible implementation, after step S302, the method may further include:
[0131] The dependency analyzer determines the dependency between the target task and the tasks being executed on each candidate core.
[0132] The dependency relationship may indicate whether the target task and the task being executed need to be executed serially.
[0133] Step S303 may include:
[0134] In response to the dependency indicating that the target task and the task being executed must be executed serially, the scheduling optimizer analyzes the category of the target task, resource requirement information and the current status information of each candidate core, determines the optimal task allocation plan that meets the preset scheduling goals, and allocates the target task to the target core indicated by the optimal task allocation plan among the candidate cores.
[0135] In a possible implementation, the method may further include:
[0136] The scheduling optimizer allocates the target task to a preset core in each candidate core in response to the dependency indicating that the target task and the task being executed do not need to be executed serially, wherein the preset core is a core other than the target core;
[0137] The TaskExecuter executes the target task on the specified core.
[0138] In a possible implementation, the method may further include:
[0139] The scheduling optimizer determines the priority of the target task based on the category and resource requirement information of the target task, where the target task with a higher priority has a higher demand for computing resources and a stricter requirement on the execution order;
[0140] Step S303 may include:
[0141] The scheduling optimizer analyzes the priority of the target task and the current status information of each candidate core, determines the optimal task allocation plan that meets the preset scheduling goals, and allocates the target task to the target core indicated by the optimal task allocation plan among the candidate cores.
[0142] In a possible implementation, the method may further include:
[0143] The scheduling optimizer determines the score of each candidate core based on the current status information of each candidate core and the degree of matching with the target task;
[0144] Step S303 may include:
[0145] The scheduling optimizer analyzes the priority of the target task and the score of each candidate core, determines the optimal task allocation plan that meets the preset scheduling goals, and allocates the target task to the target core indicated by the optimal task allocation plan among the candidate cores.
[0146] In a possible implementation, step S303 may include:
[0147] The scheduling optimizer uses a machine learning model or a preset algorithm to analyze the target task category, resource requirement information, and current status information of each candidate core, determines the optimal task allocation plan that meets the preset scheduling goals, and allocates the target task to the target core among the candidate cores indicated by the optimal task allocation plan.
[0148] In a possible implementation, the method may further include:
[0149] The performance feedback system collects the performance data of the task during execution and feeds it back to the scheduling optimizer. The performance data of the task during execution includes the time and space resources occupied by the task during execution.
[0150] The scheduling optimizer fine-tunes the machine learning model or adjusts the preset algorithm based on the performance data of the task execution.
[0151] According to the embodiments of the present disclosure, by monitoring the initiation of the target task, determining the category and resource requirement information of the target task, determining the current status information of each candidate core, analyzing according to the category of the target task, the resource requirement information and the current status information of each candidate core, determining the optimal task allocation scheme that meets the preset scheduling target, and allocating the target task to the target core indicated by the optimal task allocation scheme among the candidate cores to execute the target task on the target core. Since each candidate core includes cores with different task processing performance and the category of the target task includes computing tasks and communication tasks, it is possible to take into account the asymmetry of performance between different cores in an asymmetric core computing environment, dynamically adjust task allocation and communication paths, give full play to the potential of asymmetric core devices, reduce performance bottlenecks caused by uneven resource allocation, improve resource utilization and computing efficiency, and meet the needs of high-efficiency and high-performance computing.
[0152] In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the method described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.
[0153] The embodiment of the present disclosure also provides a computer-readable storage medium on which computer program instructions are stored, and the computer program instructions implement the above method when executed by a processor. The computer-readable storage medium can be a volatile or non-volatile computer-readable storage medium.
[0154] The embodiment of the present disclosure also proposes a task scheduling device, comprising: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to implement the above method when executing the instructions stored in the memory.
[0155] The embodiments of the present disclosure also provide a computer program product, including a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the above method.
[0156] Figure 4 1 is a block diagram of an apparatus 1900 for task scheduling according to an exemplary embodiment. For example, the apparatus 1900 may be provided as a server or a terminal device. Figure 4 , the apparatus 1900 includes a processing component 1922, which further includes one or more processors, and a memory resource represented by a memory 1932 for storing instructions, such as an application, that can be executed by the processing component 1922. The application stored in the memory 1932 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 1922 is configured to execute instructions to perform the above method.
[0157] The device 1900 may also include a power supply component 1926 configured to perform power management of the device 1900, a wired or wireless network interface 1950 configured to connect the device 1900 to a network, and an input / output interface 1958 (I / O interface). The device 1900 may operate based on an operating system stored in the memory 1932, such as Windows Server 2000. TM , MacOS X TM , Unix TM ,Linux TM , FreeBSD TM or similar.
[0158] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as a memory 1932 including computer program instructions, which can be executed by the processing component 1922 of the device 1900 to perform the above method.
[0159] The present disclosure may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.
[0160] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.
[0161] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0162] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be customized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.
[0163] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.
[0164] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0165] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0166] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the module, program segment or instruction includes one or more executable instructions for realizing the specified logical function. In some alternative implementations, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or action, or can be implemented with a combination of special hardware and computer instructions.
[0167] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.
Claims
1. A task scheduling device, characterized in that: The device comprises: A task detector, used to monitor the initiation of a target task and determine the category and resource requirement information of the target task, wherein the category of the target task includes a computing task and a communication task; a core performance monitor for determining current status information of each candidate core, each candidate core including cores having different task processing performances; A scheduling optimizer, configured to analyze the target task type, resource requirement information, and current status information of each candidate core, determine an optimal task allocation scheme that meets a preset scheduling target, and allocate the target task to a target core indicated by the optimal task allocation scheme among the candidate cores; The task executor is used to execute the target task on the target core.
2. The device according to claim 1, characterized in that The device also includes: A dependency analyzer, configured to determine a dependency relationship between a target task and a task being executed on each candidate core, wherein the dependency relationship indicates whether the target task and the task being executed need to be executed serially; The scheduling optimizer is used to: In response to the dependency indicating that the target task and the task being executed must be executed serially, an analysis is performed based on the category of the target task, resource requirement information and current status information of each candidate core, an optimal task allocation scheme that meets the preset scheduling goals is determined, and the target task is allocated to the target core among the candidate cores indicated by the optimal task allocation scheme.
3. The device according to claim 2, characterized in that The scheduling optimizer is further used for: In response to the dependency indicating that the target task and the task being executed do not need to be executed serially, allocating the target task to a preset core in each candidate core, wherein the preset core is another core other than the target core; The task executor is further used for: Execute the target task on the specified core.
4. The device according to claim 1, characterized in that The scheduling optimizer is used to: Determine the priority of the target task based on the category and resource requirement information of the target task, wherein the target task with a higher priority has a higher demand for computing resources and a stricter requirement for the execution order; An analysis is performed based on the priority of the target task and the current status information of each candidate core to determine an optimal task allocation scheme that meets a preset scheduling target, and the target task is allocated to the target core indicated by the optimal task allocation scheme among each candidate core.
5. The device according to claim 4, characterized in that The scheduling optimizer is used to: Determine the score of each candidate core based on its current status information and its matching degree with the target task; An analysis is performed based on the priority of the target task and the score of each candidate core to determine an optimal task allocation scheme that meets a preset scheduling target, and the target task is allocated to the target core indicated by the optimal task allocation scheme among the candidate cores.
6. The device according to claim 1, characterized in that The current status information of each candidate core includes the task processing speed, current load information and task queue length of each candidate core, and the preset scheduling target includes minimizing the time and space resources occupied by the task.
7. The device according to claim 1, characterized in that The scheduling optimizer is used to: According to the category of the target task, resource requirement information and current status information of each candidate core, a machine learning model or a preset algorithm is used for analysis to determine the optimal task allocation plan that meets the preset scheduling goals, and the target task is allocated to the target core among the candidate cores indicated by the optimal task allocation plan.
8. The device according to claim 7, characterized in that The device also includes: A performance feedback system is used to collect performance data during task execution and feed the performance data during task execution back to the scheduling optimizer, wherein the performance data during task execution includes the time and space resources occupied during task execution; The scheduling optimizer is further used for: Based on the performance data during task execution, the machine learning model is fine-tuned or the preset algorithm is adjusted.
9. A task scheduling method, characterized in that: The method comprises: The task detector monitors the initiation of the target task and determines the category and resource requirement information of the target task, wherein the category of the target task includes a computing task and a communication task; The core performance monitor determines current status information of each candidate core, each candidate core including a core having different task processing performance; The scheduling optimizer analyzes the target task category, resource requirement information, and current status information of each candidate core to determine an optimal task allocation scheme that meets a preset scheduling target, and allocates the target task to the target core indicated by the optimal task allocation scheme among the candidate cores; The task executor executes the target task on the target core.
10. A task scheduling device, characterized in that: include: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to implement the method of claim 9 when executing the instructions stored in the memory.
11. A non-volatile computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method of claim 9 is implemented.