A priority preemptive scheduling method and system
By introducing priority preemption scheduling methods and systems into the communication network, detecting and responding to northbound tasks, the problem that traditional systems cannot effectively schedule northbound and southbound tasks is solved, real-time response of tasks and efficient utilization of resources are achieved.
Patent Information
- Application Number
- CN202411770688.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-04-08
AI Technical Summary
When facing a large number of northbound and southbound tasks, the traditional client/server model cannot effectively distinguish and schedule traffic for two types of tasks, resulting in huge pressure on the server and cannot meet the real-time and computing resource requirements of different tasks.
A priority preemption scheduling method and system is proposed. By detecting northbound tasks in the priority queue in the southbound module, saving the processing progress of the southbound tasks, and initiating a preemption request to the resource scheduler, ensuring that northbound tasks are assigned priority resources.
Real-time response of northbound tasks and timeliness of key services are achieved, while avoiding duplicate processing of southbound tasks, taking into account the execution efficiency and traffic continuity of southbound tasks, and optimizing network communication efficiency and resource allocation.
Smart Images

Figure CN119781963A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of application systems, and in particular to a priority preemptive scheduling method and system. Background Art
[0002] With the development of technologies such as 5G and the Internet of Things, the number of terminal devices has increased dramatically, and northbound tasks (northbound instructions) and southbound tasks (southbound reconciliation tasks) have increased exponentially, causing the traditional client / server model to face the problem of huge server pressure. Northbound tasks refer to tasks that receive requests and send data, and southbound tasks refer to tasks that process services and return responses. Northbound tasks and southbound tasks have different requirements for real-time, network quality, and different degrees of dependence on computing resources, but traditional networks cannot distinguish the scheduling of traffic for the two types of tasks and cannot meet different needs.
[0003] Since the delivery of northbound and southbound tasks (north-south messages) in the communication network needs to go through a complex dependency relationship between the northbound and southbound tasks, the completion of the southbound task will trigger the delivery of a new northbound task, and the two are intertwined. Therefore, how to coordinate the execution of northbound and southbound tasks with a large number of southbound and northbound tasks of different priorities in the communication network is a technical problem that needs to be solved urgently. Summary of the invention In view of the above problems, an embodiment of the present application provides a priority preemptive scheduling method and system to overcome the above problems or at least partially solve the above problems.
[0004] In a first aspect of an embodiment of the present application, a priority preemptive scheduling method is disclosed, which is applied to a southbound module. The method includes: In the process of executing the southbound task, detecting whether there is a northbound task in the priority queue, wherein the southbound task represents a task of processing business and returning a response, and the northbound task represents a task of receiving a request and sending data; In the case where there is a northbound task in the priority queue, saving the processing progress of the southbound task, and initiating a preemption request to the resource scheduler, so that the resource scheduler allocates resources to the northbound task to execute the northbound task according to the received preemption request; A message indicating that the northbound task has been completed is received, and the southbound task continues to be executed according to the processing progress.
[0005] Optionally, when there is a northbound task in the priority queue, saving the processing progress of the southbound task and initiating a preemption request to the resource scheduler includes: Determine whether the priority of the northbound task is higher than the priority of the southbound task, the priority of the northbound task and the priority of the southbound task are adjusted by the resource scheduler according to the number of preemptions within a preset time period; In the case where the priority of the northbound task is higher than the priority of the southbound task, the processing progress of the southbound task is saved, and a preemption request is initiated to the resource scheduler.
[0006] Optionally, the priority queue includes a first priority queue, a second priority queue, and a third priority queue; in the process of executing the southbound task, detecting whether there is a northbound task in the priority queue includes: In the process of executing the southbound task, respectively detecting whether there is a northbound task of the first priority in the first priority queue, whether there is a northbound task of the second priority in the second priority queue, and whether there is a northbound task of the third priority in the third priority queue; Among them, the northbound tasks of the first priority represent fault instructions for redundancy and backup, the northbound tasks of the second priority represent emergency instructions for serious service quality issues, and the northbound tasks of the third priority represent regular service instructions.
[0007] Optionally, the method further comprises: Acquire target resources, where the target resources are pre-allocated by the resource scheduler according to the network load and the priority of each southbound task, and the target resources represent resources allocated to different southbound tasks in different time periods; According to the target resources, a corresponding southbound task is executed.
[0008] A second aspect of the embodiments of the present application discloses a priority preemptive scheduling method, which is applied to a resource scheduler. The method includes: Receive a preemption request, where the preemption request is sent by the southbound module when detecting whether there is a northbound task in the priority queue, where the southbound task represents a task of processing business and returning a response, and the northbound task represents a task of receiving a request and sending data; According to the received preemption request, resources are allocated to the northbound task so that the northbound module executes the northbound task.
[0009] Optionally, the method further comprises: Counting the number of preemptions within a preset time period, where the number of preemptions within the preset time period is equal to the number of preemption requests received within the preset time period; When the number of preemption times within the preset time period is greater than the first target threshold, lowering the priority of the northbound task and / or increasing the priority of the southbound task; When the number of preemptions within the preset time period is less than a second target threshold, the priority of the northbound task is increased and / or the priority of the southbound task is decreased, and the second target threshold is greater than the first target threshold.
[0010] Optionally, the method further comprises: According to the network load and the priority of each southbound task, target resources are allocated to each southbound task so that the southbound module executes the corresponding southbound task according to the target resources, and the target resources represent the resources allocated to different southbound tasks in different time periods.
[0011] A third aspect of the embodiments of the present application discloses a priority preemptive scheduling method, which is applied to a northbound module. The method includes: Obtain a northbound task and put the northbound task into a priority queue, wherein the northbound task represents a task of receiving a request and sending data; Execute the northbound task according to the resources allocated by the resource scheduler; A message indicating that the northbound task has been executed is sent to the southbound module so that the southbound module continues to execute the southbound task according to the processing progress. The processing progress is saved when the southbound module detects the existence of the northbound task in the priority queue. The southbound task represents the task of processing business and returning a response.
[0012] Optionally, place northbound tasks into a priority queue, including: Determine the category of northbound tasks, the categories of northbound tasks include: first-priority northbound tasks, second-priority northbound tasks, and third-priority northbound tasks, the first-priority northbound tasks represent fault instructions for redundancy and backup, the second-priority northbound tasks represent emergency instructions for serious service quality issues, and the third-priority northbound tasks represent regular service instructions; According to the category of the northbound task, the northbound task is put into a corresponding priority queue, and the priority queue includes a first priority queue, a second priority queue and a third priority queue.
[0013] In a fourth aspect of the embodiments of the present application, a priority preemptive scheduling system is disclosed, the system comprising: The southbound module is used to detect whether there is a northbound task in the priority queue during the execution of the southbound task, wherein the southbound task represents the task of processing business and returning response, and the northbound task represents the task of receiving request and sending data; and, if there is a northbound task in the priority queue, save the processing progress of the southbound task and initiate a preemption request to the resource scheduler; receive a message that the northbound task has been executed, and continue to execute the southbound task according to the processing progress; A resource scheduler, configured to receive a preemption request and allocate resources to the northbound task according to the received preemption request; The northbound module is used to obtain northbound tasks and put the northbound tasks into a priority queue; execute the northbound tasks according to the resources allocated by the resource scheduler; and send a message to the southbound module indicating that the northbound tasks have been executed.
[0014] In the fifth aspect of the embodiments of the present application, an electronic device is disclosed, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the priority preemptive scheduling method described in the first aspect of the embodiments of the present application, or the steps of the priority preemptive scheduling method described in the second aspect of the embodiments of the present application, or the steps of the priority preemptive scheduling method described in the third aspect of the embodiments of the present application are implemented.
[0015] In the sixth aspect of the embodiments of the present application, a computer-readable storage medium is disclosed, on which a computer program is stored. When the computer program is executed by a processor, the steps of the priority preemptive scheduling method described in the first aspect of the embodiments of the present application, or the steps of the priority preemptive scheduling method described in the second aspect of the embodiments of the present application, or the steps of the priority preemptive scheduling method described in the third aspect of the embodiments of the present application are implemented.
[0016] In the seventh aspect of the embodiments of the present application, a computer program product is disclosed, including a computer program, which, when executed by a processor, implements the steps of the priority preemptive scheduling method described in the first aspect of the embodiments of the present application, or the steps of the priority preemptive scheduling method described in the second aspect of the embodiments of the present application, or the steps of the priority preemptive scheduling method described in the third aspect of the embodiments of the present application.
[0017] The embodiments of the present application include the following advantages: In an embodiment of the present application, during the execution of a southbound task, it is detected whether there is a northbound task in the priority queue, the southbound task represents a task for processing business and returning a response, and the northbound task represents a task for receiving requests and sending data; when there is a northbound task in the priority queue, the processing progress of the southbound task is saved, and a preemption request is initiated to a resource scheduler so that the resource scheduler allocates resources to the northbound module to execute the northbound task; a message indicating that the northbound task has been executed is received, and the southbound task continues to be executed according to the processing progress.
[0018] In this way, the southbound module automatically identifies the northbound task and actively initiates a preemption request to achieve real-time response of the northbound task and ensure the timeliness of key services; moreover, after the southbound task is preempted, it can actively save the processing progress, and then when the northbound task is completed, it can quickly resume the execution of the southbound task based on the processing progress, avoiding repeated processing of the southbound task, and taking into account the execution efficiency of the southbound task and the continuity of the southbound task traffic. Therefore, this method optimizes the throughput of the southbound task while ensuring the real-time performance of the northbound task through flexible resource scheduling, and ultimately achieves the purpose of improving network communication efficiency and optimizing resource allocation and use. This method can be widely used in traffic scheduling and coordination scenarios in communication networks and has important practical value. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0020] Figure 1 It is a flowchart of a priority preemptive scheduling method applied to a southbound module provided in an embodiment of the present application; Figure 2 It is a flowchart of the steps of a priority preemptive scheduling method applied to a resource scheduler provided in an embodiment of the present application; Figure 3 It is a flowchart of the steps of a priority preemptive scheduling method applied to a northbound module provided in an embodiment of the present application; Figure 4 It is a flowchart of the overall steps of a priority preemptive scheduling method provided by an embodiment of the present application; Figure 5 It is a flow chart of an implementation of a priority preemptive scheduling method provided in an embodiment of the present application; Figure 6 It is an architecture diagram of different modules of a priority preemptive scheduling method provided in an embodiment of the present application; Figure 7 It is a structural diagram of a priority preemptive scheduling system provided in an embodiment of the present application; Figure 8 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0021] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and understandable, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0022] In order to better understand the technical solution of the present application, the technical concepts involved in the present application are first explained.
[0023] Priority Preemptive Scheduling: A real-time scheduling method implemented according to task priority. High-priority tasks can interrupt the execution of low-priority tasks.
[0024] State Reservation: Save the current state of a task before it is preempted so that it can quickly return to the original execution point after resumption.
[0025] North-South Task: includes northbound tasks and southbound tasks, wherein northbound tasks refer to tasks of receiving requests and sending data. The northbound instructions and northbound messages mentioned in the embodiments of the present application refer to northbound tasks; southbound tasks refer to tasks of processing business and returning responses. The southbound messages, southbound reconciliation, and southbound reconciliation tasks mentioned in the embodiments of the present application all refer to southbound tasks.
[0026] Preemption: A mechanism in which a high-priority task interrupts a low-priority task and obtains processing resources.
[0027] Reconciliation: The process of matching and verifying data in two systems to detect and correct errors.
[0028] Polling: A mechanism for periodically checking status to discover events or data.
[0029] Dynamic Scheduling: A scheduling method that continuously optimizes task scheduling strategies and resource allocation based on real-time conditions.
[0030] With the development of technologies such as 5G and the Internet of Things, the number of terminal devices has increased dramatically, and northbound and southbound tasks have grown exponentially, resulting in the traditional client / server model facing the problem of huge server pressure. Northbound and southbound tasks have different requirements for real-time, network quality, and different degrees of dependence on computing resources. Specifically, northbound tasks have strong real-time requirements and require microsecond response time, otherwise they will cause terminal status errors and cause business interruptions; while southbound tasks are offline batch tasks and allow a certain delay. In addition, northbound tasks have extremely high requirements for network quality and need to ensure an extremely low packet loss rate; but southbound tasks have high requirements for bandwidth, but traditional networks cannot distinguish the scheduling of traffic for the two types of tasks and cannot meet different needs. In addition, northbound tasks have a high dependence on computing resources and have a mutually exclusive relationship, while southbound tasks can be executed in parallel. The resource competition of heterogeneous tasks further exacerbates the scheduling problem.
[0031] Since the delivery of northbound and southbound tasks (north-south messages) in the communication network needs to go through the complex dependency relationship between northbound and southbound tasks, the completion of southbound tasks will trigger the delivery of new northbound tasks, and the two are intertwined. How to coordinate the execution of northbound and southbound tasks has become a bottleneck in system performance. Real-time scheduling algorithms and distributed computing technologies provide support for building intelligent scheduling systems that adapt to complex networks and tasks. Specifically: 1) In traditional systems, northbound and southbound services are highly coupled and lack isolation, so decoupling improves flexibility; 2) Using virtualization and containers to isolate and manage tasks, it is convenient for the scheduler to dynamically allocate resources; 3) Tasks can save their states and recover quickly, supporting preemptive scheduling, thereby improving resource utilization efficiency; 4) Messages are queued according to priority, and high-priority messages are scheduled first to ensure critical task response; 5) The scheduler can use AI (artificial intelligence) and big data technologies to analyze real-time data and make intelligent decisions; 6) Such as Zookeeper are used for task coordination to ensure system consistency.
[0032] Therefore, how to dynamically adjust resource allocation and optimize southbound reconciliation throughput while ensuring the real-time performance of northbound tasks is a core problem that needs to be solved urgently. In order to overcome the limitations of related technologies, the embodiment of the present application provides a priority preemptive scheduling method for northbound dispatching and southbound reconciliation, so as to dynamically adjust resource allocation and optimize southbound reconciliation throughput while ensuring the real-time performance of northbound tasks, thereby solving the resource scheduling and coordination problems when there are a large number of tasks of different priorities in the communication network.
[0033] The priority preemptive scheduling method provided in the embodiment of the present application can meet the following objectives: 1) It can automatically identify the high-priority northbound tasks issued and respond in real time; 2) When a high-priority northbound task arrives, the southbound task can actively release resources and perform preemptive operations; 3) After the southbound task is preempted, the state can be saved and execution can be continued from the interruption point to avoid repeated calculations; 4) When the high-priority northbound task is executed, the southbound task can be quickly restored; 5) The scheduling strategy prevents high-priority northbound tasks from occupying resources for a long time and ensures the progress of southbound reconciliation.
[0034] The priority preemptive scheduling method provided in the embodiment of the present application is described in detail below in conjunction with the accompanying drawings.
[0035] Reference Figure 1 As shown, Figure 1 1 is a flowchart of a priority preemptive scheduling method for a southbound module provided in an embodiment of the present application. Figure 1 As shown, the priority preemptive scheduling method may include steps S110 to S130: Step S110: During the execution of the southbound task, it is detected whether there is a northbound task in the priority queue, wherein the southbound task represents a task of processing business and returning a response, and the northbound task represents a task of receiving a request and sending data.
[0036] Step S120: When there is a northbound task in the priority queue, save the processing progress of the southbound task and initiate a preemption request to the resource scheduler, so that the resource scheduler allocates resources to the northbound task to execute the northbound task according to the received preemption request.
[0037] Step S130: receiving a message indicating that the northbound task has been completed, and continuing to execute the southbound task according to the processing progress.
[0038] In an embodiment of the present application, different priorities are set for northbound tasks and southbound tasks. Since northbound tasks have strong real-time requirements, northbound tasks are set to high priority and southbound tasks are set to low priority. In some embodiments, the priorities of southbound tasks and northbound tasks can be identified by adding a priority code to the message header part of the task message.
[0039] The higher the priority of a task, the higher the processing weight it gets, that is, the higher priority tasks are processed first. The southbound task is set to the best priority by default, and the northbound module places the northbound task in the priority queue. When the southbound module is executing the southbound task, it actively identifies the high-priority northbound task by detecting whether there is a northbound task in the priority queue; when it is detected that there is a northbound task in the priority queue, the northbound task is executed first, and the southbound task actively initiates a preemption request to the resource scheduler, so that the resource scheduler allocates resources to the northbound task according to the received preemption request.
[0040] In some embodiments, during the execution of the southbound task, detecting whether there is a northbound task in the priority queue can be implemented through a priority polling module; specifically, during the execution of the southbound task, the southbound module queries whether there is a northbound task in the priority queue at a preset time interval (e.g., 50 milliseconds) through the priority polling module to automatically identify high-priority northbound tasks. Once the query detects that there is a northbound task in the priority queue, the southbound module actively initiates a preemption request to the resource scheduler.
[0041] In addition, in order to ensure the processing progress of the southbound task, the southbound module saves the processing progress of the southbound task (i.e., state reservation) before initiating a preemption request to the resource scheduler, that is, saves the context and state of the southbound task. After the northbound task is executed, the processing progress of the southbound task can be loaded and the southbound task can be continued according to the processing progress, thereby improving the recovery efficiency of the southbound task. In some application scenarios, the recovery process of the southbound task is less than 10 milliseconds.
[0042] In some embodiments, in order to accurately ensure the processing progress of the southbound task, the southbound task is structured into multiple subtasks, and the multiple subtasks are executed in parallel, and each subtask represents the reconciliation task of different resource modules (each subtask processes a batch of messages). Specifically, when there is a northbound task in the priority queue, the processing progress of the southbound task is saved, including: stopping the processing of each subtask, and saving the processing progress of each subtask respectively. After receiving the message that the northbound task has been executed, the southbound module loads the processing progress of each subtask respectively, and continues to execute each subtask according to the processing progress of each subtask.
[0043] By adopting the technical solution of the embodiment of the present application, the southbound module automatically identifies the northbound task and actively initiates a preemption request to achieve real-time response of the northbound task and ensure the timeliness of key services; and, after the southbound task is preempted, it can actively save the processing progress, and then when the northbound task is completed, it can quickly resume the execution of the southbound task based on the processing progress, avoiding repeated processing of the southbound task, and taking into account the execution efficiency of the southbound task and the continuity of the southbound task traffic. Therefore, this method optimizes the throughput of the southbound task while ensuring the real-time performance of the northbound task through flexible resource scheduling, and ultimately achieves the purpose of improving network communication efficiency and optimizing resource allocation and use. This method can be widely used in traffic scheduling and coordination scenarios in communication networks, and has important practical value.
[0044] In combination with the above embodiments, in one implementation, the embodiment of the present application further provides a priority preemptive scheduling method. In this method, the priority queue includes a first priority queue, a second priority queue, and a third priority queue, and the above step S110 "in the process of executing the southbound task, detecting whether there is a northbound task in the priority queue" may specifically include: In the process of executing the southbound task, respectively detecting whether there is a northbound task of the first priority in the first priority queue, whether there is a northbound task of the second priority in the second priority queue, and whether there is a northbound task of the third priority in the third priority queue; Among them, the northbound tasks of the first priority represent fault instructions for redundancy and backup, the northbound tasks of the second priority represent emergency instructions for serious service quality issues, and the northbound tasks of the third priority represent regular service instructions.
[0045] In the embodiment of the present application, northbound tasks can be divided into northbound tasks of the first priority, northbound tasks of the second priority, and northbound tasks of the third priority. The priority of the northbound task is determined according to the task type, and the northbound module places northbound tasks of different priorities in different priority queues. Among them, the processing weights of the first priority, the second priority, and the third priority are from high to low: first priority, second priority, and third priority.
[0046] The southbound module detects whether there is a northbound task in different priority queues (i.e., the first priority queue, the second priority queue, and the third priority queue). If a northbound task is detected in any priority queue, the processing progress of the southbound task is saved, and a preemption request is initiated to the resource scheduler so that the resource scheduler allocates resources to the northbound module to execute the northbound task.
[0047] Furthermore, when northbound tasks are detected in multiple priority queues, a preemption request is initiated for a northbound task with a higher priority. For example, if northbound tasks are detected in the first priority queue and the second priority queue, a preemption request is initiated for the northbound task in the first priority queue, so that the resource scheduler allocates resources to the northbound module and executes the northbound task in the first priority queue first.
[0048] By adopting the technical solution of the embodiment of the present application, by detecting whether there are northbound tasks in queues of different priorities, the southbound module can initiate preemption requests for northbound tasks of different priorities, so as to flexibly schedule resources to execute northbound tasks of different priorities, thereby ensuring that northbound tasks with higher priorities are executed first, thereby ensuring the timeliness of key services.
[0049] In combination with the above embodiments, in one implementation, the embodiment of the present application further provides a priority preemptive scheduling method. In this method, in the above step S120, "when there is a northbound task in the priority queue, save the processing progress of the southbound task and initiate a preemption request to the resource scheduler", specifically includes the following steps S120-1 to S120-2: Step S120 - 1 : Determine whether the priority of the northbound task is higher than the priority of the southbound task, the priority of the northbound task and the priority of the southbound task are adjusted by the resource scheduler according to the number of preemptions within a preset time period.
[0050] Step S120 - 2 : When the priority of the northbound task is higher than the priority of the southbound task, save the processing progress of the southbound task and initiate a preemption request to the resource scheduler.
[0051] In an embodiment of the present application, in order to prevent excessive preemption times from affecting the reconciliation progress of southbound tasks, the resource scheduler adjusts the priority of northbound tasks and the priority of southbound tasks according to the number of preemption times within a preset time period to achieve a dynamic balance in the processing efficiency of northbound tasks and southbound tasks.
[0052] Since the priorities of northbound tasks and southbound tasks are adjusted dynamically, the priority of southbound tasks may be higher than that of northbound tasks. When the southbound module detects a northbound task in the priority queue, it needs to determine whether the priority of the northbound task is higher than that of the southbound task. A preemption request is initiated only when the priority of the northbound task is higher than that of the southbound task. If the priority of the northbound task is not higher than that of the southbound task, the current southbound task continues to be executed without initiating a preemption request, thereby ensuring the reconciliation progress of the southbound task.
[0053] By adopting the technical solution of the embodiment of the present application, the southbound module automatically identifies northbound tasks with higher priority than the currently executed southbound tasks, and can ensure the reconciliation progress of southbound tasks while ensuring the real-time response of northbound tasks, thereby achieving a dynamic balance in the processing efficiency of northbound tasks and southbound tasks.
[0054] In combination with the above embodiments, in one implementation, the present application embodiment further provides a priority preemptive scheduling method. In this method, in addition to the above steps, the following steps A1 to A2 are also included: Step A1: Obtain target resources, where the target resources are pre-allocated by the resource scheduler according to network load conditions and the priorities of each southbound task, and the target resources represent resources allocated to different southbound tasks in different time periods.
[0055] Step A2: Execute the corresponding southbound task according to the target resource.
[0056] In the embodiment of the present application, the resource scheduler uses a predictive resource allocation method to allocate target resources for southbound tasks in advance in combination with the network load status. Specifically, the idle time period and busy time period of the network are known according to the network load status, and different southbound tasks are determined to be executed in different time periods according to the priority of each southbound task, and resources are allocated to the corresponding southbound tasks in this time period, and then the southbound module executes the corresponding southbound tasks according to the allocated target resources in different time periods.
[0057] By adopting the technical solution of the embodiment of the present application, target resources are reasonably allocated to different southbound tasks according to the network load conditions and the priority of the southbound tasks, thereby avoiding different southbound tasks from preempting resources and ensuring that each southbound task can be executed smoothly, thereby achieving the purpose of improving network communication efficiency and optimizing resource allocation and utilization.
[0058] Reference Figure 2 As shown, Figure 2 1 is a flowchart of a priority preemptive scheduling method applied to a resource scheduler provided in an embodiment of the present application. Figure 2 As shown, the priority preemptive scheduling method may include steps S210 to S220: Step S210: receiving a preemption request, wherein the preemption request is sent by the southbound module when detecting whether there is a northbound task in the priority queue. The southbound task represents a task of processing business and returning a response, and the northbound task represents a task of receiving a request and sending data.
[0059] Step S220: Allocate resources to the northbound task according to the received preemption request, so that the northbound module executes the northbound task.
[0060] In an embodiment of the present application, when the southbound module is executing a southbound task, it actively identifies a high-priority northbound task by detecting whether there is a northbound task in the priority queue; when it is detected that there is a northbound task in the priority queue, the northbound task is executed first, and the southbound task actively initiates a preemption request to the resource scheduler. After the resource scheduler receives the preemption request, it allocates more resources to the northbound task to execute the northbound task.
[0061] In this way, the resource scheduler can flexibly schedule resources according to preemption requests, ensuring that northbound tasks can respond in real time, while taking into account the execution efficiency of southbound tasks and the continuity of southbound task traffic, thereby achieving the purpose of improving network communication efficiency and optimizing resource allocation and utilization.
[0062] In combination with the above embodiments, in one implementation, the present application embodiment further provides a priority preemptive scheduling method. In this method, in addition to the above steps, the following steps B1 to B3 are also included: Step B1: Counting the number of preemptions within a preset time period, where the number of preemptions within the preset time period is equal to the number of preemption requests received within the preset time period.
[0063] Step B2: When the number of preemption times within the preset time period is greater than the first target threshold, lower the priority of the northbound task and / or increase the priority of the southbound task.
[0064] Step B3: When the number of preemptions within the preset time period is less than a second target threshold, increase the priority of the northbound task and / or reduce the priority of the southbound task, and the second target threshold is greater than the first target threshold.
[0065] In an embodiment of the present application, in order to prevent excessive preemption times from affecting the reconciliation progress of southbound tasks, the resource scheduler adjusts the priority of northbound tasks and the priority of southbound tasks according to the number of preemption times within a preset time period to achieve a dynamic balance in the processing efficiency of northbound tasks and southbound tasks.
[0066] Among them, the first target threshold and the second target threshold are flexibly set according to actual conditions; if the number of preemptions within the preset time period is greater than the first target threshold, it means that the number of preemptions is too many, which may affect the reconciliation progress of the southbound task. Therefore, the resource scheduler can automatically lower the priority of the northbound task and / or increase the priority of the southbound task so that the southbound task cannot be preempted frequently.
[0067] If the number of preemptions within the preset time period is less than the second target threshold, it means that some northbound tasks may not be processed in time. Therefore, the resource scheduler can automatically increase the priority of northbound tasks and / or lower the priority of southbound tasks so that northbound tasks can be executed.
[0068] Since the priority of the northbound task and the priority of the southbound task are dynamically adjusted, the priority of the southbound task may be higher than that of the northbound task. When the southbound module detects the northbound task in the priority queue, it needs to determine whether the priority of the northbound task is higher than that of the southbound task. Only when the priority of the northbound task is higher than that of the southbound task will a preemption request be initiated; when the priority of the northbound task is not higher than that of the southbound task, the current southbound task will continue to be executed and no preemption request will be initiated, thereby achieving a dynamic balance in the processing efficiency of northbound tasks and southbound tasks.
[0069] By adopting the technical solution of the embodiment of the present application, the resource scheduler flexibly adjusts the priorities of southbound tasks and northbound tasks to achieve flexible adjustment of the scheduling strategy, and then the southbound module automatically identifies northbound tasks with higher priorities than the currently executed southbound tasks, and can ensure the reconciliation progress of southbound tasks while ensuring the real-time response of northbound tasks, thereby achieving a dynamic balance in the processing efficiency of northbound tasks and southbound tasks.
[0070] In combination with the above embodiments, in one implementation, the present application embodiment further provides a priority preemptive scheduling method. In this method, in addition to the above steps, the following steps are also included: According to the network load and the priority of each southbound task, target resources are allocated to each southbound task so that the southbound module executes the corresponding southbound task according to the target resources, and the target resources represent the resources allocated to different southbound tasks in different time periods.
[0071] In the embodiment of the present application, the resource scheduler uses a predictive resource allocation method to allocate target resources for southbound tasks in advance in combination with the network load status. Specifically, the idle time period and busy time period of the network are known according to the network load status, and different southbound tasks are determined to be executed in different time periods according to the priority of each southbound task, and resources are allocated to the corresponding southbound tasks in this time period, and then the southbound module executes the corresponding southbound tasks according to the allocated target resources in different time periods.
[0072] For example, for southbound tasks 1, 2, and 3, the network load conditions and the priorities of the three southbound tasks can be used to allocate target resources to southbound task 1 in time period a, allocate target resources to southbound task 2 in time period b, and allocate target resources to southbound task 3 in time period c. Then, southbound task 1 is executed according to the target resources in time period a, southbound task 2 is executed according to the target resources in time period b, and southbound task 3 is executed according to the target resources in time period c.
[0073] By adopting the technical solution of the embodiment of the present application, target resources are reasonably allocated to different southbound tasks according to the network load conditions and the priority of the southbound tasks, thereby avoiding different southbound tasks from preempting resources and ensuring that each southbound task can be executed smoothly, thereby achieving the purpose of improving network communication efficiency and optimizing resource allocation and utilization.
[0074] Reference Figure 3 As shown, Figure 3 1 is a flowchart of a priority preemptive scheduling method for a northbound module provided in an embodiment of the present application. Figure 3 As shown, the priority preemptive scheduling method may include steps S310 to S330: Step S310: obtaining a northbound task and placing the northbound task into a priority queue, wherein the northbound task represents a task of receiving a request and sending data.
[0075] Step S320: Execute the northbound task according to the resources allocated by the resource scheduler.
[0076] Step S330: Send a message to the southbound module indicating that the northbound task has been executed, so that the southbound module continues to execute the southbound task according to the processing progress. The processing progress is saved when the southbound module detects the existence of the northbound task in the priority queue. The southbound task represents the task of processing business and returning a response.
[0077] In the embodiment of the present application, different priorities are set for northbound tasks and southbound tasks. Since the northbound task has a strong real-time requirement, the northbound task is set to a high priority. When the northbound module receives the northbound task, it puts the northbound task into the priority queue, so that the southbound module can automatically and actively identify the high-priority northbound task from the priority queue; thereby sending the occupation request for the northbound task to the resource scheduler, so that the resource scheduler allocates resources for the northbound task, thereby ensuring that the high-priority northbound task can be executed. In addition, after the northbound task is executed, a message that the northbound task is executed is sent to the southbound module, so that the southbound module can resume the execution of the southbound task, thereby ensuring the continuity of the traffic of the southbound task.
[0078] Specifically, the northbound task is executed according to the resources allocated by the resource scheduler, including: loading the northbound task into the cache for execution, and allocating the high-performance core of the CPU to execute the northbound task based on the high-performance core of the CPU.
[0079] In some embodiments, considering that different northbound tasks may depend on the same resource, in order to avoid competition between different northbound tasks for the same resource, the execution of northbound tasks uses a mutex lock to avoid competition. For example, if the execution of northbound task 1 depends on resource A, and the execution of northbound task 2 also depends on resource A, in order to avoid competition between northbound task 1 and northbound task 2 for resource A, a mutex lock is used to allow only northbound task 1 or northbound task 1 to be executed in the same time period.
[0080] By adopting the technical solution of the embodiment of the present application, by placing the northbound task in the priority queue, the southbound module automatically identifies the northbound task and actively initiates a preemption request to achieve real-time response of the northbound task and ensure the timeliness of key services; and, after the southbound task is preempted, the processing progress can be actively saved, and then when the northbound task is completed, the southbound task can be quickly restored based on the processing progress, avoiding repeated processing of the southbound task, and taking into account the execution efficiency of the southbound task and the continuity of the southbound task traffic. Therefore, the method optimizes the throughput of the southbound task while ensuring the real-time performance of the northbound task through flexible resource scheduling, and finally achieves the purpose of improving network communication efficiency and optimizing resource allocation and use. The method can be widely used in traffic scheduling and coordination scenarios in communication networks and has important practical value.
[0081] In combination with the above embodiments, in one implementation, the present application embodiment further provides a priority preemptive scheduling method. In this method, the above step S310 of "putting the northbound task into the priority queue" specifically includes the following steps S310-1 to S310-2: Step S310-1: Determine the category of northbound tasks, the categories of northbound tasks include: first-priority northbound tasks, second-priority northbound tasks, and third-priority northbound tasks. The first-priority northbound tasks represent fault instructions for redundancy and backup, the second-priority northbound tasks represent emergency instructions for serious service quality issues, and the third-priority northbound tasks represent routine service instructions.
[0082] Step S310 - 2 : According to the category of the northbound task, the northbound task is placed into a corresponding priority queue, where the priority queue includes a first priority queue, a second priority queue and a third priority queue.
[0083] In the embodiment of the present application, northbound tasks can be divided into northbound tasks of the first priority, northbound tasks of the second priority, and northbound tasks of the third priority. The priority of the northbound task is determined according to the task type, and the northbound module places northbound tasks of different priorities in different priority queues. Among them, the processing weights of the first priority, the second priority, and the third priority are from high to low: first priority, second priority, and third priority.
[0084] Specifically, after the northbound module receives the northbound task, it parses the northbound task to determine the category of the northbound task, and finally puts the northbound task into the corresponding priority queue according to the category of the northbound task, that is, the first priority northbound task is put into the first priority queue, the second priority northbound task is put into the second priority queue, and the third priority northbound task is put into the third priority queue. In this way, the southbound module can detect whether there is a first priority northbound task in the first priority queue, whether there is a second priority northbound task in the second priority queue, and whether there is a third priority northbound task in the third priority queue during the execution of the southbound task, so as to realize the active discovery of northbound tasks of different priorities.
[0085] By adopting the technical solution of the embodiment of the present application, by placing northbound tasks of different priorities in different priority queues, the southbound module can detect whether there are northbound tasks in different priority queues to initiate preemption requests for northbound tasks of different priorities, so as to flexibly schedule resources to execute northbound tasks of different priorities, thereby ensuring that northbound tasks with higher priority are executed first, thereby ensuring the timeliness of key services.
[0086] The following describes a specific implementation process of the priority preemptive scheduling method in the southbound module, resource scheduler and northbound module in conjunction with a specific embodiment. Figure 4 As shown, Figure 4 4 is an overall step flow chart of a priority preemptive scheduling method provided in an embodiment of the present application, specifically, comprising the following steps S410 to S470: Step S410: the northbound module puts the northbound task into the priority queue, where the northbound task represents the task of receiving requests and sending data.
[0087] Step S420: during the execution of the southbound task, the southbound module detects whether there is a northbound task in the priority queue, wherein the southbound task represents a task for processing business and returning a response.
[0088] Step S430: When there is a northbound task in the priority queue, the southbound module saves the processing progress of the southbound task and initiates a preemption request to the resource scheduler.
[0089] Step S440: The resource scheduler receives the preemption request and allocates resources to the northbound task according to the received preemption request.
[0090] Step S450: The northbound module executes the northbound task according to the resources allocated by the resource scheduler.
[0091] Step S460: After the northbound task is completed, the northbound module sends a message of completion of the northbound task to the southbound module.
[0092] Step S470: The southbound module receives a message indicating that the northbound task has been completed, and continues to execute the southbound task according to the processing progress.
[0093] In the embodiment of the present application, the southbound module automatically identifies the northbound task and actively initiates a preemption request to achieve real-time response of the northbound task and ensure the timeliness of key services; and, after the southbound task is preempted, it can actively save the processing progress, and then when the northbound task is completed, it can quickly resume the execution of the southbound task based on the processing progress, avoiding repeated processing of the southbound task, and taking into account the execution efficiency of the southbound task and the continuity of the southbound task traffic. Therefore, this method optimizes the throughput of the southbound task while ensuring the real-time performance of the northbound task through flexible resource scheduling, and ultimately achieves the purpose of improving network communication efficiency and optimizing resource allocation and use. This method can be widely used in traffic scheduling and coordination scenarios in communication networks, and has important practical value.
[0094] The priority preemptive scheduling method provided in the embodiment of the present application can be applied to the problems of northbound business and southbound reconciliation of communication network controllers, as well as business scenarios such as attempting to balance high-timeliness tasks and low-priority tasks.
[0095] The following uses the business executed by the bank account system as an example to illustrate the priority preemptive scheduling method. Assume that the bank's accounting system needs to perform a day-end reconciliation. There is a task of sending a large amount of accounting data to the north, and a reconciliation task of checking the accounts to the south. Specifically, the following steps are included: Step 1: The northbound module will send the data generated by the task to different priority queues according to priority, and put the real-time transaction data into the high-priority queue.
[0096] Step 2: The southbound module polls the priority queue once at a preset time interval (for example, 10 seconds).
[0097] Step 3: If the southbound module finds new real-time transaction data in the priority queue, the southbound module actively initiates preemption.
[0098] Step 4: Before preemption, the southbound module saves the current account progress that has been reconciled.
[0099] Step 5: After receiving the preemption request, the resource scheduler allocates more CPU and cache resources to the northbound real-time data task.
[0100] Step 6: After the northbound task completes sending real-time data, it notifies the southbound module that it can resume executing the southbound task.
[0101] Step 7: The southbound module loads the saved account progress and continues the reconciliation process from the interruption point.
[0102] Step 8: The resource scheduler monitors the real-time status of the network and adjusts the queue priority definition appropriately.
[0103] Through this example, the specific application process and effect of the technical solution of the embodiment of the present application in the actual business scenario are explained to achieve the coordination, preemptive scheduling and dynamic strategy adjustment of north-south tasks.
[0104] Reference Figure 5 As shown, Figure 5 This is a flow chart for implementing a priority preemptive scheduling method provided in an embodiment of the present application. Specifically, the northbound module places the northbound task into the corresponding priority queue according to the category of the northbound task, wherein the priority of the northbound task and the priority of the southbound task can be adjusted dynamically. In the process of executing the southbound task, the southbound module polls whether there is a high-priority northbound task in the priority queue. If there is a northbound task in the priority queue, a preemption request is initiated to the resource scheduler, and the processing progress of the southbound task is saved (saved status). The resource scheduler receives the preemption request and allocates resources to the northbound task based on the received preemption request, and then the northbound task is executed. When the northbound task is completed, the southbound task is resumed according to the processing progress.
[0105] In this way, the method clearly defines the collaboration and preemption mechanism between tasks of different priorities, ensuring both northbound real-time and southbound traffic continuity. Through flexible resource scheduling, the throughput of southbound tasks is optimized while ensuring the real-time of northbound tasks, ultimately achieving the goal of improving network communication efficiency and optimizing resource allocation and utilization. This method can be widely used in traffic scheduling and coordination scenarios in communication networks and has important practical value.
[0106] Reference Figure 6 As shown, Figure 6 is an architecture diagram of different modules of a priority preemptive scheduling method provided in an embodiment of the present application, Figure 6 The workflow and interaction of different modules are illustrated to achieve collaboration between north-south tasks and dynamic adjustment of the scheduler through priority queues.
[0107] Among them, the northbound module receives the northbound task, parses it, and puts the northbound task into different priority queues through task scheduling. The southbound module actively polls the priority queue, and when a high-priority northbound task is detected, it saves the processing progress of the southbound task, and initiates a preemption request to the resource scheduler. After receiving the completion of the northbound task, it continues to execute the southbound task according to the processing progress, and actively polls the priority queue while continuing to execute the southbound task. The resource scheduler allocates resources to the northbound task based on the received preemption request; and the resource scheduler monitors and adjusts the strategy to affect the queue and task scheduling, that is, the priority of the northbound task and the southbound task is adjusted according to the number of preemptions within the preset time period to achieve a dynamic balance in the processing efficiency of the northbound task and the southbound task.
[0108] The present application also provides a priority preemptive scheduling system, referring to Figure 7 As shown, Figure 7 : is a structural diagram of a priority preemptive scheduling system provided in an embodiment of the present application, the system comprising: The southbound module 710 is used to detect whether there is a northbound task in the priority queue during the execution of the southbound task, wherein the southbound task represents a task for processing business and returning a response, and the northbound task represents a task for receiving a request and sending data; and, if there is a northbound task in the priority queue, save the processing progress of the southbound task and initiate a preemption request to the resource scheduler; receive a message indicating that the northbound task has been executed, and continue to execute the southbound task according to the processing progress; A resource scheduler 720, configured to receive a preemption request and allocate resources to the northbound task according to the received preemption request; The northbound module 730 is used to obtain northbound tasks and put the northbound tasks into a priority queue; execute the northbound tasks according to the resources allocated by the resource scheduler; and send a message to the southbound module indicating that the northbound tasks have been executed.
[0109] Based on this system, the southbound module automatically identifies the northbound task and actively initiates a preemption request to achieve real-time response of the northbound task and ensure the timeliness of key services; moreover, after the southbound task is preempted, it can actively save the processing progress, and then when the northbound task is completed, it can quickly resume the execution of the southbound task based on the processing progress, avoiding repeated processing of the southbound task, and taking into account the execution efficiency of the southbound task and the continuity of the southbound task traffic. Therefore, the system optimizes the throughput of the southbound task while ensuring the real-time performance of the northbound task through flexible resource scheduling, and ultimately achieves the purpose of improving network communication efficiency and optimizing resource allocation and use. The system can be widely used in traffic scheduling and coordination scenarios in communication networks and has important practical value.
[0110] The present application also provides an electronic device, referring to Figure 8 , Figure 8 Schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 8 As shown, the electronic device 800 includes: a memory 810 and a processor 820. The memory 810 and the processor 820 are connected via a bus communication. A computer program is stored in the memory 810. The computer program can be run on the processor 820, thereby implementing the steps of the priority preemptive scheduling method described in the embodiment of the present application.
[0111] The embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the priority preemptive scheduling method described in the embodiment of the present application are implemented.
[0112] The embodiment of the present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the priority preemptive scheduling method described in the embodiment of the present application.
[0113] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0114] The embodiments of the present application are described with reference to the method, system flow chart and / or block diagram according to the embodiments of the present application. It should be understood that each process and / or box in the flow chart and / or block diagram, as well as the combination of the processes and / or boxes in the flow chart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing terminal device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flow chart. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0115] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0116] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0117] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.
[0118] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0119] The above is a detailed introduction to a priority preemptive scheduling method and system provided by the present application. This article uses specific examples to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A priority preemptive scheduling method, characterized in that: Applicable to southbound modules, including: In the process of executing the southbound task, detecting whether there is a northbound task in the priority queue, wherein the southbound task represents a task of processing business and returning a response, and the northbound task represents a task of receiving a request and sending data; In the case where there is a northbound task in the priority queue, saving the processing progress of the southbound task, and initiating a preemption request to the resource scheduler, so that the resource scheduler allocates resources to the northbound task to execute the northbound task according to the received preemption request; A message indicating that the northbound task has been completed is received, and the southbound task continues to be executed according to the processing progress.
2. The method according to claim 1, characterized in that When there is a northbound task in the priority queue, saving the processing progress of the southbound task and initiating a preemption request to the resource scheduler, including: Determine whether the priority of the northbound task is higher than the priority of the southbound task, the priority of the northbound task and the priority of the southbound task are adjusted by the resource scheduler according to the number of preemptions within a preset time period; In the case where the priority of the northbound task is higher than the priority of the southbound task, the processing progress of the southbound task is saved, and a preemption request is initiated to the resource scheduler.
3. The method according to claim 1, characterized in that The priority queue includes a first priority queue, a second priority queue and a third priority queue; in the process of executing the southbound task, detecting whether there is a northbound task in the priority queue includes: In the process of executing the southbound task, respectively detecting whether there is a northbound task of the first priority in the first priority queue, whether there is a northbound task of the second priority in the second priority queue, and whether there is a northbound task of the third priority in the third priority queue; Among them, the northbound tasks of the first priority represent fault instructions for redundancy and backup, the northbound tasks of the second priority represent emergency instructions for serious service quality issues, and the northbound tasks of the third priority represent regular service instructions.
4. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: Acquire target resources, where the target resources are pre-allocated by the resource scheduler according to the network load and the priority of each southbound task, and the target resources represent resources allocated to different southbound tasks in different time periods; According to the target resources, a corresponding southbound task is executed.
5. A priority preemptive scheduling method, characterized in that: Applied to a resource scheduler, the method comprises: Receive a preemption request, where the preemption request is sent by the southbound module when detecting whether there is a northbound task in the priority queue, where the southbound task represents a task of processing business and returning a response, and the northbound task represents a task of receiving a request and sending data; According to the received preemption request, resources are allocated to the northbound task so that the northbound module executes the northbound task.
6. The method according to claim 5, characterized in that The method further comprises: Counting the number of preemptions within a preset time period, where the number of preemptions within the preset time period is equal to the number of preemption requests received within the preset time period; When the number of preemption times within the preset time period is greater than the first target threshold, lowering the priority of the northbound task and / or increasing the priority of the southbound task; When the number of preemptions within the preset time period is less than a second target threshold, the priority of the northbound task is increased and / or the priority of the southbound task is decreased, and the second target threshold is greater than the first target threshold.
7. The method according to claim 5 or 6, characterized in that: The method further comprises: According to the network load and the priority of each southbound task, target resources are allocated to each southbound task so that the southbound module executes the corresponding southbound task according to the target resources, and the target resources represent the resources allocated to different southbound tasks in different time periods.
8. A priority preemptive scheduling method, characterized in that: Applied to the northbound module, the method comprises: Obtain a northbound task and put the northbound task into a priority queue, wherein the northbound task represents a task of receiving a request and sending data; Execute the northbound task according to the resources allocated by the resource scheduler; A message indicating that the northbound task has been executed is sent to the southbound module so that the southbound module continues to execute the southbound task according to the processing progress. The processing progress is saved when the southbound module detects the existence of the northbound task in the priority queue. The southbound task represents the task of processing business and returning a response.
9. The method according to claim 8, characterized in that Put northbound tasks into the priority queue, including: Determine the category of northbound tasks, the categories of northbound tasks include: first-priority northbound tasks, second-priority northbound tasks, and third-priority northbound tasks, the first-priority northbound tasks represent fault instructions for redundancy and backup, the second-priority northbound tasks represent emergency instructions for serious service quality issues, and the third-priority northbound tasks represent regular service instructions; According to the category of the northbound task, the northbound task is put into a corresponding priority queue, and the priority queue includes a first priority queue, a second priority queue and a third priority queue.
10. A priority preemptive scheduling system, characterized in that: The system comprises: The southbound module is used to detect whether there is a northbound task in the priority queue during the execution of the southbound task, wherein the southbound task represents the task of processing business and returning response, and the northbound task represents the task of receiving request and sending data; and, if there is a northbound task in the priority queue, save the processing progress of the southbound task and initiate a preemption request to the resource scheduler; receive a message that the northbound task has been executed, and continue to execute the southbound task according to the processing progress; A resource scheduler, configured to receive a preemption request and allocate resources to the northbound task according to the received preemption request; The northbound module is used to obtain northbound tasks and put the northbound tasks into a priority queue; execute the northbound tasks according to the resources allocated by the resource scheduler; and send a message to the southbound module indicating that the northbound tasks have been executed.
Citation Information
Cited By
Information processing method, electronic device, medium and program product
CN120723407A