A method for scheduling optimization of real-time tasks in a heterogeneous cloud environment
By adopting a bottom-up resource reallocation mechanism in a heterogeneous cloud environment, the unbalanced computing resource load is monitored and adjusted in real time, and urgent tasks are prioritized and unnecessary tasks are recalled. This solves the problems of low resource utilization and poor task execution quality in existing technologies, and achieves scheduling optimization with load balancing and minimizing total latency.
Patent Information
- Application Number
- CN202010849012.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-08-21
- Publication Date
- 2026-03-06
- Estimated Expiration
- 2040-08-21
AI Technical Summary
Existing technologies lack strategies for minimizing total latency scheduling and load balancing in heterogeneous cloud environments, resulting in low resource utilization and poor task execution quality.
A bottom-up resource reallocation mechanism is adopted. Through the collaboration of the central scheduling layer and the node scheduling layer, the unbalanced computing resource load is monitored and adjusted in real time. Urgent tasks are prioritized and unnecessary tasks are recalled to achieve load balancing and minimize total latency.
It improves resource utilization, ensures that real-time tasks are completed under load balancing conditions, and enhances user experience and task execution quality.
Smart Images

Figure CN112162835B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of cloud computing scheduling technology, and in particular to a method for optimizing the scheduling of real-time tasks in a heterogeneous cloud environment. Background Technology
[0002] Cloud computing has become a hot research topic in the IT industry and academia in recent years. The continuous maturation of cloud computing has made cloud data centers increasingly important and complex. The development of virtualization technology allows a single physical host to run multiple virtual machines simultaneously, enabling the allocation of resources required for task computing to users on demand, thus meeting their diverse and dynamic needs. The real-time and dynamic characteristics of cloud data centers bring significant advantages to cloud computing.
[0003] To address the load imbalance issue arising from the real-time, dynamic allocation of computing resources by virtualization technology, various dynamic elastic resource management technologies have emerged. However, research on these technologies lacks scheduling optimization strategies that minimize the total latency of real-time tasks; furthermore, these technologies also fall short in achieving load-balanced task distribution in cloud data centers. Summary of the Invention
[0004] The purpose of this invention is to provide a scheduling optimization method for real-time tasks in a heterogeneous cloud environment, so as to achieve the optimization goals of load balancing of resources and minimizing the total latency when real-time tasks are completed in a heterogeneous cloud computing environment.
[0005] To achieve the above-mentioned objectives, the present invention employs the following technical solution:
[0006] This invention provides a method for scheduling and optimizing real-time tasks in a heterogeneous cloud environment, comprising:
[0007] Receive tasks that arrive in real time and distribute them to the various computing nodes in the lower layer;
[0008] After receiving the assigned task, the task is assigned to the node's computing resources for computation.
[0009] Set up a bottom-up resource redistribution mechanism. When resource load imbalance is detected within a certain period of time, adopt an effective adjustment strategy to restore the load balance of computing resources in a short time.
[0010] Tasks are scheduled in real time based on scheduling strategies and resource reallocation mechanisms to achieve the optimization goals of load balancing and minimizing total latency upon completion.
[0011] Furthermore, the method for receiving tasks arriving in real time and assigning them to various computing nodes in the lower layer specifically includes:
[0012] The scheduling layer receives tasks arriving in real time through the user layer and distributes the tasks to various computing nodes in the lower layer according to the central scheduling strategy.
[0013] Furthermore, the scheduling layer consists of a central scheduling layer and a node scheduling layer. The node scheduling layer includes a node waiting queue and a node scheduler, and the central scheduling layer includes a central buffer and a central scheduler.
[0014] The scheduling layer receives tasks arriving in real time from the user layer and allocates these tasks to various computing nodes in the lower layer according to the central scheduling strategy. Specifically, this includes:
[0015] All tasks involved in scheduling are represented by a set T, where each element in set T represents a real-time task from the user layer:
[0016] T = {t1, t2, ..., t} i ,…,t n}
[0017] Each real-time task uses a quintuple t i express:
[0018] Where a i Indicates the task arrival time, d i Indicates the task deadline. This indicates the minimum CPU frequency required for the task. This indicates the minimum memory requirements for the task. This indicates the estimated execution time of a task, with the standardized standard being the execution time on a VM with average computing power.
[0019] A central scheduling strategy is implemented, where tasks received from the user layer are temporarily stored in a central buffer. A deadline-first approach is adopted, taking into account the first task t in the central buffer. x According to task t x Based on the requirements for CPU frequency and memory, unsuitable computing nodes are filtered out, leaving nodes 1 to m that meet the task requirements. The processing time et of each node on server resources 1 to m is then calculated.
[0020] Calculate the total execution time of tasks in the waiting queues of nodes 1 to m respectively, and set t x Assign it to the computing node with the shortest total task execution time.
[0021] Furthermore, the specific methods for assigning tasks to node computing resources after receiving them include:
[0022] After receiving the tasks assigned by the central scheduling layer, each computing node arranges the tasks to the node's computing resources for computation according to the scheduling strategy.
[0023] Furthermore, the specific methods by which each computing node, after receiving a task allocated from the scheduling layer, arranges the task to the node's computing resources for computation according to the scheduling strategy include:
[0024] Implement a node scheduling strategy. The node waiting queue is used to store tasks waiting to be allocated resources. The queue is sorted according to the urgency of the tasks in the node queue. The node scheduler schedules the most urgent tasks to be executed on the virtual machine, that is, it prioritizes allocating computing resources to the most urgent tasks.
[0025] Task t x The urgency level is calculated as follows:
[0026] Where c t d represents the current time. x This is the deadline for the task. For task t x Execution time on node j, l x In terms of urgency;
[0027] When the urgency of a task in the waiting queue is lower than that of the task being executed on the compute node, the task in the waiting queue preempts the currently executing task and occupies compute resources until the task is completed or another task with lower urgency preempts the compute resources.
[0028] Furthermore, the resource redistribution mechanism is divided into a node layer and a central layer. The node layer includes a node detector and a node controller, and the central layer includes a central controller, a central recall unit, and a central buffer.
[0029] When an imbalance in resource load is detected over a certain period of time, methods for employing effective adjustment strategies to restore a balanced state of computing resources within a short period of time include:
[0030] The node detector is responsible for monitoring the task status in the waiting queue of each node and feeding it back to the central controller in real time.
[0031] When the central controller detects a significant resource load imbalance in the system over a period of time, it decides whether to recall tasks from certain nodes to the central layer for redistribution. If so, it sends a recall signal to the computing nodes that need to recall tasks.
[0032] The node that receives the recall signal determines which task in the queue will be recalled by the node controller, and then reports it to the central recall unit.
[0033] The central recaller then recalls the task to the central buffer, thus completing one task recall operation.
[0034] The beneficial effects of this invention are as follows:
[0035] This invention, from the perspective of service resellers, considers the dynamic characteristics of heterogeneous clouds to ensure balanced resource load scheduling, thereby improving resource utilization. At the same time, this method makes up for the lack of research on soft real-time tasks in existing studies. Under the condition of ensuring the completion of real-time tasks, it aims to minimize the total latency of real-time tasks and achieve balanced load scheduling, thereby improving the resource utilization of cloud data centers, effectively ensuring the quality of task execution, and improving user experience. Attached Figure Description
[0036] Figure 1 This is an architecture diagram of a real-time task scheduling optimization method in a heterogeneous cloud environment provided by an embodiment of the present invention;
[0037] Figure 2 This is a schematic diagram of a load balancing resource redistribution mechanism provided according to an embodiment of the present invention;
[0038] Figure 3 This is a flowchart of a scheduling optimization method for load balancing and minimizing total latency in a heterogeneous cloud environment, provided by an embodiment of the present invention. Detailed Implementation
[0039] The present invention will be further described below with reference to specific embodiments. These embodiments are only used to more clearly illustrate the technical solutions of the present invention and should not be construed as limiting the scope of protection of the present invention.
[0040] A scheduling optimization method for real-time tasks in a heterogeneous cloud environment, the key point of which is that the method includes the following steps:
[0041] A. The system is divided into a three-layer architecture: user layer, scheduling layer, and physical layer. The scheduling layer consists of a central scheduling layer and node scheduling layers.
[0042] B. The scheduling layer receives tasks arriving in real time through the user layer and distributes the tasks to various computing nodes in the lower layer according to the central scheduling strategy.
[0043] C. After receiving the tasks assigned by the central scheduling layer, each computing node will allocate the tasks to the node's computing resources for computation according to the scheduling strategy.
[0044] D. The system has a bottom-up resource redistribution mechanism. Based on the dynamic characteristics of the real-time system, when the system detects an imbalance in resource load over a certain period of time, it adopts an effective adjustment strategy to enable the system to regain a balanced state of computing resources in a short period of time.
[0045] E. The system continuously receives tasks from the user layer and schedules the tasks in real time according to the scheduling policy and resource reallocation mechanism. After one scheduling is completed, it proceeds to step A. This process is repeated until the optimization goal of load balancing of tasks and minimizing the total delay upon completion is achieved.
[0046] Step A specifically includes:
[0047] A1. The central scheduling layer includes a central buffer and a central scheduler.
[0048] A2. The node scheduling layer includes the node waiting queue and the node scheduler.
[0049] A3. In a heterogeneous cloud computing environment, computing resources are represented by virtual machines (VMs) generated from physical machines at the physical layer through virtualization technology. These VMs reside below the scheduling layer, and each VM is abstracted as a computing node. All computing nodes are represented by a set V, where each element of set V represents a computing node in the heterogeneous cloud computing environment.
[0050] V = {v1, v2, ..., v} i ,…,v m}
[0051] A4. Each compute node uses a quadruple v i express:
[0052] v i ={f i ,m i ,t i Q i}, where f i Indicates the CPU performance of the virtual machine, m i t represents the size of the virtual machine's memory. i This indicates the task currently being executed on the virtual machine, Q. i This indicates the queue of tasks waiting on this node.
[0053] Step B specifically includes:
[0054] B1. All tasks participating in scheduling are represented by a set T, where each element in set T represents a real-time task from the user layer:
[0055] T = {t1, t2, ..., t} i ,…,t n}
[0056] Each real-time task uses a quintuple t i express:
[0057] Where a i Indicates the task arrival time, d i Indicates the task deadline. This indicates the minimum CPU frequency required for the task. This indicates the minimum memory requirements for the task. This indicates the estimated execution time of a task, with the standardized standard being the execution time on a VM with average computing power.
[0058] B2. This layer implements a central scheduling strategy. Tasks received from the user layer are temporarily stored in a central buffer. A deadline-first strategy is adopted, considering the first task t in the central buffer. x According to task t x Based on the CPU frequency and memory requirements, unsuitable computing nodes are filtered out, leaving nodes 1 to m that meet the task requirements. The processing time et for each node on server resources 1 to m is then calculated.
[0059] B3. Calculate the total execution time of tasks in the waiting queues of nodes 1 to m respectively, and set t x Assign it to the computing node with the shortest total task execution time.
[0060] Step C specifically includes:
[0061] C1. This layer implements a node scheduling strategy. The node waiting queue stores tasks waiting to be allocated resources, and the queue is sorted according to the urgency of the tasks in the node queue; the node scheduler schedules the most urgent tasks to be executed on the virtual machine, that is, it prioritizes allocating computing resources to the most urgent tasks.
[0062] C2. Task t x The urgency level is calculated as follows:
[0063] Where c t d represents the current time. x This is the deadline for the task. For task t x Execution time on node j. The lower the urgency level, the more urgent the task. When the urgency level is less than zero, the task is expected to be delayed.
[0064] C3. When the urgency of a task in the waiting queue is lower than that of the task being executed on the compute node, the task in the waiting queue preempts the currently executing task and occupies compute resources until the task is completed or another task with lower urgency preempts the compute resources.
[0065] Step D specifically includes a bottom-up resource reallocation mechanism, which is divided into a node layer and a central layer, corresponding to the architecture of the scheduling layer. The node layer includes a node monitor and a node controller. The central layer includes a central controller, a central recaller, and a central buffer. Specifically, it includes:
[0066] D1. The node detector is responsible for monitoring the task status in the waiting queue of each node and feeding it back to the central controller in real time.
[0067] D2. When the central controller detects a significant imbalance in resource load in the system over a period of time, it decides whether to recall tasks from certain nodes to the central layer for redistribution. If so, it sends a recall signal to the computing nodes that need to recall tasks.
[0068] D3. The node that receives the retrieval signal determines which task in the queue will be recalled by the node controller, and then reports it to the central recall unit.
[0069] D4. The central recall unit finally recalls the task to the central buffer, thus completing one task recall operation.
[0070] The architecture diagram of the real-time task scheduling method in a heterogeneous cloud environment according to the embodiments of the present invention is as follows: Figure 1 As shown, the central buffer in the central scheduling layer is responsible for temporarily storing tasks waiting to be scheduled by the central scheduling queue. The central scheduler is responsible for retrieving tasks from the central task buffer and then allocating the tasks to each computing node according to the central scheduler's scheduling policy. The tasks of each node are first placed in the node waiting queue. The waiting queue is sorted according to the node scheduling policy. Then, the node scheduler is responsible for deciding which task in the node waiting queue will occupy computing resources and when.
[0071] Considering the dynamic characteristics of real-time systems, when the system detects an imbalance in resource load over a certain period, an effective resource reallocation mechanism is employed to enable the system to quickly regain a balanced load on computing resources. Related content includes... Figure 2 As shown. The node monitor is responsible for monitoring the task status in the waiting queue of each node and feeding it back to the central controller in real time. When the central controller detects a significant resource load imbalance in the system over a period of time, it decides whether to recall tasks from certain nodes. If so, it sends a recall signal to the compute nodes that need to recall tasks. The compute nodes that receive the recall signal have their node controllers determine which task in the queue will be recalled, and then report this to the central recall unit. Finally, the central recall unit recalls the task to the central buffer, thus completing one task recall operation.
[0072] The details of the task recall operation are as follows:
[0073] Each node monitor sends the queuing status of its queue to the central controller in real time.
[0074] The central controller uses a central decision-making algorithm to determine whether each node needs to be recalled due to a task. If not, it waits; if so, it sends a message to the node controller that needs to recall the task.
[0075] The node controller determines which task needs to be recalled based on the state of the node waiting queue and sends the determined task to the central recaller.
[0076] The central recaller returns the task to the central buffer for subsequent scheduling.
[0077] like Figure 3 As shown, when computing resources are sufficient, the specific steps of the real-time task scheduling strategy are as follows:
[0078] Step S201: Determine if there are any tasks arriving from the user terminal in the real-time system of the heterogeneous cloud environment. If there are no tasks, the method ends. If there are tasks, proceed to step S202.
[0079] Step S202: Place the arriving tasks in the central buffer, update the task list in the central buffer, queue the tasks according to their deadlines, and proceed to step S203.
[0080] Step S203: Extract the task ranked first in the central buffer (the task with the smallest deadline) as a pre-scheduled task and check the computing resource requirements of the task.
[0081] Step S204: View the attributes of all available virtual machines, filter out virtual machines that do not meet the computing resource requirements, and keep only virtual machines that meet the computing resource requirements of the pre-scheduled task as candidate computing resources.
[0082] Step S205: Calculate the total execution time of tasks in the waiting queue of each candidate computing resource, assign the pre-scheduled task to the computing resource with the shortest total execution time, which is the target resource, place the pre-scheduled task in the waiting queue of the target resource, and go to step S301.
[0083] Step S301: After receiving the task, the node updates the node waiting queue list and implements the node scheduling strategy.
[0084] Step S302: The node waiting queue is sorted according to the priority of laxity in the node queue. The laxity is calculated as follows: Where ct is the current time and dx is the task deadline. Given the execution time of task tx on node j, the node scheduler schedules the most urgent task to be executed on the virtual machine, that is, it prioritizes allocating computing resources to the most urgent task, and then proceeds to step S303.
[0085] Step S303: Determine if there are any tasks in the queue whose urgency is lower than the urgency of the tasks being executed on the compute node. If not, return to step S302; otherwise, proceed to step S304.
[0086] In step S304, the urgent task preempts the currently executing task, thus occupying computing resources.
[0087] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0088] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0089] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0090] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0091] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the technical principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1.A method for scheduling optimization of real-time tasks in a heterogeneous cloud environment, characterized in that, The application relates to a method for scheduling tasks in a distributed computing system. The method comprises the following steps: receiving real-time arriving tasks and distributing the tasks to each computing node in the lower layer; after receiving the distributed tasks, the tasks are arranged to be calculated by node computing resources; a self-bottom resource redistribution mechanism is set, when unbalanced resource load is monitored within a certain period of time, an effective adjustment strategy is adopted to make the computing resource load balanced again within a short time; according to the scheduling strategy and the resource redistribution mechanism, the tasks are scheduled in real time to realize the optimization target of balanced load distribution and minimum total delay when the tasks are completed; the method for receiving real-time arriving tasks and distributing the tasks to each computing node in the lower layer comprises the following steps: the scheduling layer receives real-time arriving tasks through the user layer, and distributes the tasks to each computing node in the lower layer according to a central scheduling strategy; the scheduling layer is composed of a central scheduling layer and a node scheduling layer, the node scheduling layer comprises a node waiting queue and a node scheduler, and the central scheduling layer comprises a central buffer and a central scheduler; the method that the scheduling layer receives real-time arriving tasks through the user layer and distributes the tasks to each computing node in the lower layer according to a central scheduling strategy comprises the following steps: ={ } Each real-time task is represented by a five-tuple : ={ , , , }, wherein denotes the task arrival time, denotes the task deadline, denotes the minimum requirement of CPU frequency for the task, denotes the minimum requirement of memory for the task, denotes the estimated execution duration of the task, the unified standard being the duration of execution on a VM with average computing power; Implement the central scheduling strategy, the task received from the user layer is temporarily stored in the central buffer, and the deadline priority strategy is adopted. Considering the first task t x , according to the task t x , the demand for CPU frequency and memory, the computing nodes that do not meet the requirements are filtered out, and the nodes 1~m that meet the task requirements are left. Respectively calculate its processing time et on 1~m server resources; Calculate the total execution time of the tasks in the waiting queue of each node 1~m, and set t x Assign the task to the node with the shortest total execution time. all the tasks participating in scheduling are represented by a set T, and the elements in the set T represent each real-time task from the user layer: after receiving the distributed tasks, the tasks are arranged to be calculated by node computing resources; 2.The method of claim 1, wherein, each computing node receives the tasks distributed from the central scheduling layer, and arranges the tasks to be calculated by node computing resources according to a scheduling strategy. Each computing node receives the tasks distributed from the scheduling layer, and arranges the tasks to be calculated by node computing resources according to a scheduling strategy. Task t x The urgency of the task t is calculated as follows: l x =(c t -d x )- where c t is the current time, d x is the deadline of the task, is the execution time of task t x on node j, and l x is the urgency level; The node scheduling strategy is implemented, the node waiting queue is used for storing tasks waiting to be distributed to resources, the queue is sorted according to the urgency of the tasks in the node queue, and the node scheduler schedules the most urgent task to be executed on a virtual machine, that is, the most urgent task is preferentially distributed to the computing resource; 3.The method of claim 2, wherein, when the urgency of a task in the waiting queue is smaller than the urgency of a task being executed on the computing node, the task preoccupies the executing task and occupies the computing resource until the task is executed or another task with smaller urgency preoccupies the computing resource. The resource redistribution mechanism is divided into a node layer and a central layer, the node layer comprises a node detector and a node controller, and the central layer comprises a central controller, a central recaller and a central buffer; when unbalanced resource load is monitored within a certain period of time, an effective adjustment strategy is adopted to make the computing resource load balanced again within a short time. The node detector is responsible for monitoring the task state in each node waiting queue and feeding back to the central controller in real time; when the central controller finds that there is an obvious resource load imbalance state in the system within a period of time, it is decided whether the tasks in some nodes need to be recalled to the central layer for redistribution, if yes, a recall signal is sent to the computing node needing to recall the tasks; the node receiving the recall signal decides which task in the queue will be recalled by the node controller, and then reports to the central recaller. The central recaller finally recalls the tasks to the central buffer, and thus completes a task recall operation.
Citation Information
Patent Citations
Priority queue based cloud task multidimensional constraint backfill scheduling method
CN107341041A
Load balancing scheduling method based on maximum entropy principle
CN109783235A
Fog computing load balancing method and system
CN111124662A