A task execution method based on energy optimization for a multi-core heterogeneous NoC platform
By introducing task feature description and dynamic voltage/frequency regulation technology on a multi-core NoC platform, and combining task replication, an energy optimization model is constructed, which solves the problems of communication energy consumption and reliability, and achieves task scheduling that balances energy balance and real-time performance.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-08
- Publication Date
- 2026-03-17
AI Technical Summary
Existing technologies on multi-core NoC platforms have failed to effectively consider communication energy consumption and reliability requirements, resulting in high computational complexity and difficulty in achieving both energy optimization and real-time performance.
By introducing tuples to describe task characteristics and combining dynamic voltage/frequency regulation and task replication techniques, a task deployment problem is constructed. Mixed-integer linear programming and heuristic algorithms are used to reduce computational complexity and optimize task scheduling.
While meeting the requirements of system real-time performance and reliability, the system achieves balanced energy consumption, significantly reduces solution time, and improves the scalability of task deployment methods.
Smart Images

Figure CN115328628B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of task scheduling technology for multi-core NoC platforms, and mainly relates to a task execution method for multi-core heterogeneous NoC platforms based on energy optimization. Background Technology
[0002] In the field of embedded systems, with the emergence of data-intensive applications and their increasing performance requirements, such as streaming media, image recognition, and vehicle control, embedded systems face the challenge of higher processing power. The increase in the number of cores improves the chip's computing power, but also places greater demands on communication resources. NoC (Novel Core Architecture) is highly flexible, scalable, energy-efficient, and possesses powerful parallel processing capabilities, making it a feasible solution to the on-chip communication challenges and is developing towards heterogeneity. However, the performance gains in power and packaging density are offset by the reliability of on-chip communication elements and processing components. Therefore, researching the energy-optimized scheduling problem of tasks on multi-core heterogeneous NoC platforms, while meeting real-time performance and reliability requirements, has significant practical implications.
[0003] For real-time systems, researchers widely use dynamic voltage / frequency regulation techniques to optimize system power consumption. Currently, significant progress has been made in energy-optimized real-time task scheduling research, but the following issues remain: 1) Most energy-optimized task scheduling methods are based on multi-core processor platforms with data buses, considering only computational energy consumption while neglecting communication energy consumption. However, communication energy consumption is significant on NoC platforms; 2) Task scheduling research on multi-core NoC platforms generally only considers energy optimization objectives, rarely simultaneously considering reliability requirements; 3) For heterogeneous multi-core NoC platforms, the task deployment problem based on energy optimization and reliability design has high computational complexity, requiring the design of low-computational-complexity algorithms to improve system real-time performance and scalability. Summary of the Invention
[0004] This invention addresses the problems existing in the prior art by providing an energy-optimized task execution method for a multi-core heterogeneous NoC platform. It describes the characteristics of each precise computational task using a tuple, including the task execution cycle, task deadline, task relevance matrix transformed from a directed acyclic graph (DAG), and communication data size. Based on a multi-core heterogeneous NoC platform, it considers both computational and communication energy consumption, and combines dynamic voltage / frequency regulation and task replication technologies to model task execution reliability. By introducing constraints on task allocation, path selection, frequency selection, task execution reliability, task execution order, task non-preemptibility, and real-time performance, it constructs a task deployment problem with balanced energy as the objective. It uses the introduction of auxiliary variables and the addition of linearization constraints to equate the mixed-integer nonlinear programming (MINLP) problem to a mixed-integer linear programming (MILP) problem, and finds the optimal solution through optimization methods. Alternatively, based on the task deployment problem structure, the original problem can be decomposed into three sub-problems: task mapping and scheduling, frequency selection and task replication, and multi-path routing, which are solved sequentially. A low-computational-complexity heuristic algorithm is designed, significantly reducing the solution time and improving the scalability of this task deployment method.
[0005] To achieve the above objectives, the technical solution adopted by the present invention is: a task execution method for a multi-core heterogeneous NoC platform based on energy optimization, comprising the following steps:
[0006] S1, Feature Description: A tuple describes the features of each precise computational task, including the task execution cycle, task deadline, task relevance matrix transformed from the directed acyclic graph (DAG), and communication data size; the tuple can be represented as a quadruple {C}. i D i p ij s ij To describe it, where C i For task τ i Worst-case execution cycle; D i For task τ i The relative deadline; p ij The task relevance matrix p = [p ij ] M×M The (i, j)th element in s; ij The size of the communication data;
[0007] S2, Task Execution Modeling: Based on a multi-core heterogeneous NoC platform, considering both computational and communication energy consumption, and combining dynamic voltage / frequency regulation and task replication technologies, the reliability of task execution is modeled; the objective function of the model is to balance system energy consumption, i.e.:
[0008] P1:
[0009] st(1)-(9)
[0010] in, For processor θ k The communication energy consumed; For processor θ k Computational energy consumed; x is the task mapping optimization variable; c is the path selection optimization variable; y is the frequency selection optimization variable; h is the task existence index optimization variable; u is the task execution order optimization variable; t s The task start time is optimized as a variable; constraints are introduced into the established objective function model. The constraints (1)-(7) include task allocation constraints, path selection constraints, frequency selection constraints, task existence constraints, task execution reliability constraints, task execution order constraints, and task non-preemptibility constraints. (8) and (9) are real-time constraints.
[0011] S3, Transformation of Mixed Integer Nonlinear Programming Problem or Solving Using Heuristic Algorithms: The heuristic algorithm solution is as follows: For the target task problem, the original problem is decomposed into three sub-problems: task mapping and scheduling, frequency selection and task replication, and multi-path routing, which are solved sequentially. First, tasks are temporarily and evenly mapped to various heterogeneous processors. Second, the frequency levels on the processors are traversed to obtain the frequency selection scheme that saves the most computational energy while satisfying reliability and time constraints. For tasks that cannot meet the constraints, feedback is given to the first step to reallocate processors with higher frequency levels. Finally, the multi-path routing is traversed to obtain the path selection scheme with the optimal communication energy consumption.
[0012] Compared with the prior art, the technical solution of the present invention has the following beneficial effects: 1) The present invention proposes a method to perform task scheduling by combining DVFS and task replication technology on the basis of satisfying the real-time performance and reliability of the system, so as to achieve the goal of balancing system energy consumption; 2) For the structure of the original task deployment problem, a new decomposition-based heuristic greedy algorithm is proposed, which significantly reduces the solution time of the problem and improves the scalability of the task deployment method. Attached Figure Description
[0013] Figure 1 This is a flowchart illustrating the creative concept and solution steps of the present invention.
[0014] Figure 2 This is the task graph obtained by expanding the task after task copying in the task directed acyclic graph and optimization method used in the embodiments of the present invention;
[0015] Figure 3 This is a schematic diagram of the task execution results obtained by using the method of this invention to optimize the solution on a heterogeneous NoC platform with a task quantity M=14 in the experimental example of this invention.
[0016] Figure 4 This is an experimental example of the present invention with the number of tasks configured M=14. The method of the present invention is used to optimize the solution on a heterogeneous NoC platform. The target values of the system are compared when single-path routing and multi-path routing are used respectively during task execution.
[0017] Figure 5 This is an experimental example of the present invention with the number of tasks M=14. The method of the present invention is used to optimize the solution on a heterogeneous NoC platform. The target values of the system are compared when task-level DVFS technology and processor-level DVFS technology are used respectively during task execution.
[0018] Figure 6 This is an experimental example of the present invention with the number of tasks M=14. The method of the present invention is used to optimize the solution on a heterogeneous NoC platform. The target values of the system are compared under different reliability thresholds when task replication is combined with DVFS technology and when task replication is not considered.
[0019] Figure 7 This is an experimental example of the present invention with the number of tasks configured as M=14. The method of the present invention is used to optimize the solution on a heterogeneous NoC platform. The target values of the system are compared when task replication and DVFS technology are combined and when all tasks are replicated during task execution.
[0020] Figure 8 This is an experimental example of the present invention with the number of tasks configured as M=14. The heuristic algorithm proposed in step S5 is used to solve the problem on a heterogeneous NoC platform. The comparison chart shows the target value of the system when a feedback loop is added and when no feedback loop is added during task execution.
[0021] Figure 9 This is a comparison chart of the heuristic algorithm proposed in step S5 and the search for the optimal solution objective value in the experimental example of this invention with the number of tasks M=14 on a heterogeneous NoC platform;
[0022] Figure 10 This is a comparison chart showing the algorithm runtime of the heuristic algorithm proposed in step S5 and the search for the optimal solution on a heterogeneous NoC platform when the number of tasks M = 9, 14, and 16 is configured in the experimental examples of this invention. Detailed Implementation
[0023] The present invention will be further illustrated below with reference to the accompanying drawings and specific embodiments. It should be understood that the following specific embodiments are for illustrative purposes only and are not intended to limit the scope of the invention.
[0024] A task execution method for a multi-core heterogeneous NoC platform based on energy optimization includes the following steps:
[0025] Step S1, Feature Description:
[0026] M related periodic tasks {τ1, τ2, ..., τ...} M The task set that makes up the real-time system is described by a directed acyclic graph G(V, E), where vertices V represent tasks to be executed and directed edges E represent the correlations between tasks. The task set is released at time 0 and shares a scheduling period H. Each task can be represented by a quadruple {C} i D i p ij s ij To describe it, where C i For task τ i Worst Case Execution Cycles (WCEC); D i For task τ i The relative deadline; p ij The task relevance matrix p = [p ij ] M×M The (i, j)th element in the task τ, if task τ i and τ j It has correlation, τ i Prior to τ j And τ j It is the distance τ i In the most recent task, p ij =1, otherwise p ij =0; when τ i Upon completion, it will be used for its successor task τ j (p ij =1) Generate a set of size s ij The data is in bits.
[0027] Step S2, Task execution modeling:
[0028] The multi-core heterogeneous NoC platform has N heterogeneous independent processors {θ1, θ2, ..., θ...} N}, where each processor θ k Both support dynamic voltage / frequency regulation technology and can be used in l k A set of discrete voltage / frequency pairs Running on, where l k For processor θ k The number of voltage frequency levels. When task τ i Mapped to processor θ k Above, and in voltage frequency level (v kl f kl When executed, its computation time is Calculated energy consumption is The NoC platform employs a basic two-dimensional mesh topology with multiple data routing paths, considering the path with minimum energy consumption and minimum transmission time delay. Weights w are used to determine the path. ij The energy consumption (time) of data transmission is represented by the path that minimizes transmission energy (time). This is transformed into finding the shortest path problem, which can be solved using algorithms such as Dijkstra's algorithm. This results in an energy matrix e = [e...]. βγkρ ] N×N×N×P and a time matrix t = [t βγρ ] N×N×P , representing the processor energy consumption and time consumption when task data is transferred between processors via different paths, respectively. Where e βγkρ Defined as unit data passing through the ρ-th path from θ β Routing to θ γ processor θ k The energy consumed, t βγρ Defined as data being transported from θ via the ρ-th path. β Transmit to θ γ The required time. When two related tasks are mapped to the same processor, the communication energy (time) is zero. Based on a transient fault model satisfying a Poisson distribution, when task τ... i In processor θ k Above the voltage / frequency level (V kl f kl The reliability during execution is Where λ k,max Indicates processor θ k The failure rate per unit time when operating at maximum operating frequency, where d is a positive constant representing the sensitivity of the failure rate to voltage scaling. Representing processor θ k The maximum and minimum operating frequencies. When task τ i The reliability is below its threshold R th To enhance reliability, the task will be replicated. This step introduces optimization variables such as task mapping, path selection, frequency selection, task existence index, task execution order, and task start time: 1) When task τ... i Mapped to processor θ k When above, the binary variable x ik =1, otherwise x ik =0; 2) When data is transmitted from processor θ via the ρth path β Routing to θ γ At that time, c βγρ =1, otherwise c βγρ =0; 3) When task τ i Assigned to processor θ kAbove, and in voltage frequency level (v kl f kl During execution, y ikl =1, otherwise y ikl =0; 4) When task τ i When it exists, h i =1, otherwise h i =0; 5) When task τ i Prior to task τ j During execution, u ij =1, otherwise u ij =0; 6) Variable It is a continuous variable, representing the task τ. i The start time. Introduce sets N = {1, ..., N}, M = {1, ..., M}, M′ = {1, ..., 2M}, L k ={1, ..., l k}, P = {1, 2} for simplification. To describe the task execution reliability design method on an energy-optimized multi-core heterogeneous NoC platform as described in claim 1, the following constraints need to be introduced:
[0029] (1) Task allocation constraints: Without considering task migration techniques, each task can only be executed on one processor. Therefore, the following constraints are introduced in terms of task allocation:
[0030]
[0031] (2) Path selection constraint: For communication between any two processors, there are two paths: the path with the lowest energy consumption and the path with the shortest time. When a task is transferred between different processors, only one path can be selected. Therefore, the following constraint is introduced regarding path selection:
[0032]
[0033] (3) Frequency selection constraint: Each task can only be executed using a given voltage / frequency level. Therefore, the following constraint is introduced in terms of frequency selection:
[0034]
[0035] (4) Task execution reliability constraint: when τ i and Let τ represent the original task and its copying task, respectively. i and τ i+M They have the same execution cycle and deadline, as well as correlation relationships. Consider r. ikl and y ikl Without considering task duplication, the task The reliability is r i =∑ k x ik (∑ l y ikl r ikl ). Copying task τ i+M Whether it exists depends on the original task τ i reliability r i To represent task τ i Whether it exists is determined by introducing a binary decision variable h. i Because the original task always exists, If r i ≥R th This indicates that the reliability of the original task has met the requirements, therefore there is no need to copy task τ. i , i.e. h i+M =0; otherwise, task τ needs to be copied. i , i.e. h i+M =1. The above judgment can be written as the following constraint:
[0036]
[0037] Task The reliability after replication is r. i ′=1-(1-h i r i (1-h) i+M r i+M Therefore, the following constraints are introduced regarding the reliability of task execution:
[0038]
[0039] (5) Task execution order constraint: a task τ i Only after receiving all the communication from the predecessor task to τ i Only after receiving input data can execution begin. When a task completes execution, its output data can be transmitted to all its successor tasks. To avoid communication collisions, the router will receive data sent by other routers sequentially; therefore, the router receives and executes task τ... i The communication time required for all the necessary data is
[0040] and Defined as task τ i The start and end times, where When task τ i It exists and is assigned to processor θ k Above, and in voltage frequency level (v kl fkl When executed, its computation time is Therefore, task τ i The calculation time is For the relevant task τ i and τ j Their start and end times range as follows:
[0041]
[0042] If p ij =1, that is, τ i Prior to τ j And τ j It is the distance τ i Our recent task has yielded... In all other cases, equation (6) holds true permanently.
[0043] (6) Non-preemptive task constraint: When an independent task τ i and τ j (p ij When tasks are assigned to the same processor (=0), their execution order must be determined because a processor can only execute one task at a time. Therefore, the non-preemptive constraint for tasks is as follows:
[0044]
[0045] If τ i and τ j Assigned to the same processor, for example x ik =x jk Equation (7) is only meaningful when x = 1; otherwise, equation (7) always holds true. ik =x jk If u = 1, then ij =1, that is, τ i Prior to τ j Execute, then Otherwise, u ij When =1, equation (7) is always satisfied.
[0046] (7) Real-time constraints: Due to the fact that each task τ i The execution time should be less than the relative deadline D. i Furthermore, all tasks must be completed within the scheduling period H; therefore, the following time constraints are imposed:
[0047]
[0048]
[0049] The deployment problem of this task has the objective function of balancing system energy consumption. However, based on the NoC platform, both communication and computational energy consumption of the task need to be considered. If there are related tasks τ... i and τ j They are assigned to different processors, such as θ β and θ β Then processor θ k The ρ-th path will take a size of s ij Task data from θ β Transmit to θ β The energy consumed is Based on this, copy the task h i Taking this into account, we obtain the processor θ. k The communication energy consumed is
[0050] On the other hand, regarding computational energy, in processor θ k Above (v) kl f kl ) Execute task τ i The required energy is Therefore, consider task allocation x ik , to obtain in processor θ k The computational energy consumed is Task τ i The computational energy consumption is Therefore, in order to balance processor energy consumption, the task deployment problem can be formulated as the following problem model:
[0051] P1:
[0052] st(1)-(9)
[0053] Step S3, transform the mixed-integer nonlinear programming problem into a heuristic algorithm:
[0054] The task deployment problem model established in step S2 is subjected to equivalent linearization. In problem model P1, there are nonlinear terms involving if-else structure judgments and multiplication of integer variables. Therefore, optimization problem (10) is a mixed integer nonlinear programming problem. Step (4) converts problem (10) into a mixed integer linear programming problem by adding auxiliary variables and linearization constraints. The specific method is as follows:
[0055] A. Since formula (4) is a nonlinear constraint of if-else structure, in order to linearize it, the following lemma is first introduced:
[0056] Lemma 1: Suppose b is a binary variable, and x is a variable with the range 0 ≤ x ≤ s. The following comparisons apply: 1) 2) Through constraints Let be the case where s1≤1 is a constant and σ is a sufficiently small positive number.
[0057] Proof 1: Let If x ≥ s1, then b2 ≥ 1, and since 0 < x - (s1 - σ) < s, then 0 < b1 < 1. Considering the values of b1 and b2, and b ∈ {0, 1}, we can obtain b = 0. On the other hand, if x < s1, then b2 < 1 and b1 < 0, therefore we can obtain b = 1.
[0058] According to Lemma 1, let r i and h i+M The relationship can be linearly represented as:
[0059]
[0060] B. Due to the presence of nonlinear terms h in constraints (5)-(8) involving the multiplication of integer variables. i y ikl x ik h i y ikl h i h j x iβ x jγ Then, Lemma 2 is introduced to linearize the above nonlinear terms.
[0061] Lemma 2: Suppose x, y, z are 0-1 variables. The nonlinear term z = xy can be replaced by the following constraints: zx ≤ 0, zy ≤ 0, x + yz ≤ 1.
[0062] Proof 2: The inequalities z ≤ x and z ≤ y ensure that z = 0 when x = 0 or y = 0. On the other hand, z ≥ x + y - 1 ensures that z = 1 when x = 1 and y = 1.
[0063] Based on Lemma 2, we introduce an auxiliary variable a. ikl and b ikl To replace the nonlinear term h respectively i y ikl and x ik h i y ikl (i.e. x) ik a ikl Add the following constraints:
[0064]
[0065]
[0066] For the nonlinear term h i h j x iβ x jγ c βγρ First, we introduce the linearization auxiliary variable d. ij And add the following constraints to replace the nonlinear term h i h j :
[0067]
[0068] Similarly, a linearization auxiliary variable g is introduced. iβjγ and the following constraints to replace the nonlinear term x iβ x jγ :
[0069]
[0070] Based on this, a linearization auxiliary variable e is introduced. iβjγρ and the following constraints to replace the nonlinear term g iβjγ c βγρ :
[0071]
[0072] Finally, a linearization auxiliary variable o is introduced. iβjγρ and the following constraints to replace the nonlinear term d ij e iβjγρ :
[0073]
[0074] With the help of the linearization auxiliary variables above, problem P1 can be linearized as follows:
[0075] P2:
[0076] st(1)-(3), (5)-(9), (11)-(17)
[0077] Since P2 is a MILP problem, it can be solved by optimizing the solver, such as gurobi, but the optimization solution takes a long time.
[0078] Besides equivalent linearization, a heuristic algorithm can also be used to solve the problem. Based on the optimization problem structure in step S2, a new decomposition-based heuristic algorithm is proposed, which significantly reduces the solution time and improves the scalability of the task deployment method. The original task deployment problem can be decomposed into three sub-problems: 1) task allocation and scheduling; 2) frequency selection and task replication; 3) multipath selection. Solving these three sub-problems sequentially yields an energy-optimized task deployment scheme. The specific steps are as follows:
[0079] (3.1) Task allocation and scheduling;
[0080] In this step, the task allocation optimization variable x needs to be determined. ik Task order optimization variable u ij and task start time optimization variables To balance processor energy consumption under the constraints of task execution order and non-preemption, the task mapping and scheduling problem can be expressed as follows:
[0081] P3:
[0082] st(1), (6), (7), (9)
[0083] because and Frequency-selective y ikl and task copy h i The influence of y ikl and h i It is currently unknown, therefore, for the time being... and Using processor θ respectively k Average computational energy and task τ i The average computation time is used instead. That is... They represent the time when task τ i Mapped to processor θ k When using the above, the average calculation time and average calculation energy of all voltage frequency levels are used, L k For processor θ k The total number of voltage / frequency levels. This leads to the following formula: Once the frequency is selected, y ikl and task copy h i Sure, and The value will be updated accordingly.
[0084] because and Path selection c βγρ The influence of, and c βγρIt is currently unknown, therefore, for the time being... and Subject to processor θ k Average communication energy and task τ i Instead, let the average communication time of task τ be used, assuming task τ i Mapped to processor θ k superior, Where M1 is task τ i The number of predecessor tasks, considering the worst-case scenario where all predecessor tasks need to be copied, M2 = 2M1 is the total number of predecessor tasks and their copying tasks, θ β The processor mapped to the predecessor task. Once path selection c βγρ Sure, and The value will be updated accordingly.
[0085] Based on the structure of problem (12), a greedy algorithm is used to solve the problem, which consists of the following three steps:
[0086] The first step is to determine the traversal order of tasks in the algorithm by task layering. Since the in-degree and out-degree of all tasks can be calculated, the tasks are divided into multiple layers based on their in-degree and out-degree. This satisfies both the task execution order constraint (6) and the task non-preemption constraint (7). The specific method is as follows:
[0087] (1) Find the entry task based on the directed acyclic graph, form the task set of the first layer, and mark it as layer0;
[0088] (2) Loop through the tasks in layer0, and determine the layer level of each subsequent task in turn by recursion, and update the determined task layer level accordingly.
[0089] (3) Tasks within the same layer are sorted in descending order based on their execution cycle length. If tasks within the same layer have the same execution cycle, they are sorted randomly.
[0090] (4) In this way, sort the tasks of the next level according to (3), and sort the tasks from the smallest to the largest according to the hierarchical level, until all tasks are marked as completed.
[0091] The second step is to eliminate allocation schemes that do not meet the system's real-time constraints. Following the task traversal order obtained in the first step, iteratively allocate tasks τ. i Allocate a processor θ k If the real-time constraint is not met, this scheme will be excluded and the task will be reassigned.
[0092] The third step is to use a greedy algorithm to determine the task mapping optimization variable x.ik The energy consumption of tasks that meet real-time constraints is calculated. To achieve the goal of balancing processor energy consumption, a task allocation scheme that minimizes the increase in computing and communication energy consumption is selected.
[0093] (3.2) Frequency selection and task replication;
[0094] Based on the results in (3.1), the frequency selection optimization variable y is determined. ikl And the task has an index optimization variable h i Due to task copying h i Frequency selection y ikl It is determined, so according to the analysis in (4), y ikl and h i Joint optimization is necessary. Because y ikl and h i Mainly affects the computation time of the task and calculating energy To minimize computational energy, the frequency selection and task replication problem can be formulated as follows:
[0095] P4:
[0096] st(3)-(5), (8), (9)
[0097] The first step is to verify whether the task allocation results satisfy the relative deadline constraints. Following the task allocation order obtained from the task hierarchy in (3.1), the processors θ are iteratively assigned... k Frequency levels Assigned to task τ i During this process, if the task relative deadline constraint (8) cannot be met, then this frequency selection scheme is excluded. If none of the frequencies on the processor can meet the deadline constraint, then return (3.1) to reassign a processor with a higher frequency for the task.
[0098] The second step is to use a greedy algorithm to determine the frequency and select the optimization variable y. ikl Calculate the computational energy consumption of a task that meets real-time constraints, and select the frequency scheme that minimizes computational energy consumption, thereby achieving the goal of minimizing processor energy consumption.
[0099] The third step is to determine if the replication task exists. This is based on the frequency selection result, i.e., the original task τ is known. i The frequency allocation can be determined by (4) whether the replication task exists, i.e., h i+M The value of .
[0100] The fourth step is to jointly optimize the frequency allocation for the replica task and its original task. The frequency is reallocated for the task replica and its corresponding original task to minimize the sum of their computational energy while simultaneously satisfying reliability and real-time constraints.
[0101] (3.3) Multiple path selection;
[0102] The last subproblem determines the path selection optimization variable c. βγρ Because of c βγρ It does not affect the calculation time. and calculating energy It only affects communication time. and communication energy Therefore, only communication time and energy are updated in the subproblem. To balance processor energy consumption while meeting real-time constraints, the path selection problem is formulated as follows:
[0103] P5:
[0104] st(2), (9)
[0105] Use a greedy algorithm to determine the path selection optimization variable c βγρ For each pair of processors (θ) β θ γ Introduce a path selection index Q[β][γ]. Q[β][γ] = ρ represents data from path θ via the ρ-th path. β Transmit to θ γ For each pair of processors (θ) β θ γ The routing path is determined iteratively. The purpose is to determine θ. β and θ γ Find a path that minimizes the incremental communication energy between these processors. In this process, a real-time constraint (9) should be satisfied so that it does not exceed the scheduling cycle.
[0106] Based on the above problems, it is possible to solve for the task mapping optimization variable x. ik Path selection optimization variable c βγρ Frequency selection optimization variable y ikl The task has an index optimization variable h. i Task execution order optimization variable u ij Task start time optimization variables This leads to a task execution reliability design scheme based on energy optimization on a multi-core heterogeneous NoC platform.
[0107] Experimental example:
[0108] To measure the reliability of this method, it was experimentally tested. The experimental environment for this invention was Matlab R2021a, and the solver used was the gurobi solver; the technical parameters of the 70-nanometer processor were also used. Figure 1 A flowchart illustrating the steps involved in creating the approach and solution of this invention. Figures 2 to 10 The figure shows the experimental results of this invention.
[0109] Figure 2 This example uses a directed acyclic graph of tasks and a task graph obtained by expanding the task after copying. Figure 2 It can be seen that the correlation between the copying tasks is the same as that of the original tasks, and the copying tasks avoid task redundancy.
[0110] Figure 3 This is a schematic diagram of the task execution results obtained by optimizing the method of this invention on a heterogeneous NoC platform with a task quantity M=14 in the experimental example of this invention. The number in the upper left corner represents the voltage frequency level used for task execution, where τ 17 , τ 24 , τ 26 As shown in the figure, the method of the present invention can effectively achieve the goals of task scheduling and balanced processor power consumption under time and reliability constraints.
[0111] Figure 4 This is a comparison of the system's target values when using single-path routing and multi-path routing respectively, with the number of tasks configured M=14 in this embodiment of the invention, and the optimization solution applied to a heterogeneous NoC platform. As can be seen from the figure, the multi-path scheme adopted in this invention can select a better path, further improving energy efficiency.
[0112] Figure 5 This is a comparison of the target values of the system when the number of tasks M=14 is configured in this embodiment of the invention, and the optimization solution is obtained using the method of this invention on a heterogeneous NoC platform. The comparison shows that the target value is lower and the flexibility and energy efficiency are higher under the same scheduling cycle.
[0113] Figure 6This is a comparison graph showing the system's target values under different reliability thresholds, with the following configuration: M=14 tasks in this embodiment of the invention, optimized using the method of this invention on a heterogeneous NoC platform. The graph compares the target values with and without task replication, using a combination of task replication and DVFS technology during task execution, respectively. The horizontal axis represents the reliability threshold, and the vertical axis represents the target value. As can be seen from the graph, without the task replication and DVFS combination scheme of this invention, even using the highest voltage and frequency levels cannot meet the reliability requirements. However, with the task replication scheme, each task meets the reliability requirements, and the target value is lower and more energy-efficient.
[0114] Figure 7 This is a comparison of the system's target values when the number of tasks M=14 is configured in an embodiment of the present invention, and the method of the present invention is used for optimization on a heterogeneous NoC platform. The graph compares the target values when task deployment is performed using a combination of task replication and DVFS technology versus when all tasks are replicated. The horizontal axis represents the scheduling period, and the vertical axis represents the target value. As can be seen from the graph, without the task replication and DVFS combination scheme of the present invention, replicating all tasks doubles the number of tasks and significantly increases the correlation between tasks. This consumes more energy under the same scheduling period and makes it difficult to find a feasible solution within a shorter scheduling period. However, by using the partial task replication scheme, the number of tasks to be executed is reduced, saving energy.
[0115] Figure 8 This is a comparison chart of the system's target values when the number of tasks M=14 is configured in this embodiment of the invention, and the heuristic algorithm proposed in step S5 of this invention is used to solve the problem on a heterogeneous NoC platform. The chart shows the difference between the system's target values with and without a feedback loop during task execution. As can be seen from the chart, the feedback loop added in this invention expands the feasible region.
[0116] Figure 9 This is a comparison chart showing the application of the proposed heuristic algorithm and the determination of the optimal solution objective value on a heterogeneous NoC platform with a task quantity M=14 according to an embodiment of the present invention. As can be seen from the chart, the heuristic algorithm proposed in this invention provides a suboptimal solution, which has higher but acceptable energy consumption than the optimal solution. However, as the scheduling cycle increases, the objective value obtained by the heuristic algorithm proposed in this invention becomes almost identical to the optimal solution.
[0117] Figure 10 This is a comparison of the running time of the proposed heuristic algorithm and the optimal solution search on a heterogeneous NoC platform when configuring the number of tasks M=9, 14, and 16 according to embodiments of the present invention. As can be seen from the figure, the heuristic algorithm significantly improves the running speed of the task scheduling algorithm at the cost of reducing the quality of the system solution to some extent.
[0118] It should be noted that the above content merely illustrates the technical concept of the present invention and should not be construed as limiting the scope of protection of the present invention. For those skilled in the art, various improvements and modifications can be made without departing from the principle of the present invention, and all such improvements and modifications fall within the scope of protection of the claims of the present invention.
Claims
1. A method for task execution based on energy optimization for multi-core heterogeneous NoC platform, characterized in that, Comprising the following steps: S1, feature description: the feature of each precise computation task is described by a tuple, including task execution period, task deadline, task dependency matrix converted by task graph described by directed acyclic graph and communication data size; the tuple can be described by four-tuple {C i , D i , p ij , s ij}, wherein, C i is the worst case execution period of task τ i ; D i is the relative deadline of task τ i ; p ij is the (i,j) element in task dependency matrix p=[p ij ] M×M ; s ij is the communication data size; S2, task execution modeling: based on a multi-core heterogeneous NoC platform, while considering the computing energy consumption and the communication energy consumption, combining the dynamic voltage / frequency adjustment technology and the task replication technology, the task execution reliability is modeled; the objective function of the model is to balance the system energy consumption, that is: P1: s.t. (1)-(9) wherein, is a processor θ k consumed communication energy; is a processor θ k consumed computation energy;x is a task mapping optimization variable; c is a path selection optimization variable; y is a frequency selection optimization variable; h is a task existence index optimization variable; u is a task execution order optimization variable; t s task start time optimization variable; constraints are introduced to the built objective function model, the constraints (1)-(7) include task allocation constraint, path selection constraint, frequency selection constraint, task existence constraint, task execution reliability constraint, task execution order constraint, task non-preemptibility constraint, (8) and (9) are real-time constraints; S3, mixed integer nonlinear programming problem transformation or heuristic algorithm solving: the mixed integer nonlinear programming problem in step S2 is transformed into a linear problem or solved by a heuristic algorithm, and the heuristic algorithm solving specifically comprises the following steps: for the problem of the target task, the original problem is decomposed into three sub-problems of task mapping and scheduling, frequency selection and task replication, and multi-path routing which are sequentially solved; first, the tasks are temporarily evenly mapped to each heterogeneous processor; second, the frequency levels of the processors are traversed to obtain a frequency selection scheme that saves the computing energy consumption under the reliability and time constraints; for the tasks that cannot meet the constraints, the processors with higher frequency levels are fed back to the first step for re-distribution; finally, the multi-path routing is traversed to obtain a path selection scheme that optimizes the communication energy consumption.
2. The energy-optimization-based task execution method for a multi-core heterogeneous NoC platform according to claim 1, characterized in that: For the mixed integer nonlinear programming problem in step S2, the heuristic algorithm in step S3 specifically comprises the following steps: (3.1) task mapping and scheduling The objective function model in (3.1) is to balance the system energy consumption under the task execution order and the task non-preemptive constraints, that is: P3: s.t. (1), (6), (7), (9) wherein, and using a processor θ k average computation energy and average communication energy temporary values are replaced; x is a task mapping optimization variable; u is a task execution order optimization variable; t s task start time optimization variable; (3.1) is solved by using a greedy algorithm, which specifically comprises the following three steps: First, the traversal order of the tasks in the algorithm is determined by task layering; the in-degree and out-degree of the tasks are calculated, and the tasks are divided into multiple layers to meet the task execution order constraint and the task non-preemptive constraint; Second, eliminate the allocation scheme which does not satisfy the real-time constraint of the system; according to the task traversal order obtained in the first step, iteratively allocate a task τ i to a processor θ k , if the real-time constraint is not satisfied, eliminate this scheme and re-allocate the tasks. Thirdly, the task mapping optimization variable x is determined by using a greedy algorithm ik ; calculating the energy consumption of the tasks satisfying the real-time constraint, and selecting a task allocation scheme that minimizes the increment of the computing energy consumption and the communication energy consumption The (3.1) results in final values of the task assignment optimization variables x ik , the task order optimization variables u ij , and the task start time optimization variables . (3.2) frequency selection and task replication Step (3.2) is based on the results of task mapping in (3.1), and the objective function is to minimize the computing energy, that is: P4: s.t. (3)-(5), (8), (9) wherein and are the computational energy consumption of task τ i and its replica; y is the frequency selection optimization variable; h is the task existence index optimization variable; and the method comprises the following four steps: First, verify whether the result of task allocation satisfies the relative deadline constraint of the task; according to the order of task allocation obtained by task layering in (3.1), iteratively assign the frequency level on processor θ k to task τ i , in the process, if the relative deadline constraint of the task cannot be satisfied, exclude this frequency selection scheme; if all frequencies on the processor cannot satisfy the deadline constraint, return to step (3.1) to re-allocate the processor with higher frequency for the task; Secondly, the frequency selection optimization variable y is determined by using a greedy algorithm ikl ; calculating the computing energy consumption of the task satisfying the real-time constraint, and selecting the frequency scheme that minimizes the computing energy consumption; Third step, judge whether the copy task exists; by the original task τ i The frequency selection y ikl And the task execution reliability constraint determine whether the copy task exists, that is, the value of h i+M ; Fourth, the frequency allocation of the replicated tasks and their original tasks is jointly optimized; a frequency selection scheme is selected that minimizes the sum of the computing energy of the task copies and their corresponding original tasks; The (3.2) finally obtains a frequency selection optimization variable y ikl and a task existence index optimization variable h i The value of (3.3) multi-path routing Step (3.3) is based on the results of task mapping in (3.1) and frequency selection and task existence in (3.2), and the objective function is to balance the processor energy consumption, that is: P5: s.t. (2), (9) wherein, and are the computational energy and communication energy of processor θ k respectively; c is the path selection optimization variable; The (3.3) iteratively determines a routing path for each pair of processors (θ β ,θ γ ) by selecting a communication path from θ β to θ γ that does not exceed the scheduling period and minimizes the incremental inter-processor communication energy. The (3.3) finally results in a value for the path selection optimization variable c βγρ .
3. The energy-optimization-based task execution method for a multi-core heterogeneous NoC platform according to claim 1, characterized in that: The mixed integer nonlinear programming problem transformation in step S3 specifically comprises: the mixed integer nonlinear programming problem related to the objective function in step S2 is equivalent to a mixed integer linear programming problem by introducing auxiliary variables and increasing linear constraints, and the optimal solution is found by using an optimization method.
4. The energy-optimization-based task execution method for a multi-core heterogeneous NoC platform according to claim 3, characterized in that: The mixed integer nonlinear programming problem in step S3 is transformed into a linear problem, and the objective function is: P2: s.t. (1)-(3), (5)-(9), (11)-(17) wherein, is a processor θ k consumed communication energy; is a processor θ k consumed computation energy; x is a task mapping optimization variable; c is a path selection optimization variable; y is a frequency selection optimization variable; h is a task existence index optimization variable; u is a task execution order optimization variable; t s task start time optimization variable; The constraint conditions are introduced to the objective function model, and (11)-(17) are the added linear constraints; The above problem is a mixed integer linear programming problem, which is solved by an optimization solver.
5. The energy-optimization-based task execution method for a multi-core heterogeneous NoC platform according to claim 2 or 3 or 4, characterized in that: In the step S1, if the task τ i has relevance with τ j , τ i is prior to τ j and τ j is the nearest task to τ i , p ij =1, otherwise p ij =0; when τ i is completed, a set of size s ij of data will be generated for the successor task τ j (p ij =1) in bits.
6. The energy-optimization-based task execution method for a multi-core heterogeneous NoC platform according to claim 5, characterized in that: The communication energy consumption in the step S2 is: where h i and h j are the presence indices of tasks τ i and τ j , respectively; p ij is the (i,j)-th element in the task dependency matrix p = [p ij ] M×M ; s ij is the communication data size; x iβ denotes that task τ i is mapped onto processor θ β ; x jγ denotes that task τ j is mapped onto processor θ γ ; c βγρ denotes that data is transferred between processors θ β and θ γ through the ρ-th path; e βγkρ denotes the communication energy consumption on processor θ β when data is transferred between processors θ γ and θ k through the ρ-th path. The calculation energy consumption is: Where, x ik Represents task τ i Mapped to processor θ k Up; h i For task τ i An index exists; y ikl For task τ i Select processor θ k The first frequency level; C i For task τ i Worst-case execution cycle; f kl For processor θ k The first frequency level; P kl For frequency level f kl Corresponding power consumption; The task allocation constraint in the step S2 is that each task can only be executed on one processor, in particular: where x ik represents a task τ i is mapped to a processor θ k ; The path selection constraint is that when the task is transmitted between different processors, only the path with the minimum energy or the path with the shortest time can be selected, in particular: where c βγρ represents the processor θ β and θ γ transmit data through the ρth path; The frequency selection constraint is that each task can only select one given voltage / frequency level to execute, in particular: wherein y ikl is the task τ i is selected as the processor θ k the lth frequency level; In the task execution reliability constraint, the reliability of the original task is r i =∑ k x ik (∑ l y ikl r ikl ), whether the copy task τ i+M exists depends on the reliability r i of the original task τ i ; a binary decision variable h i is introduced, if r i ≥R th , it means that the reliability of the original task has met the requirements, then the copy task τ i is not needed, that is, h i+M =0; otherwise, the copy task τ i is needed, that is, h i+M =1, that is: Task Reliability after replication r i ' = 1 - (1 - h i r i )(1 - h i+M r i+M ), thus introducing the following constraint in terms of task execution reliability: where r i is the original task τ i reliability, R th is the reliability threshold; The task execution order constraint is that for tasks τ i and τ j their start and end times are in the range of: If p ij = 1, i.e. τ i precedes τ j and τ j is the closest task to τ i , then we get where and are the execution start times of tasks τ i and τ j , respectively; is the computation time of task τ i ; is the communication time of task τ j . The task non-preemption constraint is that when independent tasks τ i and τ j (p ij = 0) are assigned to the same processor, their execution order must be determined, in particular: wherein, is the end time of execution of task τ i ; is the start time of execution of task τ j ; x ik denotes that task τ i is mapped onto processor θ k ; x jk denotes that task τ j is mapped onto processor θ k ; u ij is the execution order of tasks τ i and τ j ; The real-time constraints refer to the fact that the execution time of each task τ i should be less than the relative deadline D i , and all tasks should be completed within a scheduling period H, thus adding the following constraints in terms of time: wherein, is the computation time of task τ i ; D i is the relative deadline of task τ i ; and is the end of execution time of task τ i ; and H is the system scheduling period.
Citation Information
Patent Citations
Gridding scheduling method based on energy optimization
CN101271407A
Task allocation algorithm in wireless sensor network based on node property
CN102448123A