Workflow energy consumption and reliability scheduling method and device under deadline constraints
By adopting the workflow energy consumption and reliability scheduling methods under deadline constraints in heterogeneous distributed systems, the problem that dynamic voltage and frequency adjustment technology cannot take into account reliability and deadline constraints is solved, and more efficient scheduling and Optimize the effect.
Patent Information
- Application Number
- CN202011142302.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-10-22
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2040-10-22
AI Technical Summary
The prior art reduces the energy consumption of task execution in heterogeneous distributed systems through dynamic voltage and frequency adjustment techniques, and cannot take into account both reliability and deadline constraints.
Using the workflow energy consumption and reliability scheduling method under the deadline constraint, the workflow is divided into multiple task sets, and the task is determined based on the task hierarchy number and the extended sub-deadline. Priority, generate initial scheduling schemes with different energy consumption values and reliability.
Effectively meet the deadline constraints of the workflow, improve the scheduling success rate, and optimize reliability and energy consumption in heterogeneous computing systems to generate better scheduling solutions, and provide users with intelligent decision-making support.
Smart Images

Figure CN112306653B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of distributed computing technology, and in particular to a method and device for scheduling workflow energy consumption and reliability under deadline constraints. Background Art
[0002] Heterogeneous distributed systems have been widely used in the past few decades, and energy consumption management has always been a key issue in heterogeneous distributed systems. The existing dynamic voltage and frequency scaling (DVFS) technology can simultaneously reduce the voltage and frequency of the processor to achieve energy-efficient scheduling. Currently, mainstream chip manufacturers, such as Intel, AMD, and ARM, all provide processors that support DVFS technology.
[0003] Dynamically lowering the processor voltage can reduce the energy consumption of task execution, but this operation will also increase the probability of processor transient failure, thereby reducing system reliability. Reliability is the probability that a schedule can be executed correctly. Some safety-critical systems, such as automotive systems, avionics systems, and industrial software systems, have different functional safety standards defined. Therefore, it is also very necessary to implement reliable and effective scheduling to improve application reliability.
[0004] In addition, for real-time applications executed in heterogeneous distributed systems, the deadline is a very important constraint. Missing the deadline means execution failure, which may have serious consequences. Therefore, the deadline of real-time applications must also be met.
[0005] Therefore, it is necessary to design a workflow energy consumption and reliability scheduling method for deadline constraints, so as to lay a foundation for users to make intelligent decisions.
[0006] It should be noted that this section is intended to provide a background or context to the embodiments of the present disclosure as recited in the claims. No admission is made that the description herein is prior art by virtue of its inclusion in this section. Summary of the invention
[0007] The embodiment of the present invention provides a method and device for scheduling workflow energy consumption and reliability under deadline constraints, so as to solve the problem in the prior art that dynamic voltage and frequency regulation technology is used in heterogeneous distributed systems to reduce the energy consumption of task execution while failing to take into account both reliability and deadline constraints.
[0008] In a first aspect, an embodiment of the present invention provides a method for scheduling energy consumption and reliability of a workflow under deadline constraints, comprising:
[0009] According to the hierarchical number of the task, the workflow is divided into a plurality of task sets, wherein the task sets include at least one task with the same hierarchical number;
[0010] Determine the extended sub-deadline of each task according to the initial sub-deadline of each task and the extended time of each task set;
[0011] Determine the priority of each task according to the level number and the extended sub-deadline of each task, and determine the task priority queue according to the priority of each task; wherein the task priority queue is arranged according to the scheduling order of each task;
[0012] A preset number of initial scheduling schemes with different energy consumption values and reliabilities are generated according to the task priority queue, and the initial scheduling scheme is used to allocate a matching processor and execution frequency combination to each task in the workflow.
[0013] As a preferred embodiment of the first aspect of the present invention, determining the extended sub-deadline of each task according to the initial sub-deadline of each task and the extended time of each task set includes:
[0014] According to the HEFT algorithm, determine the initial sub-deadline of each task;
[0015] Determine the expansion time of each task set according to the number of tasks and execution time in each task set;
[0016] The initial sub-deadline of each task is added to the sum of the extended times of all task sets whose level number is greater than or equal to the task set to which the task belongs, to determine the extended sub-deadline of each task.
[0017] As a preferred embodiment of the first aspect of the present invention, determining the extension time of each task set according to the number of tasks and execution time in each task set includes:
[0018] The expansion time for each task set is determined according to the following formula:
[0019]
[0020] DS=T D -AFT(T exit ),
[0021]
[0022]
[0023] Among them, ST(n) is the task set BoT n Expansion time, BoT n ={T i|Level(T i )=n,1≤n≤Level(T entry )},Level(T i ) is task T i Level number, Level(T entry ) is the entry task T entry DS is the slack time of the workflow, MET(n) is the task set BoT n The maximum average execution time of all tasks in |BoT n |Assemble BoT for the task n The number of tasks in T D is the deadline constraint of the workflow, AFT(T exit ) is the earliest completion time of the workflow, that is, the deadline of the workflow. For task T i The average execution time, w i,k For task T i In the processor P k Execution time working at the maximum frequency, |P| is the number of processors in the heterogeneous distributed system.
[0024] As a preferred embodiment of the first aspect of the present invention, the step of adding the initial sub-deadline of each task to the sum of the extended times of all task sets of a level number greater than or equal to the task set to which the task belongs to determine the extended sub-deadline of each task, comprises:
[0025] The extended sub-deadline for each task is determined according to the following formula:
[0026]
[0027] Among them, subD(T i ) is task T i The extended sub-deadline period, AFT(T i ) is task T i The initial sub-cutoff period of is greater than or equal to task T i The sum of the expansion times of all task sets of the level number to which the task set belongs.
[0028] As a preferred embodiment of the first aspect of the present invention, generating a preset number of initial scheduling schemes with different energy consumption values and reliabilities according to the task priority queue, wherein the initial scheduling scheme is used to assign a matching processor and execution frequency combination to each task in the workflow, including:
[0029] Generate a plurality of corresponding task solutions for each task in the task priority queue in turn, and calculate the energy consumption value and reliability of each of the task solutions, wherein the task solutions are used to assign matching processors and execution frequency combinations to the tasks;
[0030] According to the fast non-dominated sorting algorithm and the crowding distance mechanism, a preset number of task solutions are selected from multiple task solutions corresponding to each task;
[0031] According to a preset number of task solutions for each task, a preset number of initial scheduling schemes with different energy consumption values and reliabilities are generated, and the initial scheduling schemes are used to allocate a matching processor and execution frequency combination to each task in the workflow.
[0032] As a preferred embodiment of the first aspect of the present invention, the method of sequentially generating a plurality of corresponding task solutions for each task in the task priority queue, and calculating the energy consumption value and reliability of each of the task solutions, wherein the task solution is used to allocate a processor and an execution frequency combination to the task, includes:
[0033] Assigning a preset processor and execution frequency combination to the tasks in the task priority queue in order;
[0034] If the earliest task completion time calculated by the preset processor and execution frequency combination is less than or equal to the extended sub-deadline of the task, a first task solution is generated according to the preset processor and execution frequency combination, and the energy consumption value and reliability of the first task solution are calculated; otherwise, another preset processor and execution frequency combination is assigned to the task in the task priority queue;
[0035] If the earliest task completion time calculated by the preset processor and execution frequency combination is greater than the extended sub-deadline of the task, a second task solution is generated according to the processor and execution frequency combination that can complete the task earliest, and the energy consumption value and reliability of the second task solution are calculated.
[0036] As a preferred embodiment of the first aspect of the present invention, after generating a preset number of initial scheduling schemes with different energy consumption values and reliabilities according to the task priority queue, the method further includes:
[0037] Performing a reliability optimization operation on the initial scheduling scheme, the reliability optimization operation comprising: sorting the tasks in descending order according to the actual completion time of each task according to the initial scheduling scheme; selecting the tasks in front in turn, and after traversing the processors and execution frequency combinations assigned to other tasks except the task, reallocating the processor and execution frequency combination with the same energy consumption and maximum reliability to the task; after traversing all tasks, generating an optimized scheduling scheme, and deleting other initial scheduling schemes dominated by the optimized scheduling scheme;
[0038] The initial scheduling scheme is subjected to energy consumption optimization operation, and the energy consumption optimization operation includes: according to the initial scheduling scheme, each task is sorted in descending order according to its actual completion time; the tasks in front are selected in turn, and after traversing the processor and execution frequency combination assigned to other tasks except the task, the processor and execution frequency combination with the same reliability and minimized energy consumption is reallocated to the task; after traversing all tasks, an optimized scheduling scheme is generated, and other initial scheduling schemes dominated by the optimized scheduling scheme are deleted.
[0039] In a second aspect, an embodiment of the present invention provides a workflow energy consumption and reliability scheduling device under deadline constraints, comprising:
[0040] A task division unit, used to divide the workflow into a plurality of task sets according to the level numbers of the tasks, wherein the task sets include at least one task with the same level number;
[0041] A first determining unit, configured to determine an extended sub-deadline of each task according to an initial sub-deadline of each task and an extended time of all task sets whose level number is greater than or equal to the task set to which the task belongs;
[0042] The second determining unit is used to determine the priority of each task according to the level number and the extended sub-deadline of each task, and determine the task priority queue according to the priority of each task; wherein the task priority queue is arranged according to the scheduling order of each task;
[0043] A scheme generating unit is used to generate a preset number of initial scheduling schemes with different energy consumption values and reliabilities according to the task priority queue, and the initial scheduling scheme is used to allocate a matching processor and execution frequency combination to each task in the workflow.
[0044] In a third aspect, an embodiment of the present invention provides a computing device, comprising a processor and a memory, wherein the memory stores execution instructions, and the processor reads the execution instructions in the memory to execute the steps described in the workflow energy consumption and reliability scheduling method under deadline constraints in the above-mentioned first aspect and its preferred method.
[0045] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium comprising computer-executable instructions, wherein the computer-executable instructions are used to execute the steps of the method for scheduling workflow energy consumption and reliability under deadline constraints in the first aspect and its preferred embodiment.
[0046] The method and device for scheduling workflow energy consumption and reliability under deadline constraints provided by the embodiment of the present invention adopt a proportional deadline division method for the workflow optimization problem under deadline constraints, divide the tasks into sub-deadlines according to the load of the tasks and the structure of the workflow, and transform the deadline constraints of the workflow into sub-deadline restrictions for each task, which can better meet the deadline constraints of the workflow, making the deadline constraints easier to manage and effectively improving the scheduling success rate. At the same time, for the problem of optimizing reliability and energy consumption simultaneously in heterogeneous computing systems, a heuristic multi-objective optimization method is proposed, which mainly adopts the idea of non-domination and can quickly generate multiple scheduling schemes with different reliability and energy consumption by using multi-objective optimization technology. The scheduling scheme has a shorter execution time and the ability to generate a better Pareto front end, laying a foundation for users to make intelligent decisions. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0048] Figure 1 A flowchart of a method for scheduling workflow energy consumption and reliability under deadline constraints provided by an embodiment of the present invention;
[0049] Figure 2 A workflow diagram with ten tasks and five levels provided for an embodiment of the present invention;
[0050] Figure 3 A schematic diagram of the structure of a workflow energy consumption and reliability scheduling device under deadline constraints provided by an embodiment of the present invention;
[0051] Figure 4 A schematic diagram of the structure of a computing device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0052] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0053] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0054] Reference Figure 1 The embodiment of the present invention discloses a method for scheduling energy consumption and reliability of a workflow under deadline constraints, which mainly includes the following steps:
[0055] 101. Divide the workflow into a plurality of task sets according to the level numbers of the tasks, wherein the task sets contain at least one task with the same level number;
[0056] 102. Determine an extended sub-deadline for each task according to the initial sub-deadline for each task and the extended time for each task set;
[0057] 103. Determine the priority of each task according to the level number and the extended sub-deadline of each task, and determine the task priority queue according to the priority of each task; wherein the task priority queue is arranged according to the scheduling order of each task;
[0058] 104. Generate a preset number of initial scheduling schemes with different energy consumption values and reliabilities according to the task priority queue, and the initial scheduling scheme is used to assign a matching processor and execution frequency combination to each task in the workflow.
[0059] In the processor allocation problem of heterogeneous distributed systems, the processor allocation of tasks is to determine which processor to put the task on and at which execution frequency the processor works. Assume that the heterogeneous distributed system can provide a set of processors, and the processor set is represented as: P = {p1, p2, ..., p |P|}, where || is the number of processors in the heterogeneous distributed system, T is the workflow executed in the system, and T i Represents a task in a workflow.
[0060] The workflow energy consumption and reliability optimization problem under deadline constraints provided by the embodiment of the present invention is a combinatorial optimization problem, which includes three sub-problems: satisfying deadline constraints, minimizing energy consumption, and maximizing reliability. Since energy consumption and reliability are two conflicting objectives, there is no scheduling that can optimize both objectives at the same time. Currently, the deadline constraints are mainly met by deadline division. Sub-deadlines are divided for tasks according to the load of the tasks and the structure of the workflow, and the deadline constraints of the workflow are transformed into sub-deadline restrictions for each task, making the deadline constraints easier to manage. The energy consumption and reliability optimization problem mainly adopts the idea of non-dominance, and uses multi-objective optimization technology to simultaneously generate a set of non-dominant scheduling schemes. Each scheduling scheme has different energy consumption and reliability, which can be used as the basis for users to choose different scheduling strategies.
[0061] In step 101, the workflow is divided into different task sets based on the structural information of the workflow to maximize the parallel degree of task execution. Workflow division is the basis of method execution. Different level numbers are assigned to each task, and tasks are divided into different task sets according to the level numbers of the tasks.
[0062] This step divides the workflow application into multiple internal independent task sets (Bag of tasks, referred to as BoT), and the basis for division is the level number of the task. Currently, the widely used methods for determining the level number of tasks are: Top-Down Approach (TDA) and Bottom-Up Approach (BUA).
[0063] This step adopts the bottom-up method BUA, in which the level number of a task is defined as the maximum number of edges from the exit task to the task, which can be iteratively calculated using the following formula:
[0064]
[0065] Among them, Level(T i ) is task T i The level number, succ(T i ) is task T i The set of predecessor tasks, export tasks T exit The level number is defined as 1, that is, Level(T exit )=1.
[0066] like Figure 2 In the workflow application shown in the figure, there are ten tasks and five levels. 10The level number of T8 and T9 is 2; the level number of T4, T5, T6, and T7 is 3; the level number of T2 and T3 is 4; and the level number of T1 is 5. The workflow is divided into five task sets BoT, each of which contains tasks with the same level number. The level number of the task set is the same as the level number of the tasks it contains, such as BoT4 = {T2, T3}, BoT3 = {T4, T5, T6, T7}, BoT1 = {T 10}, i.e. BoT n ={T i |Level(T i )=n,1≤n≤Level(T entry )}.
[0067] In step 102, the deadline partitioning converts the deadline constraint of the workflow into the sub-deadline constraint of each task. First, the initial sub-deadline of each task is determined, and the same time is extended for each task set according to the number of tasks in the task set and the execution time, and finally the extended sub-deadline of each task after extension is obtained. Therefore, when scheduling a task, only the sub-deadline constraint of the task needs to be considered, and the impact of the execution time of the task on the subsequent tasks does not need to be considered, thus achieving decoupling between dependent tasks. At the same time, the success rate of scheduling is effectively improved.
[0068] In this step, deadline partitioning is an effective means to solve the deadline constraint problem. The core idea is to convert the workflow deadline into the sub-deadline of each task, thereby converting the problem into a constraint satisfaction problem that is easier to handle. As long as each task can be completed within the sub-deadline, the workflow deadline constraint can be satisfied. Deadline partitioning consists of two parts: initial sub-deadline allocation and sub-deadline expansion.
[0069] Preferably, in a possible preferred manner, step 102 can be specifically implemented by the following steps:
[0070] 1021. Determine the initial sub-deadline of each task according to the HEFT algorithm;
[0071] In this step, the initial sub-deadline of each task is calculated according to the HEFT algorithm.
[0072] Preferably, the initial sub-deadline of each task is determined according to the following formula:
[0073]
[0074]
[0075] EFT(T i ,P k ,fk,max )=EST(T i ,P k ,f k,max )+w i,k ,
[0076] Among them, AFT(T i ) is task T i The initial sub-deadline period, EST(T i ,P k ,f k,max ) and EFT(T i ,P k ,f k,max ) are respectively tasks T i In the processor P k The earliest start time and earliest completion time when the entry task T is executed at the maximum frequency. entry The earliest start time is defined as 0, that is, EST (T entry ,P k ,f k,max ) = 0. Since the execution time of a task is inversely proportional to the execution frequency of the processor, the maximum frequency of the processor is used when calculating the earliest completion time of the task.
[0077] avail[P k ] is the processor P k Earliest free time, w i,k For task T i In the processor P k Execution time at maximum frequency. c′ j,i For task T j With task T i If task T j With task T i When allocated on the same processor, c′ j,i = 0, otherwise c′ j,i =c j,i , c j,i T defined in the workflow configuration file j With T i transmission time.
[0078] The earliest completion time of the workflow obtained by HEFT algorithm is AFT(T exit ), so the slack time of the workflow (Deadline Slack, referred to as DS) can be expressed as DS = T D -AFT(T exit ), where T D The deadline constraint for the workflow.
[0079] 1022. Determine an expansion time of each task set according to the number of tasks and execution time in each task set;
[0080] In this step, the sub-deadlines of the tasks are extended according to the structure and size of the workflow, mainly based on the number of tasks and execution time of each task set BoT, so that the extension time of each task set can be calculated.
[0081] Given that the execution time of tasks on the processor varies, the average execution time of the tasks is used, such as task T i The average execution time is is the number of processors in the heterogeneous distributed system. In this step, the sub-deadline of the task is extended in units of task sets BoT, and the tasks in the same task set BoT share the same extension time. n The maximum average execution time of the tasks in Therefore, the task set BoT can be calculated according to the formula n The expansion time obtained.
[0082] Preferably, the extension time of each task set is determined according to the following formula:
[0083]
[0084] DS=T D -AFT(T exit ),
[0085]
[0086]
[0087] Among them, ST(n) is the task set BoT n Expansion time, BoT n ={T i |Level(T i )=n,1≤n≤Level(e entry )},Level(T i ) is task T i Level number, Level(T entry ) is the entry task T entry DS is the slack time of the workflow, MET(n) is the task set BoT n The maximum average execution time of all tasks in |BoT n |Assemble BoT for the task n The number of tasks in T D is the deadline constraint of the workflow, AFT(Texit ) is the earliest completion time of the workflow, that is, the deadline of the workflow. For task T i The average execution time, w i,k For task T i In the processor P k Execution time working at the maximum frequency, |P| is the number of processors in the heterogeneous distributed system.
[0088] From this formula, we can see that a task collection BoT with long execution time and multiple tasks will obtain a longer expansion time.
[0089] 1023. Determine the extended sub-deadline of each task by adding the initial sub-deadline of each task to the sum of the extended times of all task sets whose level number is greater than or equal to the task set to which the task belongs.
[0090] In this step, based on the initial sub-deadline of each task obtained above and the extension time of each task set, the extended sub-deadline of each task can be calculated.
[0091] Preferably, the extended sub-deadline of each task is determined according to the following formula:
[0092]
[0093] Among them, subD(T i ) is task T i The extended sub-deadline period, AFT(T i ) is task T i The initial sub-cutoff period of is greater than or equal to task T i The sum of the expansion times of all task sets of the level number to which the task set belongs.
[0094] Since each layer of tasks is given a certain amount of extension time, when calculating the sub-deadline of a task, it is necessary to add the extension time obtained by all previous layers, and finally obtain the extended sub-deadline of each task.
[0095] In step 103, the task priority determines the generation of a task priority queue to determine the order in which the tasks are scheduled. Tasks in workflow applications have dependencies, so the predecessor task must be scheduled before the successor task. This step uses the task's level number and extended sub-deadline to determine the priority of the task, which not only ensures the correctness of the task scheduling order, but also improves the priority of the sub-deadline urgent task.
[0096] The list scheduling method schedules tasks according to their priorities. Therefore, it is necessary to define a suitable rule to determine the priority of tasks. Different priority rules will produce different priority queues, which in turn affect the final scheduling scheme. Since the successor task in the workflow application cannot be executed before the predecessor task, the dependency between tasks needs to be considered when determining the priority of the task. For a workflow application represented as a directed acyclic graph, the established task priority queue must be a topological sequence.
[0097] In the workflow division phase, tasks are divided into different task sets BoT according to their own level numbers, and the predecessor task has a larger level number than the successor task. Therefore, the priority of the task is first determined by the level number of the task, and the task with a larger level number has a higher priority. At the same time, the extended sub-deadline of the task can reflect the urgency of a task to be executed. Therefore, for tasks with the same level number, that is, tasks in the same task set BoT, a higher priority is assigned to the task with a shorter extended sub-deadline. That is:
[0098] rank(T i )>rank(T j ),if Level(T i ) <Level(T j )OR
[0099] Level(T i )=Level(T j )&&subD(T i ) <subD(T j )
[0100] Among them, rank(T i ) is task T i Priority value, if two tasks have the same level number and extended sub-deadline, then arbitrarily assign a task with a higher priority value. Sorting by level number ensures that the generated priority queue is a topological sequence, and sorting by extended sub-deadline ensures the execution of urgent tasks, which can reduce the probability of a task completion time exceeding the extended sub-deadline.
[0101] The task priority queue is determined according to the priority of each task. The tasks at the front of the task priority queue will be scheduled first and assigned the appropriate processor and execution frequency combination.
[0102] In step 104, task allocation mainly selects appropriate processors and execution frequencies for tasks to generate different scheduling schemes. When performing task allocation, all combinations of processors and execution frequencies that meet the task extension sub-deadlines are considered, and a certain number of scheduling schemes are selected using the Pareto dominance concept and diversity maintenance mechanism in multi-objective optimization.
[0103] The HEFT algorithm selects the processor with the earliest completion time for each task, but can only generate one schedule. Since this method aims to generate multiple schedules for users to choose from, all processor and execution frequency combinations are considered when scheduling a task. The method has an input parameter, which is the number of schedules K generated in the end. For example, it can be set to 30 or 50 according to the HEFT algorithm.
[0104] Preferably, in a possible implementation manner, step 104 can be specifically implemented by the following steps:
[0105] 1041. Generate multiple corresponding task solutions for each task in the task priority queue in turn, and calculate the energy consumption value and reliability of each task solution. The task solution is used to allocate a matching processor and execution frequency combination to the task.
[0106] In this step, each task in the task priority queue is traversed in order, and multiple corresponding task solutions can be generated for each task. The task solution mainly allocates a matching processor and execution frequency combination to the task. At the same time, the energy consumption value and reliability of the task solution are also calculated.
[0107] Furthermore, in a possible implementation, step 1041 may be specifically implemented through the following steps:
[0108] 1041-1. Allocate a preset processor and execution frequency combination to the tasks in the task priority queue in order;
[0109] 1041-2. If the earliest task completion time calculated by the preset processor and execution frequency combination is less than or equal to the extended sub-deadline of the task, generate a first task solution according to the preset processor and execution frequency combination, and calculate the energy consumption value and reliability of the first task solution; otherwise, assign another preset processor and execution frequency combination to the task in the task priority queue;
[0110] 1041-3. If the earliest task completion time calculated by the preset processor and execution frequency combination is greater than the extended sub-deadline of the task, generate a second task solution according to the processor and execution frequency combination that can complete the task earliest, and calculate the energy consumption value and reliability of the second task solution.
[0111] Specifically, in this method, a scheduling solution set S is first defined, S contains an empty solution, and then tasks are taken out from the task priority queue in turn for scheduling. When scheduling a task, an empty set S' is first initialized. For each solution S in S k (1≤k≤|S|,|S|≤K), the method extends S by assigning the current task to all processors and execution frequency combinations k .
[0112] Since the task needs to be completed within the extended sub-deadline, the method also needs to consider the task completion time on each processor and execution frequency. i Assign processor P j and execution frequency f j,r When the calculation task T i The earliest completion time EFT (T i ,P k ,f k,r ), if EFT(T i ,P k ,f k,r )>subD(T i ), the current processor and execution frequency combination is ignored. Otherwise, a new first task solution S is generated k ∪(T i ,P j , f j,r ) and add it to S′. For a solution S in S k , at most A first task solution is generated, where L j For processor P j If all processor and execution frequency combinations cannot meet the extended sub-deadline constraints of the task, select the task that can complete T earliest. i Processor P n and execution frequency f n,max , then for S k , there is only one solution S for the second task k ∪(T i ,P n , f n,max ) is generated.
[0113] Therefore, when scheduling task T i When , there are at least |S| and at most Task solutions are generated. In addition, the energy consumption and reliability of each task solution need to be calculated.
[0114] 1042. According to the fast non-dominated sorting algorithm and the crowding distance mechanism, a preset number of task solutions are selected from multiple task solutions corresponding to each task.
[0115] In this step, since the generated task solution is in multiple relation with the total execution frequency of the processor, if no corresponding measures are taken, it will lead to exhaustive search and very long execution time.
[0116] Therefore, the fast nondominated sorting algorithm and crowding distance mechanism defined in Nondominated Sorting Genetic Algorithm II (NSGA-II) are further adopted to select K task solutions according to the energy consumption and reliability values of each task solution in S′ to replace the solutions in S.
[0117] 1043. Based on a preset number of task solutions for each task, generate a preset number of initial scheduling schemes with different energy consumption values and reliabilities, and the initial scheduling scheme is used to assign a matching processor and execution frequency combination to each task in the workflow.
[0118] In this step, after the method schedules all tasks in the task priority queue, each task corresponds to K task solutions, thereby obtaining K best initial scheduling schemes, each of which has different reliability and energy consumption values, and can allocate a matching processor and execution frequency combination to each task in the workflow.
[0119] In summary, the overall execution process of each step in the above step 104 is as follows:
[0120] (1) Initialize an empty solution and add it to the set S.
[0121] (2) Take the task at the front of the priority queue and calculate the task with T i To indicate, and remove the task T from the priority queue i , and then initialize an empty set S′.
[0122] 2-1. Take a solution from the set S, denoted as S k , and remove S from the set S k .
[0123] 2-1-1. Traverse all processor and execution frequency combinations, select one combination each time, record it as P j and f j,r , computing task T i The earliest completion time EFT (T i ,P k ,f k,r ), if EFT(Ti ,P k ,f k,r )≤subD(T i ), then a first task solution S is generated k ∪(T i ,P j , f j,r ), calculate the energy consumption and reliability of the first task solution and add it to the set S′, otherwise, do not perform any operation. Second-rate.
[0124] 2-1-2. If no solution to the first task is generated in step 2-1-1, select the task T that can be completed earliest. i Processor P n and execution frequency f n,max , generate the second task solution S k ∪(T i ,P n , f n,max ), calculate the energy consumption and reliability of the second task solution, and add it to the set S′.
[0125] 2-2. If the set S is not empty, jump to 2.1 to continue execution.
[0126] (3) Clear the set S, use the fast non-dominated sorting algorithm and crowding distance mechanism of NSGA-II to select K task solutions from the set S′, and add them to the set S.
[0127] (4) If the task priority queue is not empty, jump to step 2 to continue execution.
[0128] (5) Until K complete initial scheduling solutions are output.
[0129] On the basis of the above steps, the method further comprises the following steps:
[0130] 105. Performing reliability optimization operation on the initial scheduling scheme, the reliability optimization operation comprising: sorting the tasks in descending order according to the actual completion time of each task according to the initial scheduling scheme; selecting the tasks in front in turn, and after traversing the processor and execution frequency combination assigned to other tasks except the task, reallocating the processor and execution frequency combination with the same energy consumption and maximum reliability to the task; after traversing all tasks, generating an optimized scheduling scheme, and deleting other initial scheduling schemes dominated by the optimized scheduling scheme;
[0131] 106. Perform energy consumption optimization operations on the initial scheduling plan, and the energy consumption optimization operations include: according to the initial scheduling plan, sorting each task in descending order according to the actual completion time; selecting the tasks in front in turn, and after traversing the processor and execution frequency combinations assigned to other tasks except the task, reallocate the processor and execution frequency combination with the same reliability and minimized energy consumption to the task; after traversing all tasks, generate an optimized scheduling plan, and delete other initial scheduling plans dominated by the optimized scheduling plan.
[0132] In the above two steps, the initial scheduling scheme returned by the task allocation part is further optimized. For an initial scheduling scheme, the following two sub-methods can be used for optimization: reliability optimization sub-method and energy consumption optimization sub-method.
[0133] The purpose of the reliability optimization sub-method is to increase the reliability of the workflow application without increasing energy consumption. For each initial scheduling scheme generated in the previous stage, the tasks in the initial scheduling scheme are first sorted according to the actual completion time AFT, and the tasks with larger AFT are placed in front. Each task is taken out in order for processing. For task T i , without affecting the start of subsequent tasks, traverse all other processor and execution frequency combinations, and select the processor and execution frequency that does not increase the task energy consumption and can maximize the task reliability. After processing all tasks, calculate the reliability and energy consumption of the newly generated optimized scheduling plan, add the optimized scheduling plan to the scheduling plan set, and eliminate other initial scheduling plans dominated by the optimized scheduling plan.
[0134] The purpose of the energy consumption optimization sub-method is to reduce the energy consumption of the workflow application without reducing reliability. The execution process of this sub-method is similar to the reliability optimization sub-method mentioned above, except that when processing a task, all other processor and execution frequency combinations are traversed without affecting the start of subsequent tasks, and the processor and execution frequency that do not reduce the reliability of the task and can minimize the energy consumption of task execution are selected. After processing all tasks, the reliability and energy consumption of the newly generated optimized scheduling scheme are calculated, and the optimized scheduling scheme is added to the scheduling scheme set, and other initial scheduling schemes dominated by the optimized scheduling scheme are eliminated.
[0135] Through the above two steps, the initial scheduling plan can be optimized to obtain an optimized scheduling plan.
[0136] In addition, there is no strict execution order for step 105 and step 106. Those skilled in the art can choose which step to execute first according to actual conditions, and the expected technical effect can be achieved.
[0137] It should be noted that, for the sake of simplicity, the embodiments of the above method are described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action sequence. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the present invention.
[0138] In summary, the method for scheduling workflow energy consumption and reliability under deadline constraints provided by the embodiment of the present invention adopts a proportional deadline division method for the workflow optimization problem under deadline constraints, divides the task into sub-deadlines according to the task load and the structure of the workflow, and transforms the deadline constraint of the workflow into the sub-deadline limit of each task, which can better meet the deadline constraint of the workflow, making the deadline constraint easier to manage and effectively improving the scheduling success rate. At the same time, for the problem of simultaneous optimization of reliability and energy consumption in heterogeneous computing systems, a heuristic multi-objective optimization method is proposed, which mainly adopts the idea of non-domination and can quickly generate multiple scheduling schemes with different reliability and energy consumption by using multi-objective optimization technology. The scheduling scheme has a shorter execution time and the ability to generate a better Pareto front, laying a foundation for users to make intelligent decisions.
[0139] Reference Figure 3 As shown, based on the same inventive concept, an embodiment of the present invention provides a workflow energy consumption and reliability scheduling device under deadline constraints, the device mainly includes:
[0140] A task division unit 31 is used to divide the workflow into a plurality of task sets according to the hierarchical numbers of the tasks, wherein the task sets include at least one task with the same hierarchical number;
[0141] A first determining unit 32 is used to determine an extended sub-deadline of each task according to the initial sub-deadline of each task and the extended time of all task sets whose level number is greater than or equal to the task set to which the task belongs;
[0142] The second determining unit 33 is used to determine the priority of each task according to the level number and the extended sub-deadline of each task, and determine the task priority queue according to the priority of each task; wherein the task priority queue is arranged according to the scheduling order of each task;
[0143] The scheme generating unit 34 is used to generate a preset number of initial scheduling schemes with different energy consumption values and reliabilities according to the task priority queue, and the initial scheduling scheme is used to allocate a matching processor and execution frequency combination to each task in the workflow.
[0144] Preferably, the first determining unit 32 is specifically configured to:
[0145] According to the HEFT algorithm, determine the initial sub-deadline for each task;
[0146] Determine the expansion time of each task set according to the number of tasks and execution time in each task set;
[0147] The initial sub-deadline of each task is added to the sum of the extended times of all task sets whose level number is greater than or equal to the task set to which the task belongs, to determine the extended sub-deadline of each task.
[0148] Preferably, the first determining unit 32 is further specifically configured to:
[0149] The expansion time for each task set is determined according to the following formula:
[0150]
[0151] DS=T D -AFT(T exit ),
[0152]
[0153]
[0154] Among them, ST(n) is the task set BoT n Expansion time, BoT n ={T i |Level(T i )=n,1≤n≤Level(T entry )},Level(T i ) is task T i Level number, Level(T entry ) is the entry task T entry DS is the slack time of the workflow, MET(n) is the task set BoT n The maximum average execution time of all tasks in |BoT n |Assemble BoT for the task n The number of tasks in T D is the deadline constraint of the workflow, AFT(T exit ) is the earliest completion time of the workflow, that is, the deadline of the workflow. For task T i The average execution time, w i,k For task T i In the processor P k Execution time working at the maximum frequency, |P| is the number of processors in the heterogeneous distributed system.
[0155] Preferably, the first determining unit 32 is further specifically configured to:
[0156] The extended sub-deadline for each task is determined according to the following formula:
[0157]
[0158] Among them, subD(T i ) is task T i The extended sub-deadline period, AFT(T i ) is task T i The initial sub-cutoff period of is greater than or equal to task T i The sum of the expansion times of all task sets of the level number to which the task set belongs.
[0159] Preferably, the solution generating unit 34 is specifically used for:
[0160] Generate a plurality of corresponding task solutions for each task in the task priority queue in turn, and calculate the energy consumption value and reliability of each of the task solutions, wherein the task solutions are used to allocate processors and execution frequency combinations to the tasks;
[0161] According to the fast non-dominated sorting algorithm and the crowding distance mechanism, a preset number of task solutions are selected from multiple task solutions corresponding to each task;
[0162] According to a preset number of task solutions for each task, a preset number of initial scheduling schemes with different energy consumption values and reliabilities are generated, and the initial scheduling schemes are used to allocate a matching processor and execution frequency combination to each task in the workflow.
[0163] Preferably, the solution generating unit 34 is further specifically used for:
[0164] sequentially assigning a preset task solution to the tasks in front of the task priority queue, wherein the preset task solution is used to assign a preset processor and execution frequency combination to the tasks;
[0165] Calculating the earliest completion time of the task according to a preset processor and execution frequency combination;
[0166] Determine whether the earliest completion time of the task is less than or equal to the extended sub-deadline of the task;
[0167] If so, multiple first task solutions are generated based on the preset processor and execution frequency combination, and the energy consumption value and reliability of each of the first task solutions are calculated; otherwise, a second task solution is generated based on the processor and execution frequency combination that can complete the task earliest, and the energy consumption value and reliability of the second task solution are calculated.
[0168] Preferably, it also includes:
[0169] The first optimization unit 35 is used to perform a reliability optimization operation on the initial scheduling scheme, and the reliability optimization operation includes: according to the initial scheduling scheme, sorting the tasks in descending order according to the actual completion time of each task; selecting the tasks in front in turn, and after traversing the processors and execution frequency combinations assigned to other tasks except the task, reallocating the processor and execution frequency combination with the same energy consumption and maximum reliability to the task; after traversing all tasks, generating an optimized scheduling scheme, and deleting other initial scheduling schemes dominated by the optimized scheduling scheme;
[0170] The second optimization unit 36 is used to perform energy consumption optimization operations on the initial scheduling scheme, and the energy consumption optimization operation includes: according to the initial scheduling scheme, sorting the tasks in descending order according to the actual completion time of each task; selecting the tasks in front in turn, and after traversing the processors and execution frequency combinations assigned to other tasks except the task, reallocating the processors and execution frequency combinations with the same reliability and minimized energy consumption to the task; after traversing all tasks, generating an optimized scheduling scheme, and deleting other initial scheduling schemes dominated by the optimized scheduling scheme.
[0171] In summary, the workflow energy consumption and reliability scheduling device under deadline constraints provided by the embodiment of the present invention adopts a proportional deadline division method for the workflow optimization problem under deadline constraints, divides the task into sub-deadlines according to the task load and the structure of the workflow, and transforms the deadline constraint of the workflow into a sub-deadline limit for each task, which can better meet the deadline constraint of the workflow, making the deadline constraint easier to manage and effectively improving the scheduling success rate. At the same time, for the simultaneous optimization problem of reliability and energy consumption in heterogeneous computing systems, a heuristic multi-objective optimization method is proposed, which mainly adopts the idea of non-domination and can quickly generate multiple scheduling schemes with different reliability and energy consumption by using multi-objective optimization technology. The scheduling scheme has a shorter execution time and the ability to generate a better Pareto front end, laying a foundation for users to make intelligent decisions.
[0172] It should be noted that the workflow energy consumption and reliability scheduling device under deadline constraints provided in the embodiment of the present invention and the workflow energy consumption and reliability scheduling method under deadline constraints described in the aforementioned embodiment belong to the same technical concept, and its specific implementation process can refer to the description of the method steps in the aforementioned embodiment, which will not be repeated here.
[0173] It should be understood that the units included in the above-mentioned workflow energy consumption and reliability scheduling device under deadline constraints are only logical divisions based on the functions implemented by the device. In practical applications, the above-mentioned units can be superimposed or split. In addition, the functions implemented by the workflow energy consumption and reliability scheduling device under deadline constraints provided by this embodiment correspond one-to-one to the workflow energy consumption and reliability scheduling method under deadline constraints provided by the above-mentioned embodiment. The more detailed processing flow implemented by the device has been described in detail in the above-mentioned method embodiment and will not be described in detail here.
[0174] Reference Figure 4 As shown, based on the same inventive concept, an embodiment of the present invention provides a computing device, which mainly includes a processor 41 and a memory 42, wherein the memory 42 stores execution instructions. The processor 41 reads the execution instructions in the memory 42 to execute the steps described in any embodiment of the workflow energy consumption and reliability scheduling method under the deadline constraint. Alternatively, the processor 41 reads the execution instructions in the memory 42 to implement the functions of each unit in any embodiment of the workflow energy consumption and reliability scheduling device under the deadline constraint.
[0175] Figure 4 A schematic diagram of a structure of a computing device provided in an embodiment of the present invention, such as Figure 4 As shown, the computing device includes a processor 41 , a memory 42 and a transceiver 43 ; wherein the processor 41 , the memory 42 and the transceiver 43 are interconnected via a bus 44 .
[0176] The memory 42 is used to store programs; specifically, the programs may include program codes, and the program codes include computer operation instructions. The memory 42 may include volatile memory, such as random-access memory (RAM); the memory 42 may also include non-volatile memory, such as flash memory, hard disk drive (HDD) or solid-state drive (SSD); the memory 42 may also include a combination of the above-mentioned types of memory.
[0177] The memory 42 stores the following elements, executable modules or data structures, or a subset thereof, or an extended set thereof:
[0178] Operation instructions: include various operation instructions, used to implement various operations.
[0179] Operating system: includes various system programs used to implement various basic businesses and handle hardware-based tasks.
[0180] The bus 44 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0181] The processor 41 may be a central processing unit (CPU), a network processor (NP), or a combination of a CPU and a NP. It may also be a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD may be a complex programmable logic device (CPLD), a field programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
[0182] The embodiment of the present invention further provides a computer-readable storage medium, comprising computer-executable instructions, wherein the computer-executable instructions are used to execute the steps described in any embodiment of the above-mentioned method for scheduling workflow energy consumption and reliability under deadline constraints. Alternatively, the computer-executable instructions are used to execute the functions of each unit in the above-mentioned embodiment of the device for scheduling workflow energy consumption and reliability under deadline constraints.
[0183] Those skilled in the art will appreciate that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed, and the aforementioned storage medium includes various media that can store program codes, such as ROM, RAM, magnetic disk or optical disk.
[0184] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0185] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for scheduling workflow energy consumption and reliability under deadline constraints, characterized in that: include: According to the hierarchical number of the task, the workflow is divided into a plurality of task sets, wherein the task sets include at least one task with the same hierarchical number; According to the HEFT algorithm, the initial sub-deadline of each task is determined; the extension time of each task set is determined according to the following formula: DS=T D -AFT(T exit ), Among them, ST(n) is the task set BoT n Expansion time, BoT n ={T i |Level(T i )=n,1≤n≤Level(T entry )},Level(T i ) is task T i Level number, Level(T entry ) is the entry task T entry DS is the slack time of the workflow, MET(n) is the task set BoT n The maximum average execution time of all tasks in |BoT n |Assemble BoT for the task n The number of tasks in T D is the deadline constraint of the workflow, AFT(T exit ) is the earliest completion time of the workflow, that is, the deadline of the workflow. For task T i The average execution time, w i,k For task T i In the processor P k The execution time working at the maximum frequency, |P| is the number of processors in the heterogeneous distributed system; The extended sub-deadline for each task is determined according to the following formula: Among them, subD(T i ) is task T i The extended sub-deadline period, AFT(T i ) is task T i The initial sub-cutoff period of is greater than or equal to task T i The sum of the expansion times of all task sets of the level number of the task set to which it belongs; Determine the priority of each task according to the level number and the extended sub-deadline of each task, and determine the task priority queue according to the priority of each task; wherein the task priority queue is arranged according to the scheduling order of each task; A preset number of initial scheduling schemes with different energy consumption values and reliabilities are generated according to the task priority queue, and the initial scheduling scheme is used to allocate a matching processor and execution frequency combination to each task in the workflow.
2. The method according to claim 1, characterized in that The method of generating a preset number of initial scheduling schemes with different energy consumption values and reliabilities according to the task priority queue, wherein the initial scheduling scheme is used to assign a matching processor and execution frequency combination to each task in the workflow, includes: Generate a plurality of corresponding task solutions for each task in the task priority queue in turn, and calculate the energy consumption value and reliability of each of the task solutions, wherein the task solutions are used to assign matching processors and execution frequency combinations to the tasks; According to the fast non-dominated sorting algorithm and the crowding distance mechanism, a preset number of task solutions are selected from multiple task solutions corresponding to each task; According to a preset number of task solutions for each task, a preset number of initial scheduling schemes with different energy consumption values and reliabilities are generated, and the initial scheduling schemes are used to allocate a matching processor and execution frequency combination to each task in the workflow.
3. The method according to claim 2, characterized in that The step of sequentially generating a plurality of corresponding task solutions for each task in the task priority queue and calculating the energy consumption value and reliability of each of the task solutions, wherein the task solutions are used to allocate a processor and an execution frequency combination to the task, includes: Assigning a preset processor and execution frequency combination to the tasks in the task priority queue in order; If the earliest task completion time calculated by the preset processor and execution frequency combination is less than or equal to the extended sub-deadline of the task, a first task solution is generated according to the preset processor and execution frequency combination, and the energy consumption value and reliability of the first task solution are calculated; otherwise, another preset processor and execution frequency combination is assigned to the task in the task priority queue; If the earliest task completion time calculated by the preset processor and execution frequency combination is greater than the extended sub-deadline of the task, a second task solution is generated according to the processor and execution frequency combination that can complete the task earliest, and the energy consumption value and reliability of the second task solution are calculated.
4. The method according to any one of claims 1 to 3, characterized in that After generating a preset number of initial scheduling schemes with different energy consumption values and reliabilities according to the task priority queue, the method further includes: Performing a reliability optimization operation on the initial scheduling scheme, the reliability optimization operation comprising: sorting the tasks in descending order according to the actual completion time of each task according to the initial scheduling scheme; selecting the tasks in front in turn, and after traversing the processors and execution frequency combinations assigned to other tasks except the task, reallocating the processor and execution frequency combination with the same energy consumption and maximum reliability to the task; after traversing all tasks, generating an optimized scheduling scheme, and deleting other initial scheduling schemes dominated by the optimized scheduling scheme; The initial scheduling scheme is subjected to energy consumption optimization operation, and the energy consumption optimization operation includes: according to the initial scheduling scheme, each task is sorted in descending order according to its actual completion time; the tasks in front are selected in turn, and after traversing the processor and execution frequency combination assigned to other tasks except the task, the processor and execution frequency combination with the same reliability and minimized energy consumption is reallocated to the task; after traversing all tasks, an optimized scheduling scheme is generated, and other initial scheduling schemes dominated by the optimized scheduling scheme are deleted.
5. A workflow energy consumption and reliability scheduling device under deadline constraints, characterized in that: include: A task division unit, used to divide the workflow into a plurality of task sets according to the level numbers of the tasks, wherein the task sets include at least one task with the same level number; The first determination unit is used to determine the initial sub-deadline of each task according to the HEFT algorithm; and determine the extension time of each task set according to the following formula: DS=T D -AFT(T exit ), Among them, ST(n) is the task set BoT n Expansion time, BoT n ={T i |Level(T i )=n,1≤n≤Level(T entry )},Level(T i ) is task T i Level number, Level(T entry ) is the entry task T entry DS is the slack time of the workflow, MET(n) is the task set BoT n The maximum average execution time of all tasks in |BoT n |Assemble BoT for the task n The number of tasks in T D is the deadline constraint of the workflow, AFT(T exit ) is the earliest completion time of the workflow, that is, the deadline of the workflow. For task T i The average execution time, w i,k For task T i In the processor P k The execution time working at the maximum frequency, |P| is the number of processors in the heterogeneous distributed system; The extended sub-deadline for each task is determined according to the following formula: Among them, subD(T i ) is task T i The extended sub-deadline period, AFT(T i ) is task T i The initial sub-cutoff period of is greater than or equal to task T i The sum of the expansion times of all task sets of the level number of the task set to which it belongs; The second determining unit is used to determine the priority of each task according to the level number and the extended sub-deadline of each task, and determine the task priority queue according to the priority of each task; wherein the task priority queue is arranged according to the scheduling order of each task; A scheme generating unit is used to generate a preset number of initial scheduling schemes with different energy consumption values and reliabilities according to the task priority queue, and the initial scheduling scheme is used to allocate a matching processor and execution frequency combination to each task in the workflow.
6. A computing device, characterized in that The method comprises a processor and a memory, wherein the memory stores execution instructions, and the processor reads the execution instructions in the memory to execute the steps in the method for scheduling energy consumption and reliability of a workflow under deadline constraints as claimed in any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that: The method comprises computer-executable instructions, wherein the computer-executable instructions are used to execute the steps in the method for scheduling energy consumption and reliability of a workflow under deadline constraints as claimed in any one of claims 1 to 4.
Citation Information
Patent Citations
Frequency conversion method for minimizing heterogeneous private cloud computing resource energy consumption
CN109976890A
Scientific workflow scheduling method for deadline constraints in cloud environment
CN110609736A