A computer scheduling method for multitasking operating environment states
By collecting multi-dimensional environmental state data, constructing an environmental state vector and matching it with scheduling strategies, comprehensively evaluating task characteristics, and generating an execution task queue, the adaptability and flexibility issues of traditional schedulers are solved, achieving efficient and reliable multi-task scheduling.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-26
- Publication Date
- 2026-04-07
AI Technical Summary
Traditional operating system task schedulers lack multi-dimensional environmental state awareness and proactive adaptation capabilities. Their scheduling strategies are poorly adapted to the actual environment, their task characteristics are considered in a one-sided manner, their scheduling flexibility is insufficient, they lack quantitative feedback mechanisms, and it is difficult to achieve iterative optimization of strategies.
Collect multi-dimensional environmental state data, construct an environmental state vector, use a policy decision library to match scheduling strategies, comprehensively evaluate task characteristic parameters, generate an execution task queue, and optimize the scheduling effect through user selective adjustment and feedback mechanisms.
It achieves precise adaptation to multi-tasking environments, improves system adaptation flexibility and scheduling efficiency, supports personalized optimization goals, forms a closed-loop feedback mechanism, and continuously improves the stability and reliability of scheduling performance.
Smart Images

Figure CN121433906B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer operating system, more particularly, the present application relates to a computer scheduling method for multi-task operating environment state. BACKGROUND
[0002] With the popularity of mobile computing, edge computing and high-performance portable devices, the running environment of modern computer systems presents high dynamicity and complexity. These devices not only need to allocate computing resources efficiently in a multi-task concurrent scenario, but also must respond and adapt to the dramatic changes in their physical and system environment state in real time.
[0003] The design core of the traditional operating system task scheduler focuses on time slice allocation of the processor (CPU), task preemption based on static or dynamic priority, and basic load balancing. Its decision basis is relatively single, and it lacks the ability to cooperatively perceive and actively adapt to the multi-dimensional environment state of the device. The specific manifestations are as follows:
[0004] First, the environmental perception ability is insufficient, and fixed scheduling strategies or single-dimensional environmental data-driven scheduling are mostly used. The multi-dimensional environment state is not comprehensively collected and accurately abstracted, resulting in poor adaptability of the scheduling strategy to the actual environment.
[0005] Second, the task feature is one-sided, focusing only on resource demand or execution time single dimension, without combining task priority, heat generation characteristics, completion rate and other multi-feature parameters for comprehensive evaluation, and the scheduling basis is relatively single.
[0006] Third, the scheduling flexibility is insufficient, and it is difficult to support users to select optimization goals (such as low resource consumption, low task delay, and low heat generation) according to actual needs, and lacks a quantitative feedback mechanism for scheduling effect, making it difficult to realize iterative optimization of the strategy.
[0007] Therefore, a computer scheduling method for multi-task operating environment state is proposed. SUMMARY
[0008] In order to overcome the above-mentioned defects of the prior art, embodiments of the present application provide a computer scheduling method for multi-task operating environment state.
[0009] In order to achieve the above-mentioned purpose, the present application provides the following technical scheme:
[0010] A computer scheduling method for multi-task operating environment state, comprising:
[0011] S1: Collecting the environment state data of the computer in multiple dimensions and constructing an environment state vector , and inputting a preset strategy decision library and outputting a scheduling strategy matched with the current environment state;
[0012] S2: For each task j in the ready queue, obtain its task feature parameter set ; After comprehensive analysis according to the computer state defined in the currently effective scheduling strategy, the execution task queue scheduled by the current computer is generated, and the execution order of each task is included in the queue;
[0013] S3: The user selectively determines the optimization target, updates the execution task queue after secondary adjustment according to the optimization target, and sequentially inputs execution from left to right according to the sorting results of all tasks;
[0014] S4: After the execution task queue is executed under the current computer state, the scheduling effect index is collected and comprehensively processed to obtain the scheduling performance coefficient as the feedback output.
[0015] Specifically, the S1 step of constructing the environment state vector;
[0016] The charging state, computer power, CPU temperature, network delay, network bandwidth and CPU usage are extracted from the environment state data;
[0017] A set of numbers is mapped for different charging states;
[0018] The computer power, CPU temperature, network delay, network bandwidth and CPU usage are normalized, and the normalized results and the mapping results of the charging state are used to construct the environment state vector .
[0019] Specifically, the S1 step outputs the scheduling strategy matching the current environment state;
[0020] The strategy decision library is composed of N cases, each case is a binary tuple (H_k, P_k), where H_k is the historical environment vector, and P_k is the scheduling strategy verified as optimal in the typical scene represented by the historical environment vector; The matching process includes:
[0021] According to the charging state in E(t), all cases in the strategy decision library with the same charging state as E(t) are selected to form a candidate case set;
[0022] For each case in the candidate case set, calculate the Euclidean distance between the remaining continuous dimensions of the current environment state vector E(t) and the corresponding dimensions of the case historical environment vector as the similarity;
[0023] Select the case with the smallest similarity, and take the corresponding scheduling strategy as the currently effective scheduling strategy.
[0024] Specifically, in step S2, during the process of generating the current computer's scheduled execution task queue, a preliminary execution task queue is first constructed.
[0025] Obtain the feature parameter set of task j This includes resource demand characteristics, time attribute characteristics, and constraint adaptation characteristics;
[0026] Based on the currently effective scheduling policy, determine the amount of resources that the computer can provide, including available CPU utilization, available memory, and available network bandwidth;
[0027] By combining the characteristics of resource demand with the weighted calculation logic of available resource utilization, the resource matching coefficient is output.
[0028] Tasks with resource compatibility coefficients lower than the preset compatibility threshold coefficient are selected to form a preliminary task queue.
[0029] Specifically, step S2 processes time attribute features after constructing the initial task queue;
[0030] Using formula Based on the task completion rate, output the revised task duration. Where x represents the task number in the task queue. The completion rate of the performance task; Indicates the baseline execution time;
[0031] Calculate the time difference between the task deadline and the current time, and output the remaining execution time of the task;
[0032] The urgency coefficient of the task is obtained by calculating the ratio between the correction time as the numerator and the remaining execution time as the denominator.
[0033] Specifically, after constructing the initial task queue, step S2 processes the constraint adaptation features;
[0034] The heat control threshold for the current computer state is determined based on the scheduling strategy; the available CPU utilization and available memory in the current computing state are used as the actual allocated utilization and actual allocated memory for subsequent task execution.
[0035] The actual allocation occupancy and actual allocated memory of the task are converted into CPU base heat generation and memory base heat generation through preset mapping rules.
[0036] The sum of the CPU's base heat generation and the memory's base heat generation is used as the estimated heat generated during the subsequent execution of the task;
[0037] Identify the priority of the task, i.e., high, medium, or low;
[0038] Set a set of heat production optimization coefficients corresponding to different priorities;
[0039] Using formula Calculate the constraint response coefficient ;in This indicates the estimated heat generation. Indicates the heat control threshold. This is the heat generation optimization coefficient.
[0040] Specifically, after constructing the initial task queue, step S2 determines the execution order of each task;
[0041] Extract the resource adaptation coefficient, urgency coefficient, and constraint response coefficient of each task in the task queue, and after comprehensive processing using weighted calculation logic, output the priority scheduling coefficient of each task.
[0042] Each task in the task queue is sorted from highest to lowest priority scheduling coefficient, and this sorting order is used as the execution order.
[0043] Specifically, after constructing the initial task queue, step S2 determines the execution order of each task;
[0044] Extract the resource adaptation coefficient, urgency coefficient, and constraint response coefficient of each task in the task queue, and after comprehensive processing using weighted calculation logic, output the priority scheduling coefficient of each task.
[0045] Each task in the task queue is sorted from highest to lowest priority scheduling coefficient, and this sorting order is used as the execution order.
[0046] Specifically, in step S4, scheduling performance indicators are collected, processed, and then the scheduling performance coefficient is obtained.
[0047] Scheduling performance metrics include the proportion of delayed tasks, the proportion of resources overdue, and the proportion of hot constraint violations;
[0048] The scheduling performance coefficient is output by using a weighted calculation logic to calculate the proportion of delayed tasks, the proportion of resource overruns, and the proportion of hot constraint violations obtained from the task queue.
[0049] The technical effects and advantages of this invention are as follows:
[0050] (1) Achieve precise adaptation between environment and scheduling strategy, greatly improve the system's adaptability. By collecting six-dimensional environmental data such as charging status and CPU temperature and constructing standardized vectors, combined with the Euclidean distance similarity matching logic of the strategy decision library, the scheduling strategy that best fits the current scenario can be quickly selected. Whether it is an ideal performance scenario with high charging load or an energy-saving scenario with low discharge power, the optimal strategy combination can be dynamically matched, solving the problem of poor adaptability between traditional fixed scheduling strategy and complex dynamic environment, and enabling efficient operation in different scenarios.
[0051] (2) Multi-dimensional task feature comprehensive evaluation, optimize the rationality of task execution sorting, comprehensively consider the three core features of task resource requirements, time attributes and constraint adaptation, and generate priority scheduling coefficients by quantitatively calculating resource adaptation coefficients, urgency coefficients and constraint response coefficients, and then combining weighted logic to ensure that high-urgency tasks are executed first to reduce delays, and avoid system overload or overheating through resource adaptation and thermal constraint control, while reserving reasonable heat generation space for high-priority tasks, so as to achieve a balance between task execution efficiency, resource utilization and hardware security.
[0052] (3) Support personalized optimization goals and closed-loop feedback to improve scheduling controllability and iteration capability. Users can choose optimization goals such as low resource consumption, low task delay or low heat generation according to their needs. The task order is adjusted twice through a dedicated weight set to meet diverse usage needs. After the task is executed, the scheduling performance coefficient is generated by statistically analyzing the proportion of delayed tasks, the proportion of resource overruns and the proportion of hot constraint violations. The closed-loop mechanism provides data support for strategy iteration and parameter optimization, and continuously improves the stability and reliability of scheduling effect. Attached Figure Description
[0053] Figure 1 This is a flowchart of a computer scheduling method for a multi-tasking operating environment state according to the present invention. Detailed Implementation
[0054] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0055] like Figure 1 As shown, a computer scheduling method for a multi-tasking operating environment is as follows:
[0056] Environmental Status Acquisition and Abstraction: Environmental status data across multiple dimensions is periodically collected via the operating system kernel interface and drivers. These dimensions include energy, thermal state, network, and load. The collected data from each dimension is then normalized and constructed into a unified environmental status vector. Where t represents time;
[0057] Extract charging status, computer battery level, CPU temperature, network latency, network bandwidth, and CPU utilization from the environmental status dimension;
[0058] Set a set of numbers to map different charging states, where the charging state includes charging or discharging;
[0059] The computer's power consumption, CPU temperature, network latency, network bandwidth, and CPU utilization are normalized using the formula... Normalization was performed, where For the original data of the i-th dimension, This is the minimum reasonable value for the i-th dimension (set according to the device scenario and can be dynamically updated). The maximum reasonable value for the i-th dimension;
[0060] Taking computer battery level as an example, if the current computer battery level is 62%, then the normalized parameter is (62-0) / (100-0)=0.62.
[0061] Construct an environment state vector by mapping the normalized result to the charging state. .
[0062] Environmental state analysis and policy matching: Input the environmental state vector into a preset policy decision library and output a scheduling policy that matches the current environmental state;
[0063] Strategy decision library structure: The library consists of N cases;
[0064] Each case is a pair of tuples: (H_k, P_k);
[0065] H_k: Historical environment vector, with the same structure as E(t), recording a "typical scenario";
[0066] P_k: The scheduling policy package that has been verified as the "most effective" in this typical scenario (containing specific scheduling parameters, such as CPU frequency policy, network usage policy, etc.).
[0067] Specifically:
[0068] The identifiers of each scheduling policy are searched in the policy decision base. Each scheduling policy contains a vector of the computer's historical environment.
[0069] After matching the environmental state vector with the historical environmental vector using similarity matching logic, the scheduling strategy that matches the current environmental state is output.
[0070] First, identify the charging status of the computers within each group of scheduling strategies and match it with the charging status in the current computer environment state vector. Then, retain the scheduling strategies that successfully match as the filtering strategies.
[0071] After removing the charging state, the distance between the remaining environmental state vector and the environmental vector of each group of screening strategies is calculated using Euclidean distance, and the similarity of each group of screening strategies is output.
[0072] The Euclidean distance formula is expressed as: similarity ;in This represents the environment vector of each group of screening strategy packages.
[0073] Based on the consistent charging status, a refined and quantitative similarity calculation is performed on the remaining multidimensional continuous environmental states (charge, temperature, network, load).
[0074] The screening strategy with the lowest similarity is selected as the current computer's scheduling strategy;
[0075] Examples of "typical scenarios" for different scheduling strategy packages are provided below:
[0076] (1) Ideal performance environment: The environmental vector level exhibited is (charging, high power, low temperature, low latency, high bandwidth, moderate load).
[0077] (2) Battery energy saving environment: The environmental vector level is (discharging, low power, moderate temperature, average network, light load).
[0078] (3) High temperature frequency limiting environment: The environmental vector degree is (charging, sufficient power but temperature close to the threshold, good network, heavy load).
[0079] For each scenario, a validated optimal strategy combination is assigned to the scheduling strategy package, which includes, but is not limited to, CPU frequency strategy, task scheduling, and network strategy.
[0080] Task feature and strategy fit evaluation: For each task j in the ready queue, obtain its task feature parameter set. After a comprehensive analysis of the computer status defined in the currently effective scheduling policy, a queue of execution tasks scheduled by the current computer is generated, which contains the execution order of each task.
[0081] Specifically:
[0082] Among them, the task feature parameter set It includes resource demand characteristics, time attribute characteristics, and constraint adaptation characteristics;
[0083] Resource demand characteristics include CPU utilization, memory usage, and network bandwidth usage;
[0084] Time-related attributes include baseline execution time, task deadline, and completion rate;
[0085] Constraint adaptation features include the task's priority and the estimated heat generation;
[0086] Extract available resources from the current computer state, including available CPU utilization, available memory, and available network bandwidth;
[0087] This refers to the available CPU utilization, available memory, and available network bandwidth after adjustments are made to the computer under the current scheduling policy.
[0088] For each task j, the resource matching coefficient is output by combining the resource demand characteristics with the weighted calculation logic of available resource utilization.
[0089] Resource adaptation coefficient calculation process:
[0090] Using formula Calculate the resource adaptation coefficient ;in , , These represent the CPU utilization, memory usage, and network bandwidth usage of the task, respectively. , , These represent the available CPU utilization, available memory, and available network bandwidth of the computer, respectively. The set weighting coefficients, The sum of them equals one.
[0091] The resource adaptability coefficient directly reflects the degree of matching between the resource requirements of the task and the resources that the current computer can provide. It also reflects the priority of resource allocation under the scheduling strategy and is a core indicator for quantifying the adaptability of the task to the current environment and strategy.
[0092] The resource adaptation coefficient of each task j is compared with the preset adaptation threshold coefficient, and tasks with an adaptation threshold coefficient lower than the current computer are selected as the currently schedulable tasks, and an execution task queue is constructed.
[0093] Extract the baseline execution time of each task in the task queue, which is the estimated execution time required by the computer under the current task resource requirements.
[0094] Using formula Based on the task completion rate, output the revised task duration. Where x represents the task number in the task queue. The completion rate of the performance task; Indicates the baseline execution time;
[0095] Calculate the time difference between the task deadline and the current time, and output the remaining execution time of the task;
[0096] The urgency coefficient of the task is obtained by calculating the ratio between the correction time as the numerator and the remaining execution time as the denominator.
[0097] The urgency coefficient (correction time / remaining execution time) intuitively reflects the matching degree between "time requirements" and "time window": the closer the coefficient is to 1, the greater the time pressure of the task.
[0098] Extract heat control thresholds from the current computer status; for example, high temperature frequency limiting mode ≤3W, performance mode ≤8W.
[0099] The available CPU utilization and available memory in the current computing state are used as the actual allocated utilization and actual allocated memory for the subsequent execution of the task;
[0100] By using pre-established conversion mapping rules between allocation utilization rate and CPU base heat generation and between allocated memory and memory base heat generation, the actual allocation utilization rate and actual allocated memory of a task are converted into CPU base heat generation and memory base heat generation.
[0101] The mapping rules are explained below. The computer status defined by the policy is obtained as follows: CPU is calculated according to the coefficient corresponding to the utilization rate (e.g., if the computer status is in performance mode, then 0.3W of heat is generated for every 10% utilization rate, and 0.2W for power saving mode), and memory is calculated according to the coefficient corresponding to the utilization amount (e.g., 0.1W of heat is generated for every GB of memory utilization, a fixed value).
[0102] Example: If the CPU utilization rate is 30%, then the basic heat generation of the CPU in performance mode is 30% × 0.3W / 10%=0.9W; if the memory allocation is 4GB, then the basic heat generation of the memory is 4GB × 0.1W / GB=0.4W.
[0103] The sum of the CPU's base heat generation and the memory's base heat generation is used as the estimated heat generated during the subsequent execution of the task;
[0104] Identify the priority of the task, i.e., high, medium, or low;
[0105] Set a set of heat production optimization coefficients corresponding to different priorities; the heat production optimization coefficient of high priority > the heat production optimization coefficient of medium priority > the heat production optimization coefficient of low priority, which can be set to 1.2 / 1.1 / 1.0 respectively;
[0106] Using formula Calculate the constraint response coefficient ;in This indicates the estimated heat generation. Indicates the heat control threshold. The heat production optimization coefficient;
[0107] The heat generation optimization coefficient is set according to the priority gradient (1.2 / 1.1 / 1.0), allowing high-priority tasks to obtain a reasonable "heat generation exemption space" - which allows them to moderately increase heat generation to ensure performance, while avoiding unlimited heat output through the upper limit of the coefficient (such as 1.2). Low-priority tasks are calculated according to the lowest coefficient (1.0) to prioritize meeting heat constraints and avoid low-value tasks occupying too much heat resources, thus realizing differentiated scheduling where "the higher the priority, the more reasonable the heat resource tilt".
[0108] Extract the resource adaptation coefficient, urgency coefficient, and constraint response coefficient of each task in the task queue, and after comprehensive processing using weighted calculation logic, output the priority scheduling coefficient of each task.
[0109] The specific calculation process of the priority scheduling coefficient:
[0110] After standardizing the resource adaptation coefficient, urgency coefficient, and constraint response coefficient, the formula is used. Calculate the priority scheduling coefficient D; where , , The weighting coefficients are set according to the environmental focus objectives in the scheduling strategy; Indicates the urgency coefficient; and This indicates the adaptation threshold coefficient and the preset constraint threshold coefficient;
[0111] The weights are set based on the environmental priority objectives in the scheduling strategy. An example of weighting is provided below:
[0112] Battery energy saving environment: =0.5, =0.3, =0.2, focusing on resource conservation and extending battery life;
[0113] High-temperature frequency limiting environment: =0.2, =0.3, =0.5, heat generation control is prioritized to avoid overheating;
[0114] Ideal performance environment: =0.3, =0.5, =0.2, ensuring timely completion of the task;
[0115] Network-restricted environments: =0.4, =0.4, =0.2 Balance resources and time.
[0116] A higher resource adaptation coefficient means that the resources required by the current task are close to the resources that the current computer can provide, and the scheduling priority should be reduced; a higher constraint response coefficient means that the heat generated by the current task is close to the limit that the current computer can receive, and the scheduling priority should be reduced.
[0117] Conversely, the higher the urgency coefficient, the sooner the task is due and needs to be prioritized for execution.
[0118] Each task in the task queue is sorted in descending order of priority scheduling coefficient, and this order is used as the execution order.
[0119] Dynamic scheduling decision based on adaptability: Based on the current execution task queue scheduled by the computer, the queue is sent to the user. The user selectively determines the optimization target, and the execution task queue is adjusted and updated based on the optimization target. The tasks are then executed sequentially from left to right according to the sorting results of all tasks.
[0120] Specifically:
[0121] The optimization objectives include low resource demand, reduced mission delays, and low heat production maintenance.
[0122] Different optimization objectives are set up with corresponding weight sets; the weight sets include weights for resource adaptation, urgency, and constraint response.
[0123] Extract the resource adaptation coefficient, urgency coefficient, and constraint response coefficient of each task in the task queue, and combine them with the weight set to output the priority scheduling coefficient using weighted calculation logic;
[0124] That is, using formulas Calculate the priority scheduling coefficient D; where , as well as These represent the weight coefficients of resource adaptation weight, urgency coefficient, and constraint response coefficient under different optimization objectives, respectively, where f is the number of the optimization objective, f=1,2 or3.
[0125] The priority scheduling coefficient at this time is used as the final arrangement basis for each task, and the task queue is reordered from largest to smallest to complete the second adjustment;
[0126] Task scheduling effect display and evaluation: After the task queue has completed its execution in the current computer state, the scheduling effect indicators are collected and processed to obtain the scheduling performance coefficient as feedback output, which is then sent to the user.
[0127] The scheduling effectiveness indicators include the proportion of delayed tasks, the proportion of resources overdue, and the proportion of hot constraint violations.
[0128] Specifically:
[0129] After each task in the task queue is completed, the percentage of delayed tasks (i.e., tasks whose completion time is later than their deadline) in the total number of tasks is calculated to obtain the delayed task ratio.
[0130] Extract the average CPU utilization, average memory consumption, and average network bandwidth consumption of each task during the completion process, and calculate the resource adaptation coefficient as the actual usage coefficient. Use the resource demand characteristics and the resource adaptation coefficient output by the available resources as the demand prediction coefficient.
[0131] The ratio is calculated as the resource surplus rate, with the actual usage coefficient as the numerator and the demand forecast coefficient as the denominator.
[0132] The number of tasks with a resource overrun rate higher than the preset reference rate is counted, and the percentage of these tasks in the total number of tasks is calculated to obtain the resource overrun ratio.
[0133] The task is identified as exceeding the thermal control threshold during execution. If it does, it is marked as a thermal violation task. The number of thermal violation tasks is counted and the proportion of thermal violation tasks in the total number of tasks is calculated to obtain the thermal constraint violation ratio.
[0134] The scheduling performance coefficient is output by using a weighted calculation logic to calculate the proportion of delayed tasks, the proportion of resource overruns, and the proportion of hot constraint violations obtained from the task queue.
[0135] The proportion of tasks to be delayed, the proportion of resources to be overdue, and the proportion of hot constraint violations are multiplied by the preset delay weight, resource weight, and hot constraint weight, respectively, and then summed to obtain the scheduling performance coefficient.
[0136] The above formulas are all dimensionless calculations. Dimensionless calculations can be performed using various methods such as standardization, which will not be elaborated here. The formulas are derived from software simulations based on a large amount of collected data, and the preset parameters in the formulas can be set by those skilled in the art according to the actual situation.
[0137] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more sets of available media. The available medium can be a magnetic medium (e.g., floppy disk, ATA hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium. The semiconductor medium can be a solid-state ATA hard disk.
[0138] It should be understood that in the various embodiments of this application, the order of the above-mentioned processes does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0139] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0140] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0141] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.
[0142] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0143] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable ATA hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0144] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A computer scheduling method for a multi-tasking operating environment, characterized in that, include: S1: Collect environmental state data from multiple dimensions of the computer and construct an environmental state vector. ,Will Input a pre-set policy decision library and output a scheduling policy that matches the current environment state; These represent the charging status, computer battery level, CPU temperature, network latency, network bandwidth, and CPU utilization in the environmental status data, respectively. S2: For each task j in the ready queue, obtain its task feature parameter set. After a comprehensive analysis of the computer status defined in the currently effective scheduling policy, a queue of execution tasks scheduled by the current computer is generated, which contains the execution order of each task. Obtain the feature parameter set of task j This includes resource demand characteristics, time attribute characteristics, and constraint adaptation characteristics; Based on the currently effective scheduling policy, determine the amount of resources that the computer can provide, including available CPU utilization, available memory, and available network bandwidth; combine the resource demand characteristics with the weighted calculation logic of available resource utilization to output the resource adaptation coefficient; and select tasks with resource adaptation coefficients lower than the preset adaptation threshold coefficient to form a preliminary execution task queue. After constructing the initial task queue, the time attribute features are processed; Using formula Based on the task completion rate, output the revised task duration. Where x represents the task number in the task queue. The completion rate of the performance task; This indicates the baseline execution time; the time difference between the task deadline and the current time is calculated, and the remaining execution time of the task is output; the ratio of the adjusted time as the numerator and the remaining execution time as the denominator is used to calculate the urgency coefficient of the task; After constructing the initial task queue, constraint adaptation features are processed; The heat control threshold for the current computer state is determined based on the scheduling strategy; The available CPU utilization and available memory in the current computing state are used as the actual allocated utilization and actual allocated memory for the subsequent execution of the task; the actual allocated utilization and actual allocated memory of the task are converted into the basic CPU heat generation and basic memory heat generation through preset mapping rules; The sum of the CPU's base heat generation and the memory's base heat generation is used as the estimated heat generated during the subsequent execution of the task; the priority of the task is identified, namely high, medium, and low; and a set of heat generation optimization coefficients are set for each priority level. Using formula Calculate the constraint response coefficient ;in This indicates the estimated heat generation. Indicates the heat control threshold. The heat production optimization coefficient; Extract the resource adaptation coefficient, urgency coefficient, and constraint response coefficient of each task in the task queue, and after comprehensive processing using weighted calculation logic, output the priority scheduling coefficient of each task. Each task in the task queue is sorted in descending order of priority scheduling coefficient, and this order is used as the execution order. S3: The user selectively determines the optimization goal, and then updates the task queue after a second adjustment based on the optimization goal. The tasks are then executed sequentially from left to right according to the sorting results of all tasks. S4: After the task queue has been completed in the current computer state, collect scheduling performance indicators and perform comprehensive processing to obtain the scheduling performance coefficient as feedback output.
2. The computer scheduling method for a multi-tasking operating environment state according to claim 1, characterized in that: S1 step: Construction of the environment state vector; Extract charging status, computer battery level, CPU temperature, network latency, network bandwidth, and CPU utilization from environmental status data; Set a set of numbers to represent different charging states; The computer's battery level, CPU temperature, network latency, network bandwidth, and CPU utilization are normalized. An environmental state vector is constructed based on the mapping between the normalized results and the charging status. .
3. The computer scheduling method for a multi-tasking operating environment state according to claim 1, characterized in that: Step S1 outputs a scheduling strategy that matches the current environment state; The strategy decision base consists of N cases, each case being a tuple (H_k, P_k), where H_k is the historical environment vector, and P_k is the scheduling strategy validated as optimal in the typical scenario represented by that historical environment vector; the matching process includes: Based on the charging state in E(t), all cases in the strategy decision base whose charging state is consistent with E(t) are selected to form a candidate case set; For each case in the candidate case set, the Euclidean distance between the remaining continuous dimension of the current environment state vector E(t) and the corresponding dimension of the historical environment vector of the case is calculated as the similarity. Select the case with the lowest similarity and use its corresponding scheduling policy as the current effective scheduling policy.
4. The computer scheduling method for a multi-tasking operating environment state according to claim 1, characterized in that: Step S3 performs a secondary adjustment to the task queue based on the optimization objective; The optimization objectives include low resource demand, reduced mission delays, and low heat production maintenance. Different optimization objectives are set up with corresponding weight sets; the weight sets include weights for resource adaptation, urgency, and constraint response. Extract the resource adaptation coefficient, urgency coefficient, and constraint response coefficient of each task in the task queue, and combine them with the weight set to output the priority scheduling coefficient using weighted calculation logic; The priority scheduling coefficient at this time is used as the final arrangement basis for each task, and the task queue is reordered from largest to smallest to complete the second adjustment.
5. The computer scheduling method for a multi-tasking operating environment state according to claim 1, characterized in that: In step S4, the scheduling performance index is collected and processed to obtain the scheduling performance coefficient. Scheduling performance metrics include the proportion of delayed tasks, the proportion of resources overdue, and the proportion of hot constraint violations; The scheduling performance coefficient is output by using a weighted calculation logic to calculate the proportion of delayed tasks, the proportion of resource overruns, and the proportion of hot constraint violations obtained from the task queue.
Citation Information
Patent Citations
Dynamic scheduling method for GPU resources in cloud environment
CN120104357A
Task scheduling optimization method and device based on reinforcement learning, equipment and medium
CN120780432A