Search

CN-122019196-A - Task scheduling method, task scheduling system, electronic device, computer readable storage medium and computer program product

CN122019196ACN 122019196 ACN122019196 ACN 122019196ACN-122019196-A

Abstract

The application provides a task scheduling method, a task scheduling system, electronic equipment, a computer program product and a computer readable storage medium, wherein the method comprises the steps of calling eBPF a program, collecting system operation data on a first system kernel layer, calling a reinforcement learning module, analyzing the system operation data and generating scheduling information of a first task, wherein the first task is a plurality of tasks to be operated in the first system, storing the scheduling information in eBPF MAP so that a kernel scheduler performs resource allocation on the first task based on the scheduling information read from eBPF MAP.

Inventors

  • GUAN JING

Assignees

  • 中移(苏州)软件技术有限公司
  • 中国移动通信集团有限公司

Dates

Publication Date
20260512
Application Date
20260414

Claims (10)

  1. 1. A method of task scheduling, the method comprising: invoking eBPF a program, and collecting system operation data on a first system kernel layer, wherein the system operation data is fine granularity data; invoking a reinforcement learning module, analyzing the system operation data and generating scheduling information of a first task, wherein the first task is a plurality of tasks to be operated in the first system; the scheduling information is stored eBPF MAP to cause the kernel scheduler to allocate resources to the first task based on the scheduling information read from the eBPF MAP.
  2. 2. The method of claim 1, wherein analyzing the system operational data to generate scheduling information for a first task comprises: processing the system operation data into a state vector; Training a first strategy by adopting the state vector to obtain a second strategy, wherein the second strategy is used for deciding the scheduling information of the first task; Determining whether the second policy meets a predetermined criterion using a reward function; And determining the scheduling information of the first task based on the second strategy.
  3. 3. The method of claim 2, wherein determining scheduling information for a first task based on the second policy comprises: Generating a lightweight inference model based on the second policy; And inputting the state vector into the lightweight inference model to obtain the output scheduling information of the first task.
  4. 4. The method according to claim 1, wherein the method further comprises: Determining a preset first parameter; and determining scheduling information of the first task based on the first parameter.
  5. 5. The method according to any one of claim 1 to 4, wherein, The eBPF program is inserted in one or more of a first system kernel tracking point, a first system kernel hook; eBPF programs adopt a just-in-time compiler; The system operational data is transferred to the user space through the eBPF MAP kernel and user space shared data or performance event ring buffer for use by the reinforcement learning module.
  6. 6. The method according to any one of claim 1 to 4, wherein, The scheduling information of the first task comprises the priority of the first task; fairly scheduling first tasks with the same priority; the first tasks with different priorities correspond to different full fair scheduler weights; a run queue corresponding to a priority; The method comprises the steps of preempting or suppressing resources of a first task with a second priority by a weight ratio configured by the first task with the first priority, wherein the first priority is higher than the second priority.
  7. 7. A task scheduling system, the task scheduling system comprising: eBPF, collecting system operation data on a first system kernel layer, wherein the system operation data is fine granularity data; The reinforcement learning module is used for analyzing the system operation data and generating scheduling information of a first task, wherein the first task is a plurality of tasks to be operated in the first system; And the processing module is used for storing the scheduling information into eBPF MAP so that the kernel scheduler performs resource allocation on the first task based on the scheduling information read from the eBPF MAP.
  8. 8. An electronic device, the electronic device comprising: A memory for storing computer executable instructions or computer programs; a processor for implementing the task scheduling method of any one of claims 1 to 6 when executing computer-executable instructions or computer programs stored in the memory.
  9. 9. A computer-readable storage medium, characterized in that the computer-readable storage medium stores one or more programs, the one or more programs are executable by one or more processors to implement the task scheduling method of any one of claims 1 to 6.
  10. 10. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the task scheduling method of any one of claims 1 to 6.

Description

Task scheduling method, task scheduling system, electronic device, computer readable storage medium and computer program product Technical Field The present application relates to computer technology, and more particularly, to a task scheduling method, a task scheduling system, an electronic device, a computer readable storage medium, and a computer program product. Background In current computing systems, task scheduling is one of the key factors affecting system performance. The scheduling technology in the related art mainly adopts a static priority scheduling scheme, a heuristic scheduling scheme based on rules, an intelligent scheduling scheme based on supervised learning, or a cluster scheduling scheme. However, in the static priority scheduling scheme, due to the fact that the priority is statically preset, a scheduler cannot sense the load change when the system runs, high priority tasks occupy resources even if idle, low priority tasks wait for a long time, so that the problems of low utilization rate of system resources and uneven response are caused, the rule-based heuristic scheduling scheme is seriously dependent on the accuracy of expert knowledge, lacks self-adaptive capacity in front of the dynamically-changed workload, is likely to be rapidly invalid and difficult to cope with complex and changeable system states, the training cost of the supervision-learning-based intelligent scheduling scheme is high, the model is often complex and poor in interpretation, and the system is complex to integrate into a stable production system, a certain performance risk exists, the cluster scheduling scheme has weak sensing capacity on the utilization rate of the resources of real-time and fine granularity, is relatively long in scheduling period, cannot rapidly respond to the load change of seconds or even milliseconds, and is insufficient in consideration of the association between tasks needing close cooperation. Disclosure of Invention The embodiment of the application provides a task scheduling method, a task scheduling system, electronic equipment, a computer readable storage medium and a computer program product. The technical scheme of the embodiment of the application is realized as follows: The embodiment of the application provides a task scheduling method, which comprises the following steps: invoking eBPF a program, and collecting system operation data on a first system kernel layer, wherein the system operation data is fine granularity data; invoking a reinforcement learning module, analyzing the system operation data and generating scheduling information of a first task, wherein the first task is a plurality of tasks to be operated in the first system; the scheduling information is stored eBPF MAP to cause the kernel scheduler to allocate resources to the first task based on the scheduling information read from the eBPF MAP. The embodiment of the application provides a task scheduling system, which comprises: eBPF, collecting system operation data on a first system kernel layer, wherein the system operation data is fine granularity data; The reinforcement learning module is used for analyzing the system operation data and generating scheduling information of a first task, wherein the first task is a plurality of tasks to be operated in the first system; And the processing module is used for storing the scheduling information into eBPF MAP so that the kernel scheduler performs resource allocation on the first task based on the scheduling information read from the eBPF MAP. The embodiment of the application provides electronic equipment which comprises a memory and a processor, wherein the memory is used for storing computer executable instructions or computer programs, and the processor is used for realizing the task scheduling method provided by the embodiment of the application when executing the computer executable instructions or the computer programs stored in the memory. The embodiment of the application provides a computer readable storage medium, which stores a computer program or computer executable instructions for realizing the task scheduling method provided by the embodiment of the application when being executed by a processor. The embodiment of the application provides a computer program product, which comprises a computer program or a computer executable instruction, and the task scheduling method provided by the embodiment of the application is realized when the computer program or the computer executable instruction is executed by a processor. The method has the advantages that kernel-state fine-grained data acquisition is achieved through eBPF, task scheduling information is automatically generated by combining reinforcement learning, system overhead is obviously reduced, subjectivity and high maintenance cost of manual rule setting are avoided, meanwhile, the problems that labeling data required by supervision learning are difficult to obtain and training period is long ar