Intelligent resource scheduling method and system based on task characteristics and system state perception
By combining the eBPF program with the Q-Learning model, task characteristics and system state are dynamically adjusted, solving the problem of low resource utilization in existing schedulers, achieving efficient resource allocation and low-latency response, and improving system performance.
Patent Information
- Application Number
- CN202511333102.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-18
- Publication Date
- 2026-01-02
AI Technical Summary
Existing operating system schedulers suffer from low resource utilization when faced with complex mixed loads, are unable to dynamically perceive task characteristics and global system status, resulting in excessive response latency and failing to meet high concurrency and real-time requirements.
The eBPF program monitors task characteristics in real time, combines the Q-Learning model and system status data, dynamically adjusts the allocation of computing resources for tasks, and uses the sched_setattr and cgroup v2 interfaces for precise scheduling.
It achieves high resource utilization and low-latency task response, improving the overall performance and service quality of the system, especially in edge computing and cloud computing scenarios.
Smart Images

Figure CN121255432A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of operating systems, in particular to an intelligent resource scheduling method and system based on task characteristics and system state perception. BACKGROUND
[0002] In the field of operating systems, efficient and intelligent scheduling of computing resources is a key link to ensure system performance and quality of service, which is widely used in cloud computing centers, edge computing nodes, big data platforms, and high-performance computing clusters, etc. In actual operation, in order to meet the diversified business load demand, it is often necessary to realize the precise and dynamic allocation of computing resources to ensure high throughput and low delay service goals.
[0003] At present, the mainstream operating system scheduler has many problems to be improved in dealing with complex mixed loads. The Completely Fair Scheduler (CFS) widely used in Linux kernel focuses on fairness in its design concept, but has obvious shortcomings in dynamic perception and precise control. Secondly, the problem of resource mismatch is prominent, resulting in low overall resource utilization. The fair queue mechanism of CFS makes CPU-intensive and I / O-intensive tasks compete for resources in the same way, while I / O-intensive tasks actively release the CPU when waiting for I / O operations, but the time slice they hold is often wasted and cannot be effectively utilized by compute-intensive tasks. Furthermore, the lack of global system state perception leads to suboptimal scheduling decisions. The decision of CFS is mainly limited to the length of the CPU load queue, and the global system bottleneck state such as memory pressure and I / O waiting is not considered comprehensively.
[0004] In high-concurrency and multi-task scenarios such as edge computing and cloud servers, the traditional scheduling mechanism makes the system resource utilization generally less than 65%, and for critical tasks such as industrial control instructions and interactive services, the response delay exceeds the standard by more than 40%, which cannot meet the strict real-time requirements, and has become a key technical bottleneck restricting the improvement of computing efficiency and service quality.
[0005] Therefore, there is an urgent need in the art for a new method and system that can dynamically perceive task characteristics and global system state and intelligently schedule resources accordingly to fundamentally solve the above problems. SUMMARY
[0006] The purpose of the present application is to provide an intelligent resource scheduling method and system based on task characteristics and system state perception, aiming to solve the problem of low resource utilization of existing traditional scheduling mechanisms.
[0007] To solve the above technical problems, according to the first aspect of the present application, an intelligent resource scheduling method and system based on task characteristics and system state perception is provided, comprising the following steps:
[0008] Step 1: Real-time monitoring and extracting dynamic feature information of tasks in the process through an eBPF program,
[0009] Step 2: Periodically collecting system hardware resource state data through the interface of the virtual file system of / proc and sysfs, and identifying the current system bottleneck type based on the state data;
[0010] Step 3: Inputting the dynamic feature information and the system bottleneck type as a state space into a Q-Learning model, and outputting an optimal scheduling strategy from the Q-Learning model;
[0011] Step 4: Executing the optimal scheduling strategy through the cgroup v2 control group interface provided by the Linux kernel sched_setattr system call, and completing the allocation of computing resources to the tasks.
[0012] Optionally, the identification of the resource requirement type comprises:
[0013] If the frequency of input / output operation system calls of the task in a unit of time exceeds a preset first threshold, the task is marked as an IO-intensive task; and / or,
[0014] If the CPU instruction cycle occupancy of the task in a unit of time exceeds a preset second threshold, the task is marked as a CPU-intensive task; and / or,
[0015] If the number of main page fault exceptions of the task in a unit of time exceeds a preset third threshold, the task is marked as a memory-sensitive task.
[0016] Optionally, the determination method of the time sensitivity identification is that if the frequency of the task calling a high-precision time acquisition function exceeds a preset fourth threshold, the task is marked as a real-time task.
[0017] Optionally, the importance score of the task is obtained through a weighted calculation formula, and the calculation formula is: importance score = w1 x user preset priority + w2 x historical crash impact degree; w1 is a weight coefficient of the user preset priority, and w2 is a weight coefficient of the historical crash impact degree.
[0018] Optionally, the scheduling strategy action output by the Q-Learning model is one of the following or any combination thereof:
[0019] Adjusting the static priority nice value of the task;
[0020] Setting the CPU affinity of the task to bind it to a specified CPU core;
[0021] Limit the upper limit of the usage quota of the CPU or memory resources of the task through the cgroup v2 interface.
[0022] According to a second aspect of the present application, a Linux intelligent resource scheduling system based on task characteristics and system state perception is provided for implementing the method according to any one of the preceding aspects, comprising:
[0023] A task characteristic extraction module is configured to mount a probe through an eBPF technology, capture and analyze system call behaviors and performance events of a task in real time, and generate the dynamic characteristic information.
[0024] A system state monitoring module is configured to collect state data of system hardware resources through a file system interface and identify a current system bottleneck type based on a sliding window algorithm.
[0025] An intelligent decision engine module is configured to have a Q-Learning model, and is configured to make reinforcement learning decisions according to the dynamic characteristic information and the system bottleneck type, and generate an optimal scheduling strategy.
[0026] A scheduling execution module is configured to execute the scheduling strategy through a Linux kernel standard interface.
[0027] A feedback module is configured to collect system and task performance data after the execution of the strategy to calculate a reward value, and feed back to the intelligent decision engine module for model optimization.
[0028] Optionally, the task characteristic extraction module comprises:
[0029] An eBPF hook subunit is configured to mount an eBPF program to capture kernel events.
[0030] An importance analysis subunit is configured to calculate an importance score and a resource demand type of the task.
[0031] Optionally, the system state monitoring module adopts a sliding window algorithm to identify the system bottleneck type, and specifically comprises:
[0032] A preset time length is taken as a collection window, and CPU load rate, memory usage rate, and IO waiting time are collected periodically.
[0033] If the value of any resource index in a plurality of consecutive collection windows exceeds the corresponding bottleneck preset threshold value, it is determined that the system is in the resource bottleneck state.
[0034] Optionally, the scheduling execution module is specifically configured to:
[0035] Call a sched_setattr system call to modify the scheduling strategy and priority of the task.
[0036] By reading and writing cpu.max and memory.high files in the cgroup v2 control group file system, the use quota upper limit of CPU and memory resources of a task or a task group is limited.
[0037] Optionally, the feedback module comprises a reward calculation unit, which calculates the reward value R based on the following formula:
[0038] R=k1×(Δt_response / t_initial)+k2×(Δu_resource / u_initial)-k3×t_switch, wherein k1, k2, and k3 are weight coefficients; t_initial is the response time of the key task before the strategy is executed; u_initial is the resource utilization of the system before the strategy is executed; Δt_response is the amount of reduction in the response time of the key task; Δu_resource is the amount of improvement in the resource utilization of the system; and t_switch is the time consumption of strategy switching.
[0039] Through the above technical solution, the present application has the following beneficial effects:
[0040] The present application can accurately allocate resources to the most needed task according to the real-time load condition of the system through global system state monitoring and bottleneck identification combined with intelligent decision-making of reinforcement learning. The present application effectively solves the problem of CPU idling caused by resource mismatch of the traditional CFS scheduler, dynamically perceives the time sensitivity and importance of the task through eBPF technology, and performs priority scheduling on real-time tasks, thereby providing strong guarantee for services with high service quality requirements. The intelligent scheduling strategy avoids vicious competition between CPU-intensive and I / O-intensive tasks, reduces unnecessary context switching and cache invalidation, and makes the task completion faster.
[0041] By combining eBPF dynamic perception, reinforcement learning decision-making, and Linux standard control interface, an intelligent resource scheduling system with high performance, low delay, high utilization, full automation, and strong compatibility is successfully created, which effectively solves the long-standing resource scheduling problem in the field of cloud computing and edge computing, and has high industrial application value and market prospect. BRIEF DESCRIPTION OF DRAWINGS
[0042] Fig. 1 The scheduling flowchart in an embodiment of the present application is shown in FIG. 1.
[0043] Fig. 2 The system architecture diagram in an embodiment of the present application is shown in FIG. 2. DETAILED DESCRIPTION
[0044] In order to make the objects, technical solutions and advantages of the present application clearer and more apparent, the present application will be further described in detail below with reference to the specific embodiments and in conjunction with the drawings. It should be understood that these descriptions are only exemplary and are not intended to limit the scope of the present application. In addition, in the following description, the description of well-known structures and techniques is omitted to avoid unnecessary confusion of the concept of the present application.
[0045] Please refer to Figs. 1-2 , the Linux intelligent resource scheduling method based on task characteristics and system state perception includes the following steps:
[0046] Step one, the task characteristic extraction module extracts task characteristics every 8-12 ms (based on a 10 ms reference period) as a period. By deploying a pre-written eBPF program in the Linux kernel, the eBPF technology is used to monitor the system call, CPU usage, memory access and other behaviors of the task in real time, automatically identify the task type (such as CPU-intensive, IO-intensive, memory-sensitive), and introduce importance scoring and time sensitivity judgment, combine user preset values and historical behavior, dynamically evaluate the priority and real-time demand of the task to generate a dynamic feature vector. At the same time, the system state monitoring module periodically polls the / proc and / sys file system interface every 45-55 ms (based on a 50 ms reference period) to obtain the utilization rate of the global hardware resources (CPU, memory, I / O device) Raw data, and uses a sliding window algorithm for processing and determination; if a resource index continuously exceeds the set threshold in a plurality of monitoring periods, it is determined that the system is currently in a resource bottleneck state.
[0047] Step two, the dynamic feature vector generated by step one is combined with the system bottleneck state to form a unified state descriptor, which is input into the decision engine based on the Q-Learning algorithm. The engine selects the scheduling instruction that can maximize the long-term reward from the pre-defined action space as the core decision criterion based on the built-in strategy and historical experience, and the expected long-term cumulative reward calculated by the reward function:
[0048] R=k1×(Δt_response / t_initial)+k2×(Δu_resource / u_initial)-k3×t_switch. Where k1, k2, k3 are weight coefficients; t_initial is the response time of the key task before the strategy is executed; u_initial is the resource utilization of the system before the strategy is executed;
[0049] Δt_response is the key task response time reduction; Δu_resource is the system resource utilization improvement; t_switch is the strategy switching time.
[0050] As an example, the predefined action space includes adjusting static priority, setting CPU affinity, configuring cgroup resource quota, etc.
[0051] In the embodiment, the reward function realizes the quantitative evaluation and trade-off of the multi-dimensional performance of the scheduling strategy through weight coefficients k1, k2, and k3: the real-time requirement of the key task is prioritized through the Δt_response term, the system resource utilization is driven to improve through the Δu_resource term, and the overhead of policy switching is constrained through the penalty term t_switch, so as to ensure that the decision engine can generate the optimal scheduling scheme on the basis of comprehensively considering performance, efficiency, and cost.
[0052] Step three, after the execution of the scheduling strategy, the change of system performance (such as the amount of response time shortening and the amount of utilization improvement) is captured by the feedback unit. The reward value of this decision is calculated by the reward function. The reward value is sent back to the intelligent decision engine to update and optimize the internal parameters of the Q-Learning model, thereby completing a learning iteration and making the next decision better.
[0053] In one specific embodiment, the edge gateway (hardware: 4-core ARM Cortex-A72 CPU, 8GB LPDDR4 RAM; system: Ubuntu 22.04LTS, kernel 5.15.0) runs three types of tasks:
[0054] Task A: video encoding (H.265, CPU-intensive, importance 7 points);
[0055] Task B: device control instruction processing (IO-intensive, importance 10 points, real-time);
[0056] Task C: log reporting (IO-intensive, importance 3 points);
[0057] Initial problem: Task A excessively occupies CPU resources, causing high system load, and thus the response delay of the key task B cannot be guaranteed.
[0058] First, the eBPF program monitors that task B frequently calls the clock_gettime system call (up to 500 times per second), which is a typical feature of the task performing high-precision timing and checking timeout, and dynamically determines that it is a high real-time task;
[0059] The eBPF program monitors that the user state instruction cycle ratio of task A is extremely high (82%), and the voluntary context switching rate is low, confirming that it is a CPU-intensive task;
[0060] The task feature extraction module generates a dynamic feature vector by comprehensively considering its behavior and user preset:
[0061] V_B = [IO_BOUND, 10, HIGH] / / IO intensive, importance 10, urgency high;
[0062] V_A = [CPU_BOUND, 7, LOW] / / CPU intensive, importance 7, urgency low;
[0063] V_C = [IO_BOUND, 3, LOW] / / IO intensive, importance 3, urgency low;
[0064] Secondly, the system state monitoring module monitors the CPU load rate every 50 ms. The data shows that the system CPU load is > 85% for 3 consecutive monitoring windows (150 ms in total), which determines that the system is currently in the CPU_BOTTLENECK state. Then the state descriptor is constructed, and the intelligent decision engine combines the feature vector with the system state to form a unified state descriptor S. Its core features are: [existence of high real-time IO task, CPU_BOTTLENECK]. The Q-Learning decision engine makes decisions based on the reward function:
[0065] R = k1 x (Δt_response / t_initial) + k2 x (Δu_resource / u_initial) - k3 x t_switch to maximize the long-term cumulative reward. The weights are set as k1 = 10 (priority to guarantee real-time, k2 = 5, k3 = 1. The engine selects a set of optimal scheduling instructions from the pre-defined action space and encapsulates them as executable JSON strategy output:
[0066] {
[0067] "task B": {"action": "priority", "value": 1}, / / switch to SCHED_FIFO real-time scheduling policy, priority 1 (highest)
[0068] "task A": {"action": "affinity", "core": 2}, / / bind its threads to the current low load (32%) CPU core 2
[0069] "task C": {"action": "quota", "cpu_max": "10%"} / / limit its CPU usage to 10% through cgroup
[0070] }
[0071] Finally, the scheduling policy is executed, the scheduler immediately executes the policy: set the scheduling policy of task B using sched_setscheduler(); bind the CPU affinity of task A through pthread_setaffinity_np(); limit the CPU quota of task C by writing the cpu.cfs_quota_us Cgroup interface file.
[0072] After a monitoring period of 50ms, the feedback unit captures the changes in system performance as shown in Table 1:
[0073] Table 1
[0074]
[0075]
[0076] The feedback unit calculates the actual reward value R based on the above table data. The significant reduction in the response delay of task B is the main source of reward, and although the performance of task C has declined, its low weight (k2) makes the overall reward value R still very considerable.
[0077] This high reward value is sent back to the intelligent decision engine to update the Q value corresponding to this set of scheduling actions in the Q-Learning model for state S. This will strengthen the model's confidence in making the same excellent decision in similar scenarios in the future, completing a successful closed-loop learning iteration.
[0078] This system not only intelligently identifies system bottlenecks and task criticality, but also outputs a fine-grained combined scheduling strategy, ensuring the performance of the most critical tasks while improving overall system efficiency, and continuously optimizing itself through a feedback learning mechanism.
[0079] The identification of the resource requirement type includes: if the frequency of input / output operating system calls of the task in a unit of time exceeds a preset first threshold, the task is marked as an IO-intensive task; and / or, if the CPU instruction cycle ratio of the task in a unit of time exceeds a preset second threshold, the task is marked as a CPU-intensive task; and / or, if the number of main page fault exceptions of the task in a unit of time exceeds a preset third threshold, the task is marked as a memory-sensitive task.
[0080] Further, the determination method of the time sensitivity identification is: if the frequency of calling a high-precision time acquisition function of the task exceeds a preset fourth threshold, the task is marked as a real-time task.
[0081] In a specific embodiment, task B in the edge gateway scenario: device control instruction processing (IO-intensive, importance 10 points, real-time),
[0082] eBPF monitoring: eBPF program is mounted on sys_enter_clock_gettime tracepoint or kprobe, and filters the PID of task B;
[0083] Data collection: within a 1-second monitoring window, eBPF counter records that task B initiated 500 clock_gettime system calls;
[0084] Decision: the fourth threshold T_time = 100 times / second is preset by the system. The collected frequency 500 > 100, far exceeding the threshold;
[0085] Output: the task feature extraction module therefore determines that task B is a high real-time task, and sets the time sensitivity identifier in the feature vector to HIGH.
[0086] Further, the importance score of the task is obtained by a weighted calculation formula, and the calculation formula is:
[0087] Importance score = w1 x user preset priority + w2 x historical crash impact degree; w1 is the weight coefficient of user preset priority, and w2 is the weight coefficient of historical crash impact degree. The importance score of the task is an initial importance value given to the task by the user or administrator according to the business logic. The historical crash impact degree is a quantitative index, which measures the negative impact degree of the system as a whole when the task fails (such as crash, abnormal exit) in the past
[0088] Further, the scheduling strategy action output by the Q-Learning model is one of the following or any combination thereof:
[0089] Adjusting the static priority nice value of the task;
[0090] Setting the CPU affinity of the task, and binding it to a specified CPU core;
[0091] Limiting the usage quota of the task on CPU or memory resources through cgroup v2 interface.
[0092] The system can take appropriate and fine-grained control for tasks with different characteristics. The three actions form an internal hierarchy, which together forms a solid resource management framework.
[0093] Nice value: competition and guidance at the level of shared CPU time.
[0094] CPU affinity: allocation and isolation at the level of physical CPU cores.
[0095] Cgroup quota: global hard partition and limit on the whole system resource level. The adjustment of nice value, CPU affinity and cgroup quota are taken as the output action space of the Q-Learning model, and the biggest advantage is that a rich, multi-granularity and immediate effect "tool box" is provided for the intelligent decision engine. This makes the engine not only make simple decisions such as who to prioritize, but also make complex decisions such as how to reallocate and isolate resources from the hardware and system level, so as to accurately and efficiently achieve the multi-dimensional optimization goal set by the reward function, and finally make the system scheduling from "intelligent" to "optimization".
[0096] In another embodiment of the application, a Linux intelligent resource scheduling system based on task characteristics and system state perception is proposed, comprising:
[0097] A task feature extraction module is used to mount a probe through eBPF technology, capture and analyze the system call behavior and performance events of the task in real time, so as to generate the dynamic characteristic information.
[0098] A system state monitoring module is used to collect the state data of system hardware resources through a file system interface and identify the current system bottleneck type based on a sliding window algorithm.
[0099] An intelligent decision engine module is used to generate an optimal scheduling strategy by reinforcement learning decision according to the dynamic characteristic information and the system bottleneck type.
[0100] A scheduling execution module is used to execute the scheduling strategy through a Linux kernel standard interface.
[0101] A feedback module is used to collect system and task performance data after the execution of the strategy to calculate the reward value and feed back to the intelligent decision engine module for model optimization.
[0102] The task feature extraction module runs at a short first period (such as 10ms), and the micro-behavior characteristics (such as system call frequency and CPU instruction proportion) of the task are captured at a high frequency in the kernel layer through eBPF technology, and the output focuses on describing the attributes and real-time needs of a single task. The system state monitoring module runs at a long second period (such as 50ms), and the macro utilization rate data of global hardware resources are collected at a low frequency by reading system file interface, and the system bottleneck is determined based on a sliding window algorithm, and the output focuses on describing the resource health status of the whole system. Together, they provide a complete state vector containing both individual task intention and system global resource for the decision engine.
[0103] The intelligent decision engine module is the core of the system, which receives and fuses data from the perception layer, and makes intelligent decisions. The module combines the received dynamic feature information with the system bottleneck type to construct a unified state descriptor that can comprehensively represent the current system status. The built-in Q-Learning model queries its policy library according to the state descriptor, and generates the corresponding optimal scheduling strategy with the goal of maximizing long-term cumulative rewards.
[0104] The scheduling execution module receives instructions from the intelligent decision engine and is responsible for converting them into specific system calls.
[0105] The feedback module cooperates with other modules of the system to form the learning and optimization loop of the system. After the scheduling execution module completes policy execution, the feedback module waits for the next monitoring period and collects the effects after policy execution from the new round of data of the system status monitoring module and the task feature extraction module. Based on these new performance data, the actual reward value of this decision is calculated according to the preset reward function, and the reward value is fed back to the intelligent decision engine module for updating the internal parameters of the Q-Learning model.
[0106] Further, the task feature extraction module includes:
[0107] An eBPF hook subunit for mounting an eBPF program to capture kernel events;
[0108] An importance analysis subunit for calculating the importance score and resource demand type of the task.
[0109] Further, the system status monitoring module uses a sliding window algorithm to identify the system bottleneck type, specifically including:
[0110] Periodically collecting CPU load rate, memory usage, and IO waiting time with a preset time length as a collection window;
[0111] If the value of any resource indicator exceeds the corresponding bottleneck preset threshold in consecutive multiple collection windows, it is determined that the system is in the resource bottleneck state.
[0112] Further, the scheduling execution module is specifically used for:
[0113] Calling the sched_setattr system call to modify the scheduling policy and priority of the task;
[0114] Reading and writing cpu.max and memory.high files in the cgroup v2 control group file system to limit the usage quota upper limit of CPU and memory resources of the task or task group.
[0115] Further, the feedback module comprises a reward calculation unit, which calculates a reward value R based on the following formula:
[0116] R=k1x(Delt_response / t_initial)+k2x(Delt_resource / u_initial)-k3xt_switch, wherein k1, k2, k3 are weight coefficients; t_initial is the response time of a key task before the strategy is executed; u_initial is the resource utilization of the system before the strategy is executed; Delt_response is the shortened amount of the key task response time; Delt_resource is the improved amount of the system resource utilization; and t_switch is the time consumption of strategy switching.
[0117] In summary, the application provides a complete, end-to-end intelligent method and system capable of realizing long-term performance optimization of the system in the field of operating system resource scheduling, effectively solving the technical problems that the traditional scheduling method cannot adapt to dynamic complex environment and the optimization target is single.
[0118] Obviously, those skilled in the art can make various modifications and variations to the application without departing from the spirit and scope of the application. Thus, if these modifications and variations of the application belong to the scope of the claims of the application and their equivalent technologies, the application also intends to include these modifications and variations.
Claims
1. A Linux intelligent resource scheduling method based on task characteristics and system state awareness, characterized in that, Includes the following steps: Step 1: Using the eBPF program, monitor and extract the dynamic characteristic information of tasks in the process in real time. Step 2: Periodically collect system hardware resource status data by querying the virtual file system interfaces of / proc and sysfs, and identify the current system bottleneck type based on the status data; Step 3: Input the dynamic feature information and the system bottleneck type as a state space into the Q-Learning model, and the Q-Learning model outputs the optimal scheduling strategy; Step 4: Execute the optimal scheduling strategy by using the sched_setattr system call provided by the Linux kernel to access the cgroup v2 control group interface and complete the allocation of computing resources for the task.
2. The method according to claim 1, characterized in that, In step 1, the identification of resource demand types includes: If the number of input / output operating system calls to a task exceeds a preset first threshold within a unit of time, it is marked as an I / O-intensive task; and / or, If a task's CPU instruction cycles per unit time exceed a preset second threshold, it is marked as a CPU-intensive task; and / or, If the number of major page faults in a task exceeds the preset third threshold within a unit of time, it will be marked as a memory-sensitive task.
3. The method according to claim 1, characterized in that, In step 1, the method for determining the time sensitivity indicator is as follows: If a task calls the high-precision time acquisition function more frequently than a preset fourth threshold, it will be marked as a real-time task.
4. The method according to claim 1, characterized in that, In step 1, the importance score of the task is obtained through a weighted calculation formula, which is as follows: Importance score = w1 × user preset priority + w2 × historical crash impact; w1 is the weight coefficient for user-preset priority, and w2 is the weight coefficient for the impact of historical crashes.
5. The method according to claim 1, characterized in that, In step 3, the scheduling strategy action output by the Q-Learning model is one of the following or any combination thereof: Adjust the static priority nice value of the task; Configure the CPU affinity of a task to bind it to a specified CPU core; Limit the upper limit of CPU or memory resource usage quotas for tasks through the cgroup v2 interface.
6. A Linux intelligent resource scheduling system based on task characteristics and system state awareness, used to implement the method described in any one of claims 1-5, characterized in that, include: The task feature extraction module is used to attach probes via eBPF technology to capture and analyze the system call behavior and performance events of the task in real time in order to generate the dynamic feature information. The system status monitoring module is used to collect status data of system hardware resources through the file system interface and identify the current system bottleneck type based on the sliding window algorithm; The intelligent decision engine module has a built-in Q-Learning model, which is used to make reinforcement learning decisions based on the dynamic feature information and the system bottleneck type to generate the optimal scheduling strategy. The scheduling execution module is used to execute the scheduling policy through the Linux kernel standard interface; The feedback module is used to collect system and task performance data after the strategy is executed to calculate the reward value, and feed it back to the intelligent decision engine module for model optimization.
7. The system according to claim 6, characterized in that, The task feature extraction module includes: eBPF hook subunit, used to mount eBPF programs to capture kernel events; The importance analysis sub-unit is used to calculate the importance score of a task and the type of resource requirement.
8. The system according to claim 6, characterized in that, The system status monitoring module uses a sliding window algorithm to identify system bottleneck types, specifically including: The CPU load rate, memory usage, and IO wait time are collected periodically within a preset time window. If the value of any resource indicator exceeds its corresponding bottleneck preset threshold in multiple consecutive collection windows, the system is determined to be in that resource bottleneck state.
9. The system according to claim 6, characterized in that, The scheduling execution module is specifically used for: Call the sched_setattr system call to modify the task's scheduling policy and priority; By reading and writing the cpu.max and memory.high files in the cgroup v2 control group file system, the upper limit of CPU and memory resource usage quotas for tasks or task groups can be restricted.
10. The system according to claim 6, characterized in that, The feedback module includes a reward calculation unit that calculates the reward value R based on the following formula: R = k1 × (Δt_response / t_initial) + k2 × (Δu_resource / u_initial) - k3 × t_switch, where k1, k2, and k3 are weighting coefficients; t_initial is the response time of critical tasks before policy execution; u_initial is the resource utilization rate of the system before policy execution; Δt_response is the reduction in response time of critical tasks; Δu_resource is the improvement in system resource utilization; and t_switch is the policy switching time.
Citation Information
Cited By
EBPF-based high IO load adaptive scheduling method
CN121807505A
An eBPF-based high IO load adaptive scheduling method
CN121807505B
Task scheduling method, task scheduling system, electronic equipment, computer readable storage medium and computer program product
CN122019196A
A task scheduling method, a task scheduling system, an electronic device, a computer readable storage medium and a computer program product
CN122019196B