DAG fault tolerance method in heterogeneous real-time system
By dynamically calculating the parallel start time point of the replica of the task, combining failure rate and criticality, the DAG fault tolerance solution is optimized, and the completion time extended caused by the impact of non-critical tasks and delayed backup in the existing technology is solved, achieving a balance between high reliability and low power consumption.
Patent Information
- Application Number
- CN202510073215.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-17
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2045-01-17
AI Technical Summary
The existing DAG fault tolerance technology cannot guarantee the criticality of the application DAG graph when handling non-critical tasks failures, and the solution based on delayed backup technology causes the processor to fail to respond in time, extending the completion time of the overall task.
By dynamically calculating the replica parallel start time point for each task, considering the failure rate and criticality of the task, optimizing the replica parallel start time to achieve high reliability and shorten completion time, while reducing energy consumption while keeping the completion time unchanged.
It effectively solves the critical impact of non-question-critical failures on the application DAG graph, improves the system's response speed and overall task completion efficiency, and reduces energy consumption, achieving a balance between high reliability and low power consumption.
Smart Images

Figure CN119917245A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of heterogeneous real-time systems, and more specifically, relates to a DAG fault-tolerant method in a heterogeneous real-time system. Background Art
[0002] In recent years, with the advancement of semiconductor technology, processors are also constantly developing, from single-core processors to multi-core processors, from homogeneous multi-core processors to heterogeneous multi-core processors, and their architectures are becoming more and more complex. Reliability has always been an important factor to be considered in heterogeneous real-time systems, especially in safety-critical systems such as automotive electronics, aerospace, etc. Due to the influence of electromagnetic interference, cosmic rays, etc., there may be two types of faults in the system during operation. One is permanent faults, which will cause permanent damage to the circuits in the system; the other is transient faults, which are recoverable functional errors in the circuits.
[0003] In order to tolerate failures and ensure the smooth completion of real-time tasks and meet the real-time design constraints of deadlines, fault-tolerant technology is usually used. Heterogeneous real-time systems with complex functions are usually modeled as directed acyclic graphs (DAGs) to capture data dependencies, and DAG fault tolerance refers to a method to ensure that the application can be successfully scheduled when the corresponding heterogeneous processors fail (such as transient faults or permanent faults) when scheduling each task in the application DAG graph. Therefore, a DAG fault-tolerant method in heterogeneous real-time systems has obvious practical significance.
[0004] One of the existing DAG fault-tolerant technologies is the replication strategy, which improves data security and shortens the response time of application execution by sacrificing a small amount of resources. The replication strategy can be divided into active replication technology and passive replication technology. In active replication, the main task and the backup are carried out simultaneously. In passive replication, the backup will only start to execute when the main task fails.
[0005] The popular DAG fault-tolerance solutions based on active replication are: first, replication strategy for key tasks in the application to meet the overall completion time constraint of the application DAG graph; second, delayed backup technology, which reduces the redundancy of backup by scheduling the replica tasks corresponding to each task as far back as possible and terminating the execution of the replica tasks when the main task is successfully executed; third, scheduling the n+1 replica tasks of each task to different processors to tolerate a given number of n processor failures.
[0006] However, the above two DAG fault tolerance solutions based on active replication have some non-negligible defects:
[0007] The first method only implements replication strategies for critical tasks in the application DAG graph, without considering the failure of non-critical tasks. Therefore, when non-critical tasks fail, the criticality of the application DAG graph cannot be guaranteed.
[0008] The second method reduces the redundancy of backup by delaying the backup technology. However, since it tries to schedule the replica tasks corresponding to each task backward, when a task fails, the processor cannot respond in time, and the completion time of the overall task becomes longer.
[0009] The third method improves system reliability by allocating more replica tasks and tolerating multiple failures. However, since it uses multiple replica tasks, it requires more system resources and there is also the problem of longer completion time for the overall task. Summary of the invention
[0010] In view of the above defects or improvement needs of the prior art, the present invention provides a DAG fault tolerance method in a heterogeneous real-time system, which aims to solve the technical problem that the existing replication strategy based on critical tasks only considers critical tasks and does not consider non-critical task failures. Therefore, when non-critical tasks fail, the criticality of the application DAG graph cannot be guaranteed, and the existing delayed backup technology cannot respond to the processor in time due to the replica task corresponding to each task being scheduled backward as much as possible, and the completion time of the overall task is prolonged. In the present invention, the failure rate and criticality of each task are considered, and the parallel start time point of the replica is dynamically calculated. While achieving highly reliable DAG fault tolerance, the overall completion time is shortened, and the relationship between high reliability requirements and completion time is balanced; and the existing replication strategy based on allocating more replica tasks has additional resource consumption and longer completion time due to multiple replica tasks, so as to reduce energy consumption while keeping the completion time unchanged and balance the relationship between high reliability and low power consumption.
[0011] To achieve the above object, according to one aspect of the present invention, a DAG fault tolerance method in a heterogeneous real-time system is provided, comprising the following steps:
[0012] (1) obtaining a heterogeneous multi-processor set consisting of a plurality of heterogeneous processors and a task set consisting of a plurality of tasks to be run on the heterogeneous multi-processor set, and constructing an application DAG graph according to the heterogeneous multi-processor set and the task set;
[0013] (2) Obtain the priority of each task in the task set V according to the application DAG graph obtained in step (1);
[0014] (3) According to the priority of each task in the task set V obtained in step (2), obtain the replica parallel start time point of each task on the corresponding heterogeneous processor in turn, and obtain the replica parallel start time point set S composed of the replica parallel start time points of each task on the corresponding heterogeneous processor, and the fault-tolerant safety scheduling result corresponding to the task set V in the application DAG graph.
[0015] (4) Construct an energy consumption model of the application DAG graph obtained in step (1), and use the energy consumption model to obtain energy-saving scheduling results of the application DAG graph.
[0016] Preferably, step (1) comprises the following sub-steps:
[0017] (1-1) Obtain a heterogeneous multiprocessor set U consisting of multiple heterogeneous processors = {U1, U2, ..., U |U|} and a task set V = {V1, V2, ..... V |N|}, where |U| represents the size of the heterogeneous multiprocessor set U, that is, the total number of heterogeneous processors in the heterogeneous multiprocessor set; |N| represents the size of the task set V, that is, the total number of tasks in the task set;
[0018] (1-2) constructing an application DAG graph according to the heterogeneous multi-processor set and task set obtained in (1-1);
[0019] Specifically, this step first uses the task set V to form multiple nodes in the application DAG graph. The task V in the application DAG graph i ∈V (where i∈[1, the total number of tasks in the task set]) represents tasks with different running times on a heterogeneous multiprocessor set; then get task V i The direct predecessor task set pred(Vi) and the direct successor task set succ(V i ), get the entry task V that does not have a direct predecessor task in the application DAG graph entry , and the exit task V that does not have a direct successor task exit ; Then, get task V i Runs at maximum frequency on the corresponding heterogeneous processor U k (where k∈[1, the total number of heterogeneous processors in the heterogeneous multiprocessor set U]) i,k , and build the running time set W according to the running time of all tasks in the task set V on different heterogeneous processors; then, get the task V i In the corresponding heterogeneous processor U k Task start time on AST:
[0020]
[0021] Among them, V entry Represents the entry task in the application DAG graph. The entry task V entry In the corresponding heterogeneous processor U k The task start time on AST(V entry ,U k )=0;avail[k] represents the heterogeneous processor U k The earliest available time to execute the task, PR i For Task V i The set of direct predecessor tasks in the application DAG graph, denoted as PR i = {PR1,PR2,...PR |PRi|}, where |PR i | indicates task V i The number of direct predecessor tasks in the direct predecessor task set, PR j ∈PR i Indicates task PR j It is Mission V i The direct predecessor task, and j∈[1,|PR i |],AFT(PR j ) represents task V i The direct predecessor task PR j The task end time.
[0022] Preferably, step (2) specifically includes the following sub-steps:
[0023] (2-1) Obtain the critical path of the application according to the DAG graph of the application obtained in step (1);
[0024] (2-2) According to the task set V obtained in step (1-1) and the critical path L obtained in step (2-1), obtain the non-critical task set B in the application DAG graph = {B1, B2, .... B |B|}, where |B| represents the number of non-critical tasks in the non-critical task set B, B g ∈B indicates that it is a non-critical task in the application DAG graph, and g∈[1,|B|], the critical path and non-critical task set in the application DAG graph together constitute the task set V;
[0025] (2-3) According to the critical path L obtained in step (2-1) and the non-critical task set B obtained in step (2-2), the upward sorting value set corresponding to the task set V and the priority of each task therein are obtained.
[0026] Preferably, step (2-1) is specifically as follows: first, obtain any task V in the task set V i , obtain the running time of the task on each heterogeneous processor in the heterogeneous multiprocessor set U, and take the average of all running times of the task on all heterogeneous processors in the heterogeneous multiprocessor set U to obtain the task V i Average running time on various heterogeneous processors Then, for all remaining tasks in the task set V, repeat the above process to obtain the average running time set of all tasks in the task set V on all heterogeneous processors in the heterogeneous multiprocessor set U Then, based on the average running time set obtained And use the depth-first algorithm DFS to obtain the critical path L = {L1, L2.....L L}, where |L| represents the length of the critical path L, that is, the number of critical tasks, L p ∈L indicates that it is a key task in the application DAG graph and has p∈[1,|L|];
[0027] Step (2-3) is specifically as follows: first, obtain the non-critical task B in the non-critical task set B obtained in step (2-2). g The corresponding upward ranking value ranku(B g ), the specific calculation formula is:
[0028]
[0029] Among them, SU g Non-critical task B g The set of direct successor tasks in the application DAG graph is denoted as SU g = {SU1,SU2,...SU |SUg|}, where |SU g | indicates non-critical task B g The number of direct successor tasks in the direct successor task set, SU y ∈SU g , indicating that the task SU y Non-critical task B g The direct successor task, and y∈[1,|SU g |];
[0030] Then, for all non-critical tasks in non-critical task set B, repeat the above process to obtain an upward sorting value set of non-critical task set B;
[0031] Then, obtain the key task L in the critical path L obtained in step (2-1) pThe upward sorting value is calculated using the following formula:
[0032]
[0033] Among them, SU Lp It is a critical task p The set of direct successor tasks in the application DAG, denoted as SU Lp = {SU1,SU2,...,SU |SULp|}, where |SU Lp | indicates critical task L p The number of direct successor tasks in the direct successor task set, SU z ∈SU Lp , indicating that the task SU z It is a critical task p The direct successor task of , and z∈[1,|SU Lp |].
[0034] Then, for all the key tasks in the key path L, repeat the above process to obtain the upward sorted value set of the key path L;
[0035] Then, the upward sorting value set of the non-critical task set B and the upward sorting value set of the critical path L are merged to obtain the upward sorting value set ranku(V) corresponding to the task set V;
[0036] Finally, according to the upward sorting value set ranku(V), each task in the task set V is sorted in descending order according to its corresponding upward sorting value to obtain the priority of each task in the task set V.
[0037] Preferably, step (3) comprises the following sub-steps:
[0038] (3-1) According to the priority of each task in the task set V obtained in step (2), multiple tasks that meet the priority and their replica parallel start time points on the corresponding heterogeneous processors are obtained, and all replica parallel start time points constitute a replica parallel start time point set S corresponding to the task set V;
[0039] (3-2) According to the priority of each task in the task set V obtained in step (2-3), the task end time of the task and the scheduling length of the application DAG graph are obtained.
[0040] (3-3) Each task V in the task set V obtained in step (3-2) i The task end time and the task end time of the corresponding replica task are used to build the task allocation table corresponding to the replica task matrix, and obtain the fault-tolerant and safe scheduling result of the application DAG graph.
[0041] Preferably, step (3-1) is specifically,
[0042] First, obtain the minimum frequency set corresponding to the heterogeneous multiprocessor set U
[0043] f low ={f 1,low ,f 2,low ,....f |U|,low} and the highest frequency set f max ={f 1,max ,f 2,max ,....f |U|,max}, f k,low ∈f low Represents heterogeneous processor U k The lowest frequency, f k,max ∈f max Represents heterogeneous processor U k The highest frequency of , and obtain the actual effective frequency matrix corresponding to the heterogeneous multiprocessor set U according to the lowest frequency set and the highest frequency set:
[0044]
[0045] Each heterogeneous processor U in the heterogeneous multiprocessor set U k The frequency f k,h From the lowest frequency f k,min To the highest frequency f k,max Change, h represents heterogeneous processor U k The hth actual effective frequency that can be set;
[0046] Then, obtain each heterogeneous processor U k The transient failure rate set λ when running at its highest frequency max ={λ 1,max ,λ 2,max ,....λ |U|,max}, and according to the transient failure rate set of heterogeneous processors U k Transient failure rate at its highest frequency λ k,max Get heterogeneous processor U k At frequency f k,h Transient failure rate during operation λ k,h , the specific calculation formula is:
[0047]
[0048] Among them, d k is a constant greater than 0, indicating a heterogeneous processor U k The voltage / frequency scaling of the sensitive failure rate.
[0049] Then, repeat the above process to obtain heterogeneous processors U k The transient failure rates of the heterogeneous processor U when running at their respective actual effective frequencies. All transient failure rates constitute k The transient failure rate set λ k ={λ k,low ,....λ k,max};
[0050] Then, for all the remaining heterogeneous processors in the heterogeneous multiprocessor set U, the above process is repeated to obtain the transient failure rate sets of all heterogeneous processors when they are running at their respective actual effective frequencies. All transient failure rate sets constitute the transient failure rate matrix λ, which is specifically expressed as:
[0051]
[0052] Then, according to the obtained heterogeneous processor U k At its highest frequency f k,max Transient failure rate during operation λ k,max , get task V i In this heterogeneous processor U k At frequency f k,max The parallel start time of the running replicas is S i , the specific calculation formula is:
[0053]
[0054] Among them, α and β are both proportional factors, and α∈[0,1], β=1-α, α and β can be adjusted accordingly according to the operation results;
[0055] Then, for all remaining tasks in the task set V, the above process is repeated to obtain the set of parallel start time points of the replicas corresponding to the task set V = {S1, S2.....S |N|}.
[0056] Preferably, step (3-2) is specifically as follows: first, according to the task V in the task set V obtained in step (2), i The priority of the task V i In the corresponding heterogeneous processor U k The task completion time AFT(V i )=AST(V i ,U k )+W i,k , and the task V i Task end time when a failure occurs on the corresponding heterogeneous processor
[0057] AFT(Vi )=max(avail[q],AST(V i ,U k )+(1-S i )W i,k )+W i,q ;
[0058] Where q∈[1, the total number of heterogeneous processors in the heterogeneous multiprocessor set U], and q≠k, AST(V i ,U k )+(1-S i )W i,k The copy task corresponds to the heterogeneous processor U q The task start time on the task set V makes task V in the task set V i , its task end time AFT(V i ) varies depending on whether the current task has a fault;
[0059] Then, get each task V in the task set V i The corresponding copy task set V i '={V i 1 ,V i 2 ,....V i numi} and the number of replica tasks Num in the replica task set i , the number of replica tasks corresponding to all tasks constitutes the replica task number set Num = {Num1, Num2.......Num |N|}, where V i x ∈V i ',x∈[1,Num i ], Represents task V i The corresponding x-th copy task, when x=1 It's Mission V i ;
[0060] Then, for all remaining tasks in the task set V, the above process is repeated to obtain the copy task matrix V'={V1', V2', .....V |N| '}, specifically expressed as
[0061]
[0062] Where each task V in the default task set V i The corresponding number of replica tasks is Num i =2;
[0063] Then, according to the obtained task V i The corresponding copy task set V i ', get the copy task V i x In the corresponding heterogeneous processor U q The task start time AST(V i ,U k )+(1-S i )W i,k , and the copy task V i x In the corresponding heterogeneous processor U q The task end time AFT(V i x ), which is equal to task V i The task end time AFT(V i );
[0064] Finally, according to the critical path of the application DAG graph obtained in step (2-1), the scheduling length (i.e., the overall completion time) SL(G) of the application DAG graph is obtained:
[0065]
[0066] The copy task Represents the export task V of the application DAG graph exit The corresponding Num exit A copy task, It is the export task V exit ;
[0067] Step (3-3) is as follows: first, generate a task allocation table corresponding to the replica task matrix V', whose number of rows is The number of columns is 5, of which the first column is the copy task V i x , the second column is the copy task V i x Corresponding heterogeneous processor U q , the third column is the copy task V i x In the corresponding heterogeneous processor U q The frequency f when running k,h By default, k,h =f k,max =1, the fourth column is the copy task V i x In the corresponding heterogeneous processor U q The fifth column is the copy task V. i x In the corresponding heterogeneous processor Uq Then, use each copy task V obtained i x In the corresponding heterogeneous processor U q The task start time and task end time are used as row data of the task allocation table, and the task allocation table generated thereby is used as the fault-tolerant and safe scheduling result of the application DAG graph.
[0068] Preferably, step (4) specifically includes the following sub-steps:
[0069] (4-1) constructing an energy consumption model of the application DAG graph obtained in step (1);
[0070] (4-2) In the energy consumption model obtained in step (4-1), a set of heterogeneous multiprocessors and a set of replica tasks that meet the frequency reduction conditions are obtained to obtain an energy-saving scheduling result of the application DAG graph.
[0071] Preferably, step (4-1) specifically includes the following sub-steps:
[0072] (4-1-1) According to the application DAG graph obtained in step (1), obtain the energy consumption model related parameters of the heterogeneous multi-processor set U, including the frequency-independent dynamic power set P of the heterogeneous multi-processor set U ind = {P 1,ind ,P 2,ind ,.....P |U|,ind}, heterogeneous multiprocessor set U and frequency-dependent dynamic power set P d = {P 1,d ,P 2,d ,.....P |U|,d}, the static power set P of the heterogeneous multiprocessor set U and frequency s = {P 1,s ,P 2,s ,.....P |U|,s}, the effective switch capacitor set C of the heterogeneous multiprocessor set U ef ={C 1,ef ,C 2,ef ,.....C |U|,ef}, and the dynamic power index set m of the heterogeneous multiprocessor set U = {m1,m2,.....m |U|}, where P k,ind Represents heterogeneous processor U k Frequency-independent dynamic power, P k,d Represents heterogeneous processor U k Frequency-dependent dynamic power, P k,s Represents heterogeneous processor U k Frequency-dependent static power, Ck,ef Represents heterogeneous processor U k The effective switching capacitance, m k Represents heterogeneous processor U k Dynamic power index;
[0073] (4-1-2) Based on the scheduling length SL(G) of the application DAG graph obtained in step (3-2) and the frequency-related static power set P of the heterogeneous multiprocessor set U obtained in step (4-1-1) s = {P 1,s ,P 2,s ,.....P |U|,s}, get the static energy consumption of the application DAG graph
[0074] (4-1-3) According to the energy consumption model related parameters obtained in step (4-1-1), obtain task V i At a frequency of f k,h Heterogeneous processor U k Dynamic energy consumption generated when running on:
[0075]
[0076] in, Represents task V i In heterogeneous processors U k At frequency f k,h The actual running time of the runtime;
[0077] (4-1-4) Repeat the above step (4-1-3) for all remaining tasks in the task set V to obtain the frequency of each task at f k,h Heterogeneous processor U k The dynamic energy consumption generated when running on the task set is k,h Heterogeneous processor U k The dynamic energy consumption generated when running on the same node is added to obtain the dynamic energy consumption ED(G) of the application DAG graph:
[0078] (4-1-5) According to the static energy consumption of the application DAG graph obtained in step (4-1-2) and the dynamic energy consumption of the application DAG graph obtained in step (4-1-4), the total energy consumption of the application DAG graph is obtained, that is, the energy consumption model of the application DAG graph:
[0079] ET(G)=ES(G)+ED(G);
[0080] Preferably, step (4-2) specifically includes the following sub-steps:
[0081] (4-2-1) According to the energy consumption model obtained in step (4-1), obtain the effective frequency setting range of each heterogeneous processor in the heterogeneous multi-processor set U;
[0082] Specifically, this step is as follows: first, according to the energy consumption model related parameters obtained in step (4-1-1), the heterogeneous processor U is obtained. k Energy saving frequency (The reduced frequency should be limited, otherwise it will increase the occurrence of transient failures and reduce reliability); then, according to the obtained heterogeneous processor U k Energy-saving frequency, get heterogeneous processor U k The lowest frequency f that can be set on k,low =max(f k,min ,f k,ee ); Finally, obtain each heterogeneous processor U in the heterogeneous multiprocessor set U k The frequency f k,h The effective setting range f k,low ≤f k,h ≤f k,max ;
[0083] (4-2-2) According to the effective frequency setting interval obtained in step (4-2-1), obtain a set of heterogeneous multi-processors and a set of replica tasks that meet the frequency reduction conditions to obtain an energy-saving scheduling result for the application DAG graph.
[0084] Specifically, this step is as follows: first, according to the scheduling length (overall completion time) obtained in step (3-2) and the task allocation table of the application DAG graph obtained in step (3-3), obtain the task list running on the heterogeneous processor U q The ratio of the total running time of all replica tasks on the same cluster to the scheduling length Among them, the copy task V i x The corresponding heterogeneous processor is U q ;
[0085] Then, for all the remaining heterogeneous processors in the heterogeneous multiprocessor set U, the above process is repeated to obtain the ratio of the sum of the running time of all replica tasks on each heterogeneous processor in the heterogeneous multiprocessor set U to the scheduling length. The corresponding ratios of all heterogeneous processors constitute the ratio value set RA of the heterogeneous multiprocessor set U = {RA1, RA2, ... RA |U|}, obtain all heterogeneous processors whose ratio values are less than or equal to the preset threshold from the ratio value set of the obtained heterogeneous multi-processor set U to form a heterogeneous multi-processor set that meets the frequency reduction condition, where RA k Indicates that on heterogeneous processor U k The ratio of the total running time of all replica tasks to the scheduling length;
[0086] Then, according to the direct successor task set succ(V i ) and the task allocation table of the application DAG graph obtained in step (3-3), obtain the replica task V i x The set of direct successor tasks According to the obtained copy task V i x The direct successor task collection of The minimum value of the task start time of each direct successor task in the task, and calculate the copy task V i x The difference between the task end time and the minimum value, where the copy task V i x The set of direct successor tasks and task V i The set of direct successor tasks of SU i x Represents the copy task V i x The set of direct successor tasks of ;
[0087] Then, for the remaining tasks in the replica task matrix V', repeat the above process to obtain the difference of each replica task in the replica task matrix V'. The difference of all replica tasks in the replica task matrix V' constitutes the difference matrix corresponding to the replica task matrix V'. All replica tasks whose difference is greater than the preset threshold 0 are obtained from the difference matrix corresponding to the obtained replica task matrix V' to form a replica task set that meets the frequency reduction condition.
[0088] Finally, based on the obtained heterogeneous multi-processor set and replica task set that meet the frequency reduction conditions, a frequency reduction operation is performed on each heterogeneous processor and replica task. The new frequency obtained after the frequency reduction operation satisfies the frequency effective setting interval constraint obtained in step (4-2-1), and the third column of data in the task allocation table generated in step (3-3) is updated according to the obtained new frequency. The updated task allocation table is used as the energy-saving scheduling result of the application DAG graph.
[0089] In general, the above technical solutions conceived by the present invention can achieve the following beneficial effects compared with the prior art:
[0090] (1) The present invention adopts step (2) to combine the criticality of the task into the calculation of the upward ranking value (ranku). Different upward ranking value (ranku) calculation methods are used for critical tasks and non-critical tasks. Priority scheduling of critical tasks is achieved while satisfying task constraints, which better reflects the criticality of tasks. Therefore, it can not only solve the technical problem that the existing replication strategy based on critical tasks only considers critical tasks and does not consider non-critical task failures. Therefore, when non-critical tasks fail, the criticality of the application DAG graph cannot be guaranteed, but also reflect the criticality of tasks;
[0091] (2) The present invention adopts step (3-1) to step (3-2) to calculate the parallel start time point of the replica of each task in the task set, taking into account the proportion of the failure rate and the task priority in calculating the parallel start time point of the replica, and dynamically calculates the parallel start time point of the task; at the same time, the task end time of each task in the task set is different depending on whether a failure occurs. Therefore, the method of using the parallel start time point of the replica not only meets the fault tolerance requirements of the application DAG graph, but also shortens the overall completion time of the task on the basis of achieving high reliability, and solves the technical problem that the existing replication strategy based on allocating more replica tasks has a longer completion time due to multiple replica tasks, and the present invention can be applied to multiple scenarios;
[0092] (3) The present invention adopts step (4-2) to obtain a heterogeneous multi-processor set and a replica task set that meet the frequency reduction conditions based on the generated task allocation table, that is, the fault-tolerant and safe scheduling result of the application DAG graph, and reasonably reduce the frequency of each heterogeneous processor and replica task in the set. On the basis of keeping the completion time unchanged, the overall energy consumption is further reduced to meet the user's high reliability and low power consumption requirements. Therefore, it can solve the technical problem of additional resource consumption caused by multiple replica tasks in the existing replication strategy based on allocating more replica tasks. BRIEF DESCRIPTION OF THE DRAWINGS
[0093] Figure 1 It is a flow chart of the DAG fault-tolerant method in a heterogeneous real-time system of the present invention. DETAILED DESCRIPTION
[0094] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0095] The embodiment of the present invention provides a DAG fault-tolerant method in a heterogeneous real-time system, and the basic idea is to: construct an application DAG graph; obtain the priority of each task in a task set according to the obtained application DAG graph, specifically, calculate the critical path and non-critical task set in the application DAG graph, and use different ranku calculation methods for the critical tasks and non-critical tasks, combine the task criticality with the calculation of ranku, and reflect the role of the critical task in the task priority calculation; obtain the fault-tolerant safety scheduling result corresponding to the task set in the application DAG graph, specifically, calculate the replica parallel start time point of each task in the task set, consider the proportion of the failure rate and the task priority when calculating the replica parallel start time point, dynamically calculate the replica parallel start time point of the task, and construct a task allocation table corresponding to the replica task matrix, that is, the fault-tolerant safety scheduling result of the application DAG graph; construct an energy consumption model of the application DAG graph, and use the energy consumption model to obtain the energy-saving scheduling result of the application DAG graph, specifically, according to the task allocation table corresponding to the obtained replica task matrix, obtain a heterogeneous multi-processor set and a replica task set that meet the frequency reduction condition, reasonably reduce the frequency of each heterogeneous processor and replica task in the set, and further reduce energy consumption on the basis of keeping the completion time unchanged.
[0096] like Figure 1 As shown, the present invention provides a DAG fault tolerance method in a heterogeneous real-time system, comprising the following steps:
[0097] (1) obtaining a heterogeneous multi-processor set consisting of a plurality of heterogeneous processors and a task set consisting of a plurality of tasks to be run on the heterogeneous multi-processor set, and constructing an application DAG graph according to the heterogeneous multi-processor set and the task set;
[0098] This step includes the following sub-steps:
[0099] (1-1) Obtain a heterogeneous multiprocessor set U consisting of multiple heterogeneous processors = {U1, U2, ..., U |U|} and a task set V = {V1, V2, ..... V |N|}, where |U| represents the size of the heterogeneous multiprocessor set U, that is, the total number of heterogeneous processors in the heterogeneous multiprocessor set; |N| represents the size of the task set V, that is, the total number of tasks in the task set;
[0100] (1-2) constructing an application DAG graph according to the heterogeneous multi-processor set and task set obtained in (1-1);
[0101] Specifically, this step first uses the task set V to form multiple nodes in the application DAG graph. The task V in the application DAG graphi ∈V (where i∈[1, the total number of tasks in the task set]) represents tasks with different running times on a heterogeneous multiprocessor set; then get task V i The direct predecessor task set pred(Vi) and the direct successor task set succ(V i ), get the entry task V that does not have a direct predecessor task in the application DAG graph entry (Generally, V entry represents the first task in the task set V, i.e. entry = 1), and the exit task V that has no direct successor task exit (Generally, V exit represents the last task in the task set V, that is, exit = |N|); then, get task V i Runs at maximum frequency on the corresponding heterogeneous processor U k (where k∈[1, the total number of heterogeneous processors in the heterogeneous multiprocessor set U], task V i Corresponding heterogeneous processor U k It refers to the shortest time to run task V in the heterogeneous multiprocessor set U. i The running time W on the idle heterogeneous processor i,k , and construct the running time set W (which is a |N|×|U| matrix) based on the running time of all tasks in the task set V on different heterogeneous processors. Due to the heterogeneity between processors, each task V i ∈V has different running times on different processors); then, get task V i In the corresponding heterogeneous processor U k Task start time on AST:
[0102]
[0103] Among them, V entry It represents the entry task in the application DAG graph (it has no direct predecessor task). It is the first task to be scheduled in the application DAG graph. Therefore, the entry task V entry In the corresponding heterogeneous processor U k The task start time on AST(V entry ,U k )=0;avail[k] represents the heterogeneous processor U k The earliest available time to execute the task, PR i For Task V i The set of direct predecessor tasks in the application DAG graph, denoted as PR i = {PR1,PR2,...PR |PRi|}, where |PRi | indicates task V i The number of direct predecessor tasks in the direct predecessor task set, PR j ∈PR i Indicates task PR j It is Mission V i The direct predecessor task, and j∈[1,|PR i |],AFT(PR j ) represents task V i The direct predecessor task PR j The task end time, the running of tasks should satisfy the constraints between each other. For task V in task set V i , can only run when all tasks in its direct predecessor task set have finished running and the corresponding heterogeneous processor is idle;
[0104] Through the above steps, the constructed application DAG graph is obtained, which is represented by G = (V, W).
[0105] (2) Obtain the priority of each task in the task set V according to the application DAG graph obtained in step (1);
[0106] This step specifically includes the following sub-steps:
[0107] (2-1) Obtain the critical path of the application according to the DAG graph of the application obtained in step (1);
[0108] This step is specifically as follows: first, obtain any task V in the task set V i , obtain the running time of the task on each heterogeneous processor in the heterogeneous multiprocessor set U, and take the average of all running times of the task on all heterogeneous processors in the heterogeneous multiprocessor set U to obtain the task V i Average running time on various heterogeneous processors Then, for all remaining tasks in the task set V, repeat the above process to obtain the average running time set of all tasks in the task set V on all heterogeneous processors in the heterogeneous multiprocessor set U Then, based on the average running time set obtained The depth-first search (DFS) algorithm is used to obtain the key path L = {L1, L2.....L L}, where |L| represents the length of the critical path L, that is, the number of critical tasks, L p ∈L indicates that it is a key task in the application DAG graph and has p∈[1,|L|];
[0109] (2-2) According to the task set V obtained in step (1-1) and the critical path L obtained in step (2-1), obtain the non-critical task set B in the application DAG graph = {B1, B2, .... B |B|}, where |B| represents the number of non-critical tasks in the non-critical task set B, B g ∈B indicates that it is a non-critical task in the application DAG graph, and g∈[1,|B|], the critical path and non-critical task set in the application DAG graph together constitute the task set V;
[0110] (2-3) According to the critical path L obtained in step (2-1) and the non-critical task set B obtained in step (2-2), the upward sorting value set corresponding to the task set V and the priority of each task therein are obtained.
[0111] Specifically, this step includes: first, obtaining non-critical task B in the non-critical task set B obtained in step (2-2); g The corresponding upward ranking value (ranku) g ), the specific calculation formula is:
[0112]
[0113] Among them, SU g Non-critical task B g The set of direct successor tasks in the application DAG graph is denoted as SU g = {SU1,SU2,...SU |SUg|}, where |SU g | indicates non-critical task B g The number of direct successor tasks in the direct successor task set, SU y ∈SU g , indicating that the task SU y Non-critical task B g The direct successor task, and y∈[1,|SU g |], this formula satisfies the constraints between tasks well;
[0114] Then, for all non-critical tasks in non-critical task set B, repeat the above process to obtain an upward sorting value set of non-critical task set B;
[0115] Then, obtain the key task L in the critical path L obtained in step (2-1) p The upward sorting value is calculated using the following formula:
[0116]
[0117] Among them, SU Lp It is a critical task p The set of direct successor tasks in the application DAG, denoted as SU Lp = {SU1,SU2,...,SU |SULp|}, where |SU Lp | indicates critical task L p The number of direct successor tasks in the direct successor task set, SU z ∈SU Lp , indicating that the task SU z It is a critical task p The direct successor task of , and z∈[1,|SU Lp |], this formula takes into account the criticality of tasks while satisfying the constraints between tasks.
[0118] Then, for all the key tasks in the key path L, repeat the above process to obtain the upward sorted value set of the key path L;
[0119] Then, the upward sorting value set of the non-critical task set B and the upward sorting value set of the critical path L are merged to obtain the upward sorting value set ranku(V) corresponding to the task set V;
[0120] Finally, according to the upward sorting value set ranku(V), each task in the task set V is sorted in descending order according to its corresponding upward sorting value to obtain the priority of each task in the task set V;
[0121] The advantage of this step (2) is that different ranku calculation methods are used for critical tasks and non-critical tasks in the application DAG graph, combining task criticality with ranku calculation, reflecting the role of critical tasks in task priority calculation, making critical tasks L p Prior to non-critical tasks B g Scheduling, i.e. the ranking of key tasks (L p ) is greater than the non-critical task's ranking (B g ), taking into account the priority of key tasks while satisfying the constraints between tasks.
[0122] (3) According to the priority of each task in the task set V obtained in step (2), obtain the replica parallel start time point of each task on the corresponding heterogeneous processor, and obtain the replica parallel start time point set S composed of the replica parallel start time points of each task on the corresponding heterogeneous processor, and the fault-tolerant safety scheduling result corresponding to the task set V in the application DAG graph;
[0123] Specifically, this step first obtains the replica parallel start time point of each task on the corresponding heterogeneous processor based on the priority of each task in the task set V obtained in step (2), and considers the proportion of failure rate and task priority in calculating the replica parallel start time point. The proportion can be adjusted accordingly according to the specific operation results, so as to achieve fault-tolerant scheduling of each task in the task set V on the corresponding heterogeneous processor; secondly, based on the obtained replica parallel start time point and the priority of each task in the task set V obtained in step (2), the completion time of each task and its corresponding replica task is obtained to obtain the task allocation table of the replica task matrix, so as to achieve safe scheduling of each task in the task set V on the corresponding heterogeneous processor; based on the above steps, the fault-tolerant and safe scheduling result of the task set V in the application DAG graph is obtained.
[0124] This step includes the following sub-steps:
[0125] (3-1) According to the priority of each task in the task set V obtained in step (2), multiple tasks that meet the priority and their replica parallel start time points on the corresponding heterogeneous processors are obtained, and all replica parallel start time points constitute a replica parallel start time point set S corresponding to the task set V;
[0126] Specifically, this step is as follows: first, obtain the minimum frequency set f corresponding to the heterogeneous multi-processor set U low ={f 1,low ,f 2,low ,....f |U|,low} and the highest frequency set f max ={f 1,max ,f 2,max ,....f |U|,max}, f k,low ∈f low Represents heterogeneous processor U k The lowest frequency, f k,max ∈f max Represents heterogeneous processor U k The highest frequency of , and obtain the actual effective frequency matrix corresponding to the heterogeneous multiprocessor set U according to the lowest frequency set and the highest frequency set:
[0127]
[0128] Each heterogeneous processor U in the heterogeneous multiprocessor set U k The frequency f k,h (where h represents the heterogeneous processor U k The hth actual effective frequency that can be set can be selected from the lowest frequency f k,min To the highest frequency f k,max change;
[0129] Then, obtain each heterogeneous processor U k The transient failure rate set λ when running at its highest frequency max ={λ 1,max ,λ 2,max ,....λ |U|,max}, and according to the transient failure rate set of heterogeneous processors U k Transient failure rate at its highest frequency λ k,max Get heterogeneous processor U k At frequency f k,h Transient failure rate during operation λ k,h , the specific calculation formula is:
[0130]
[0131] Among them, d k is a constant greater than 0, indicating a heterogeneous processor U k The voltage / frequency scaling of the sensitive failure rate.
[0132] Then, repeat the above process to obtain heterogeneous processors U k The transient failure rates of the heterogeneous processor U when running at their respective actual effective frequencies. All transient failure rates constitute k The transient failure rate set λ k ={λ k,low ,....λ k,max};
[0133] Then, for all the remaining heterogeneous processors in the heterogeneous multiprocessor set U, the above process is repeated to obtain the transient failure rate sets of all heterogeneous processors when they are running at their respective actual effective frequencies. All transient failure rate sets constitute the transient failure rate matrix λ, which is specifically expressed as:
[0134]
[0135] In subsequent calculations, unless otherwise specified, the maximum frequency is 1 by default, i.e., f k,h =f k,max =1, Task V i In the corresponding heterogeneous processor U k The running time on the i,k ;
[0136] Then, according to the obtained heterogeneous processor U k At its highest frequency f k,max Transient failure rate during operation λ k,max , get task V i In this heterogeneous processor U k At frequency f k,maxThe parallel start time of the running replicas is S i , the specific calculation formula is:
[0137]
[0138] Among them, α and β are both proportional factors, and α∈[0,1], β=1-α, α and β can be adjusted accordingly according to the operation results;
[0139] Then, for all remaining tasks in the task set V, the above process is repeated to obtain the set of parallel start time points of the replicas corresponding to the task set V = {S1, S2.....S |N|};
[0140] The advantage of this step (3-1) is that the set of parallel start time points S of the replicas of the task set V is obtained. For any S i ∈S, when the failure rate of the task is high and the priority is high, S i Approaching 1, when the failure rate of the task is low and the priority is low, S i Approaching 0, dynamically calculating task V i The parallel start time of the replicas is S i (non-fixed value), realizing fault-tolerant scheduling of the task set V in the application DAG graph;
[0141] (3-2) According to the priority of each task in the task set V obtained in step (2-3), the task end time of the task and the scheduling length of the application DAG graph are obtained.
[0142] Specifically, this step includes: first, according to the task V in the task set V obtained in step (2), i The priority of the task V i In the corresponding heterogeneous processor U k The task completion time AFT(V i )=AST(V i ,U k )+W i,k , and the task V i Task end time when a failure occurs on the corresponding heterogeneous processor
[0143] AFT(V i )=max(avail[q],AST(V i ,U k )+(1-S i )·W i,k )+W i,q ;
[0144] Where q∈[1, the total number of heterogeneous processors in the heterogeneous multiprocessor set U], and q≠k (i.e., each task in the task set and its corresponding replica task are assigned to different heterogeneous processors U k and U q AST(V i ,U k )+(1-S i )W i,k The copy task corresponds to the heterogeneous processor U q The task start time on the task set V makes task V in the task set V i , its task end time AFT(V i ) varies depending on whether the current task has a fault;
[0145] Then, get each task V in the task set V i The corresponding copy task set V i '={V i 1 ,V i 2 ,....V i numi} and the number of replica tasks Num in the replica task set i , the number of replica tasks corresponding to all tasks constitutes the replica task number set Num = {Num1, Num2.......Num |N|}, where V i x ∈V i ',x∈[1,Num i ], Represents task V i The corresponding x-th copy task, when x=1 It's Mission V i ;
[0146] Then, for all remaining tasks in the task set V, the above process is repeated to obtain the copy task matrix V'={V1', V2', .....V |N| '}, specifically expressed as
[0147]
[0148] In the present invention, in order to save the resources of each heterogeneous processor, each task V in the default task set V i The corresponding number of replica tasks is Num i =2;
[0149] Then, according to the obtained task V i The corresponding copy task set V i', get the copy task V i x In the corresponding heterogeneous processor U q The task start time AST(V i ,U k )+(1-S i )W i,k , and the copy task V i x In the corresponding heterogeneous processor U q The task end time AFT(V i x ), which is equal to task V i The task end time AFT(V i );
[0150] Finally, according to the critical path of the application DAG graph obtained in step (2-1), the scheduling length (i.e., the overall completion time) SL(G) of the application DAG graph is obtained:
[0151]
[0152] The copy task Represents the export task V of the application DAG graph exit The corresponding Num exit A copy task, It is the export task V exit ;
[0153] (3-3) Each task V in the task set V obtained in step (3-2) i The task end time and the task end time of its corresponding replica task are used to build a task allocation table corresponding to the replica task matrix, and obtain the fault-tolerant and safe scheduling result of the application DAG graph;
[0154] Specifically, this step is as follows: first, generate a task allocation table corresponding to the replica task matrix V' (which is initially empty), with the number of rows being The number of columns is 5 (the first column is the copy task V i x , the second column is the copy task V i x Corresponding heterogeneous processor U q , the third column is the copy task V i x In the corresponding heterogeneous processor U q The frequency f when running k,h By default, k,h =f k,max =1, the fourth column is the copy task V i xIn the corresponding heterogeneous processor U q The fifth column is the copy task V. i x In the corresponding heterogeneous processor U q Then, use each copy task V obtained i x In the corresponding heterogeneous processor U q The task start time and task end time on the task are used as the row data of the task allocation table (where V i 1 =V i , that is, the copy task V i 1 The task start time and task end time are represented by task V i The task start time and task end time are replaced by the task allocation table generated thereby, and used as the fault-tolerant and safe scheduling result of the application DAG graph;
[0155] (4) constructing an energy consumption model of the application DAG graph obtained in step (1), and using the energy consumption model to obtain energy-saving scheduling results of the application DAG graph;
[0156] This step specifically includes the following sub-steps:
[0157] (4-1) constructing an energy consumption model of the application DAG graph obtained in step (1);
[0158] This step specifically includes the following sub-steps:
[0159] (4-1-1) According to the application DAG graph obtained in step (1), obtain the energy consumption model related parameters of the heterogeneous multi-processor set U, including the frequency-independent dynamic power set P of the heterogeneous multi-processor set U ind = {P 1,ind ,P 2,ind ,.....P |U|,ind}, heterogeneous multiprocessor set U and frequency-dependent dynamic power set P d = {P 1,d ,P 2,d ,.....P |U|,d}, the static power set P of the heterogeneous multiprocessor set U and frequency s = {P 1,s ,P 2,s ,.....P |U|,s}, the effective switch capacitor set C of the heterogeneous multiprocessor set U ef ={C 1,ef ,C 2,ef ,.....C |U|,ef}, and the dynamic power index set m of the heterogeneous multiprocessor set U = {m1,m2,.....m |U|}, where P k,ind Represents heterogeneous processor U k Frequency-independent dynamic power, P k,d Represents heterogeneous processor U k Frequency-dependent dynamic power, P k,s Represents heterogeneous processor U k Frequency-dependent static power, C k,ef Represents heterogeneous processor U k The effective switching capacitance, m k Represents heterogeneous processor U k Dynamic power index;
[0160] (4-1-2) Based on the scheduling length SL(G) of the application DAG graph obtained in step (3-2) and the static power set P related to the frequency of the heterogeneous multiprocessor set U obtained in step (4-1-1) s = {P 1,s ,P 2,s ,.....P |U|,s}, get the static energy consumption of the application DAG graph
[0161] (4-1-3) According to the energy consumption model related parameters obtained in step (4-1-1), obtain task V i At a frequency of f k,h Heterogeneous processor U k Dynamic energy consumption generated when running on:
[0162]
[0163] in, Represents task V i In heterogeneous processors U k At frequency f k,h The actual running time of the runtime;
[0164] (4-1-4) Repeat the above step (4-1-3) for all remaining tasks in the task set V to obtain the frequency of each task at f k,h Heterogeneous processor U k The dynamic energy consumption generated when running on the task set is k,h Heterogeneous processor U k The dynamic energy consumption generated when running on the same node is added to obtain the dynamic energy consumption of the application DAG graph (without considering the communication energy consumption) ED(G):
[0165] (4-1-5) According to the static energy consumption of the application DAG graph obtained in step (4-1-2) and the dynamic energy consumption of the application DAG graph obtained in step (4-1-4), the total energy consumption of the application DAG graph is obtained, that is, the energy consumption model of the application DAG graph:
[0166] ET(G)=ES(G)+ED(G);
[0167] (4-2) In the energy consumption model obtained in step (4-1), a set of heterogeneous multiprocessors and a set of replica tasks that meet the frequency reduction conditions are obtained to obtain an energy-saving scheduling result of the application DAG graph;
[0168] This step specifically includes the following sub-steps:
[0169] (4-2-1) According to the energy consumption model obtained in step (4-1), obtain the effective frequency setting range of each heterogeneous processor in the heterogeneous multi-processor set U;
[0170] Specifically, this step is as follows: first, according to the energy consumption model related parameters obtained in step (4-1-1), the heterogeneous processor U is obtained. k Energy saving frequency (The reduced frequency should be limited, otherwise it will increase the occurrence of transient failures and reduce reliability); then, according to the obtained heterogeneous processor U k Energy-saving frequency, get heterogeneous processor U k The lowest frequency f that can be set on k,low =max(f k,min ,f k,ee )(Heterogeneous Processor U k The frequency can be from the lowest frequency f k,min To the highest frequency f k,max Change); Finally, obtain each heterogeneous processor U in the heterogeneous multiprocessor set U k The frequency f k,h The effective setting range f k,low ≤f k,h ≤f k,max ;
[0171] (4-2-2) According to the effective frequency setting interval obtained in step (4-2-1), obtain a set of heterogeneous multi-processors and a set of replica tasks that meet the frequency reduction conditions to obtain an energy-saving scheduling result for the application DAG graph.
[0172] Specifically, this step is as follows: first, according to the scheduling length (overall completion time) obtained in step (3-2) and the task allocation table of the application DAG graph obtained in step (3-3), obtain the task list running on the heterogeneous processor U q The ratio of the total running time of all replica tasks on the same cluster to the scheduling length (Among them, the copy task V i x The corresponding heterogeneous processor is U q );
[0173] Then, for all the remaining heterogeneous processors in the heterogeneous multiprocessor set U, the above process is repeated to obtain the ratio of the sum of the running time of all replica tasks on each heterogeneous processor in the heterogeneous multiprocessor set U to the scheduling length. The corresponding ratios of all heterogeneous processors constitute the ratio value set RA of the heterogeneous multiprocessor set U = {RA1, RA2, ... RA |U|}(where RA k Indicates that on heterogeneous processor U k The ratio of the total running time of all replica tasks to the scheduling length) is obtained from the obtained ratio value set of the heterogeneous multi-processor set U, and all heterogeneous processors whose ratio values are less than or equal to a preset threshold (the preset threshold value range is 0 to 2 / 3, preferably 1 / 2) are obtained to form a heterogeneous multi-processor set that meets the frequency reduction condition;
[0174] Then, according to the direct successor task set succ(V i ) and the task allocation table of the application DAG graph obtained in step (3-3), obtain the replica task V i x The set of direct successor tasks (Among them, the copy task V i x The set of direct successor tasks and task V i The set of direct successor tasks of Represents the copy task V i x The direct successor task set of V); according to the obtained copy task V i x The direct successor task collection of The minimum value of the task start time of each direct successor task in the task, and calculate the copy task V i x The difference between the task end time and the minimum value;
[0175] Then, for the remaining tasks in the replica task matrix V', repeat the above process to obtain the difference of each replica task in the replica task matrix V'. The difference of all replica tasks in the replica task matrix V' constitutes the difference matrix corresponding to the replica task matrix V'. All replica tasks whose difference is greater than the preset threshold 0 are obtained from the difference matrix corresponding to the obtained replica task matrix V' to form a replica task set that meets the frequency reduction condition.
[0176] Finally, according to the obtained heterogeneous multi-processor set and replica task set that meet the frequency reduction conditions, a frequency reduction operation is performed on each heterogeneous processor and replica task therein, and the new frequency obtained after the frequency reduction operation satisfies the frequency effective setting interval constraint obtained in step (4-2-1), and the third column data (i.e., the replica task V) in the task allocation table generated in step (3-3) is updated according to the obtained new frequency. i x In the corresponding heterogeneous processor U q The frequency f when running k,h ), and use the updated task allocation table as the energy-saving scheduling result of the application DAG graph.
[0177] The advantage of this step (4) is that the energy-saving scheduling result of the application DAG graph is obtained, so that the overall energy consumption can be reduced without increasing the completion time of the entire task, thus meeting the low power consumption requirement.
[0178] It will be easily understood by those skilled in the art that 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 and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A DAG fault tolerance method in a heterogeneous real-time system, characterized in that: The following steps are involved: (1) obtaining a heterogeneous multi-processor set consisting of a plurality of heterogeneous processors and a task set consisting of a plurality of tasks to be run on the heterogeneous multi-processor set, and constructing an application DAG graph according to the heterogeneous multi-processor set and the task set; (2) Obtain the priority of each task in the task set V according to the application DAG graph obtained in step (1); (3) According to the priority of each task in the task set V obtained in step (2), obtain the replica parallel start time point of each task on the corresponding heterogeneous processor in turn, and obtain the replica parallel start time point set S composed of the replica parallel start time points of each task on the corresponding heterogeneous processor, and the fault-tolerant safety scheduling result corresponding to the task set V in the application DAG graph. (4) Construct an energy consumption model of the application DAG graph obtained in step (1), and use the energy consumption model to obtain energy-saving scheduling results of the application DAG graph.
2. The DAG fault-tolerant method in a heterogeneous real-time system according to claim 1, characterized in that: Step (1) includes the following sub-steps: (1-1) Obtain a heterogeneous multiprocessor set U consisting of multiple heterogeneous processors = {U1, U2, ..., U |U| } and a task set V = {V1, V2, ..... V |N| }, where |U| represents the size of the heterogeneous multiprocessor set U, that is, the total number of heterogeneous processors in the heterogeneous multiprocessor set; |N| represents the size of the task set V, that is, the total number of tasks in the task set; (1-2) constructing an application DAG graph according to the heterogeneous multi-processor set and task set obtained in (1-1); Specifically, this step first uses the task set V to form multiple nodes in the application DAG graph. The task V in the application DAG graph i ∈V (where i∈[1, the total number of tasks in the task set]) represents tasks with different running times on a heterogeneous multiprocessor set; then get task V i The direct predecessor task set pred(Vi) and the direct successor task set succ(V i ), get the entry task V that does not have a direct predecessor task in the application DAG graph entry , and the exit task V that does not have a direct successor task exit ; Then, get task V i Runs at maximum frequency on the corresponding heterogeneous processor U k (where k∈[1, the total number of heterogeneous processors in the heterogeneous multiprocessor set U]) i,k , and build the running time set W according to the running time of all tasks in the task set V on different heterogeneous processors; then, get the task V i In the corresponding heterogeneous processor U k The task start time on AST: Among them, V entry Represents the entry task in the application DAG graph. The entry task V entry In the corresponding heterogeneous processor U k The task start time on AST(V entry ,U k )=0;avail[k] represents the heterogeneous processor U k The earliest available time to execute the task, PR i For Task V i The set of direct predecessor tasks in the application DAG graph, denoted as PR i = {PR1,PR2,...PR |PRi| }, where |PR i | indicates task V i The number of direct predecessor tasks in the direct predecessor task set, PR j ∈PR i Indicates task PR j It is Mission V i The direct predecessor task, and j∈[1,|PR i |],AFT(PR j ) represents task V i The direct predecessor task PR j The task end time.
3. The DAG fault tolerance method in a heterogeneous real-time system according to claim 1 or 2, characterized in that: Step (2) specifically includes the following sub-steps: (2-1) Obtain the critical path of the application according to the DAG graph of the application obtained in step (1); (2-2) According to the task set V obtained in step (1-1) and the critical path L obtained in step (2-1), obtain the non-critical task set B in the application DAG graph = {B1, B2, .... B |B| }, where |B| represents the number of non-critical tasks in the non-critical task set B, B g ∈B indicates that it is a non-critical task in the application DAG graph, and The critical path and non-critical task set in the application DAG graph together constitute the task set V; (2-3) According to the critical path L obtained in step (2-1) and the non-critical task set B obtained in step (2-2), the upward sorting value set corresponding to the task set V and the priority of each task therein are obtained.
4. The DAG fault tolerance method in a heterogeneous real-time system according to any one of claims 1 to 3, characterized in that: Step (2-1) is as follows: first, obtain any task V in the task set V. i , obtain the running time of the task on each heterogeneous processor in the heterogeneous multiprocessor set U, and take the average of all running times of the task on all heterogeneous processors in the heterogeneous multiprocessor set U to obtain the task V i Average running time on various heterogeneous processors Then, for all remaining tasks in the task set V, repeat the above process to obtain the average running time set of all tasks in the task set V on all heterogeneous processors in the heterogeneous multiprocessor set U Then, based on the average running time set obtained And use the depth-first algorithm DFS to obtain the critical path L = {L1, L2.....L |L| }, where |L| represents the length of the critical path L, that is, the number of critical tasks, L p ∈L indicates that it is a key task in the application DAG graph and has p∈[1,|L|]; Step (2-3) is specifically as follows: first, obtain the non-critical task B in the non-critical task set B obtained in step (2-2). g The corresponding upward ranking value ranku(B g ), the specific calculation formula is: Among them, SU g Non-critical task B g The set of direct successor tasks in the application DAG graph is represented as Where |SU g | indicates non-critical task B g The number of direct successor tasks in the direct successor task set, SU y ∈SU g , indicating that the task SU y Non-critical task B g The direct successor task of , and y∈[1,|SU g |]; Then, for all non-critical tasks in non-critical task set B, repeat the above process to obtain an upward sorting value set of non-critical task set B; Then, obtain the key task L in the critical path L obtained in step (2-1) p The upward sorting value is calculated using the following formula: Among them, SU Lp It is a critical task p The set of direct successor tasks in the application DAG is represented as Where |SU Lp | indicates critical task L p The number of direct successor tasks in the direct successor task set, SU z ∈SU Lp , indicating that the task SU z It is a critical task p The direct successor task of , and z∈[1,|SU Lp |]. Then, for all the key tasks in the key path L, repeat the above process to obtain the upward sorted value set of the key path L; Then, the upward sorting value set of the non-critical task set B and the upward sorting value set of the critical path L are merged to obtain the upward sorting value set ranku(V) corresponding to the task set V; Finally, according to the upward sorting value set ranku(V), each task in the task set V is sorted in descending order according to its corresponding upward sorting value to obtain the priority of each task in the task set V.
5. The DAG fault tolerance method in a heterogeneous real-time system according to claim 4, characterized in that: Step (3) includes the following sub-steps: (3-1) According to the priority of each task in the task set V obtained in step (2), multiple tasks that meet the priority and their replica parallel start time points on the corresponding heterogeneous processors are obtained, and all replica parallel start time points constitute a replica parallel start time point set S corresponding to the task set V; (3-2) According to the priority of each task in the task set V obtained in step (2-3), the task end time of the task and the scheduling length of the application DAG graph are obtained. (3-3) Each task V in the task set V obtained in step (3-2) i The task end time and the task end time of the corresponding replica task are used to build the task allocation table corresponding to the replica task matrix, and obtain the fault-tolerant and safe scheduling result of the application DAG graph.
6. The DAG fault tolerance method in a heterogeneous real-time system according to claim 5, characterized in that: Step (3-1) is specifically: First, obtain the minimum frequency set f corresponding to the heterogeneous multiprocessor set U low ={f 1,low ,f 2,low ,....f |U|,low } and the highest frequency set f max ={f 1,max ,f 2,max ,....f |U|,max }, f k,low ∈f low Represents heterogeneous processor U k The lowest frequency, f k,max ∈f max Represents heterogeneous processor U k The highest frequency of , and obtain the actual effective frequency matrix corresponding to the heterogeneous multiprocessor set U according to the lowest frequency set and the highest frequency set: Each heterogeneous processor U in the heterogeneous multiprocessor set U k The frequency f k,h From the lowest frequency f k,min To the highest frequency f k,max Change, h represents heterogeneous processor U k The hth actual effective frequency that can be set; Then, obtain each heterogeneous processor U k The transient failure rate set λ when running at its highest frequency max ={λ 1,max ,λ 2,max ,....λ |U|,max }, and according to the transient failure rate set of heterogeneous processors U k Transient failure rate at its highest frequency λ k,max Get heterogeneous processor U k At frequency f k,h Transient failure rate during operation λ k,h , the specific calculation formula is: Among them, d k is a constant greater than 0, indicating a heterogeneous processor U k The voltage / frequency scaling of the sensitive failure rate. Then, repeat the above process to obtain heterogeneous processors U k The transient failure rates of the heterogeneous processor U when running at their respective actual effective frequencies. All transient failure rates constitute k The transient failure rate set λ k ={λ k,low ,....λ k,max }; Then, for all the remaining heterogeneous processors in the heterogeneous multiprocessor set U, the above process is repeated to obtain the transient failure rate sets of all heterogeneous processors when they are running at their respective actual effective frequencies. All transient failure rate sets constitute the transient failure rate matrix λ, which is specifically expressed as: Then, according to the obtained heterogeneous processor U k At its highest frequency f k,max Transient failure rate during operation λ k,max , get task V i In this heterogeneous processor U k At frequency f k,max The parallel start time of the running replicas is S i , the specific calculation formula is: Among them, α and β are both proportional factors, and α∈[0,1], β=1-α, α and β can be adjusted accordingly according to the operation results; Then, for all remaining tasks in the task set V, the above process is repeated to obtain the set of parallel start time points of the replicas corresponding to the task set V = {S1, S2.....S |N| }.
7. The DAG fault tolerance method in a heterogeneous real-time system according to claim 6, characterized in that: Step (3-2) is specifically as follows: first, according to the task V in the task set V obtained in step (2), i The priority of the task V i In the corresponding heterogeneous processor U k The task completion time AFT(V i )=AST(V i ,U k )+W i,k , and the task V i Task end time when a failure occurs on the corresponding heterogeneous processor AFT(V i )=max(avail[q],AST(V i ,U k )+(1-S i )W i,k )+W i,q ; Where q∈[1, the total number of heterogeneous processors in the heterogeneous multiprocessor set U], and q≠k, AST(V i ,U k )+(1-S i )W i,k The copy task corresponds to the heterogeneous processor U q The task start time on the task set V makes task V in the task set V i , its task end time AFT(V i ) varies depending on whether the current task has a fault; Then, get each task V in the task set V i The corresponding copy task set V i '={V i 1 ,V i 2 ,....V i numi } and the number of replica tasks Num in the replica task set i , the number of replica tasks corresponding to all tasks constitutes the replica task number set Num = {Num1, Num2.......Num |N| }, where V i x ∈V i ',x∈[1,Num i ], Represents task V i The corresponding x-th copy task, when x=1 It's Mission V i ; Then, for all remaining tasks in the task set V, the above process is repeated to obtain the copy task matrix V'={V1', V2', .....V |N| '}, specifically expressed as Each task V in the default task set V i The corresponding number of replica tasks is Num i =2; Then, according to the obtained task V i The corresponding copy task set V i ', get the copy task V i x In the corresponding heterogeneous processor U q The task start time AST(V i ,U k )+(1-S i )W i,k , and the copy task V i x In the corresponding heterogeneous processor U q The task end time AFT(V i x ), which is equal to task V i The task end time AFT(V i ); Finally, according to the critical path of the application DAG graph obtained in step (2-1), the scheduling length (i.e., the overall completion time) SL(G) of the application DAG graph is obtained: The copy task Represents the export task V of the application DAG graph exit The corresponding Num exit A copy task, It is the export task V exit ; Step (3-3) is as follows: first, generate a task allocation table corresponding to the replica task matrix V', whose number of rows is The number of columns is 5, of which the first column is the copy task V i x , the second column is the copy task V i x Corresponding heterogeneous processor U q , the third column is the copy task V i x In the corresponding heterogeneous processor U q The frequency f when running k,h By default, k,h =f k,max =1, the fourth column is the copy task V i x In the corresponding heterogeneous processor U q The fifth column is the copy task V. i x In the corresponding heterogeneous processor U q Then, use each copy task V obtained i x In the corresponding heterogeneous processor U q The task start time and task end time are used as row data of the task allocation table, and the task allocation table generated thereby is used as the fault-tolerant and safe scheduling result of the application DAG graph.
8. The DAG fault tolerance method in a heterogeneous real-time system according to claim 7, characterized in that: Step (4) specifically includes the following sub-steps: (4-1) constructing an energy consumption model of the application DAG graph obtained in step (1); (4-2) In the energy consumption model obtained in step (4-1), a set of heterogeneous multiprocessors and a set of replica tasks that meet the frequency reduction conditions are obtained to obtain an energy-saving scheduling result of the application DAG graph.
9. The DAG fault-tolerant method in a heterogeneous real-time system according to claim 8, characterized in that: Step (4-1) specifically includes the following sub-steps: (4-1-1) According to the application DAG graph obtained in step (1), obtain the energy consumption model related parameters of the heterogeneous multi-processor set U, including the frequency-independent dynamic power set P of the heterogeneous multi-processor set U ind = {P 1,ind ,P 2,ind ,.....P |U|,ind }, heterogeneous multiprocessor set U and frequency-dependent dynamic power set P d = {P 1,d ,P 2,d ,.....P |U|,d }, the static power set P of the heterogeneous multiprocessor set U and frequency s = {P 1,s ,P 2,s ,.....P |U|,s }, the effective switch capacitor set C of the heterogeneous multiprocessor set U ef ={C 1,ef ,C 2,ef ,.....C |U|,ef }, and the dynamic power index set m of the heterogeneous multiprocessor set U = {m1,m2,.....m |U| }, where P k,ind Represents heterogeneous processor U k Frequency-independent dynamic power, P k,d Represents heterogeneous processor U k Frequency-dependent dynamic power, P k,s Represents heterogeneous processor U k Frequency-dependent static power, C k,ef Represents heterogeneous processor U k The effective switching capacitance, m k Represents heterogeneous processor U k Dynamic power index; (4-1-2) Based on the scheduling length SL(G) of the application DAG graph obtained in step (3-2) and the static power set P related to the frequency of the heterogeneous multiprocessor set U obtained in step (4-1-1) s = {P 1,s ,P 2,s ,.....P |U|,s }, get the static energy consumption of the application DAG graph (4-1-3) According to the energy consumption model related parameters obtained in step (4-1-1), obtain task V i At a frequency of f k,h Heterogeneous processor U k Dynamic energy consumption generated when running on: in, Represents task V i In heterogeneous processors U k At frequency f k,h The actual running time of the runtime; (4-1-4) Repeat the above step (4-1-3) for all remaining tasks in the task set V to obtain the frequency of each task at f k,h Heterogeneous processor U k The dynamic energy consumption generated when running on the task set is k,h Heterogeneous processor U k The dynamic energy consumption generated when running on the same node is added to obtain the dynamic energy consumption ED(G) of the application DAG graph: (4-1-5) According to the static energy consumption of the application DAG graph obtained in step (4-1-2) and the dynamic energy consumption of the application DAG graph obtained in step (4-1-4), the total energy consumption of the application DAG graph is obtained, that is, the energy consumption model of the application DAG graph: ET(G)=ES(G)+ED(G).
10. The DAG fault tolerance method in a heterogeneous real-time system according to claim 9, characterized in that: Step (4-2) specifically includes the following sub-steps: (4-2-1) According to the energy consumption model obtained in step (4-1), obtain the effective frequency setting range of each heterogeneous processor in the heterogeneous multi-processor set U; Specifically, this step is as follows: first, according to the energy consumption model related parameters obtained in step (4-1-1), the heterogeneous processor U is obtained. k Energy saving frequency (The reduced frequency should be limited, otherwise it will increase the occurrence of transient failures and reduce reliability); then, according to the obtained heterogeneous processor U k Energy-saving frequency, get heterogeneous processor U k The lowest frequency f that can be set on k,low =max(f k,min ,f k,ee ); Finally, obtain each heterogeneous processor U in the heterogeneous multiprocessor set U k The frequency f k,h The effective setting range f k,low ≤f k,h ≤f k,max ; (4-2-2) According to the effective frequency setting interval obtained in step (4-2-1), obtain a set of heterogeneous multi-processors and a set of replica tasks that meet the frequency reduction conditions to obtain an energy-saving scheduling result for the application DAG graph. Specifically, this step is as follows: first, according to the scheduling length (i.e., the overall completion time) obtained in step (3-2) and the task allocation table of the application DAG graph obtained in step (3-3), obtain the task list running on the heterogeneous processor U q The ratio of the total running time of all replica tasks on the same cluster to the scheduling length Among them, the copy task V i x The corresponding heterogeneous processor is U q ; Then, for all the remaining heterogeneous processors in the heterogeneous multiprocessor set U, the above process is repeated to obtain the ratio of the sum of the running time of all replica tasks on each heterogeneous processor in the heterogeneous multiprocessor set U to the scheduling length. The corresponding ratios of all heterogeneous processors constitute the ratio value set RA of the heterogeneous multiprocessor set U = {RA1, RA2, ... RA |U| }, obtain all heterogeneous processors whose ratio values are less than or equal to the preset threshold from the ratio value set of the obtained heterogeneous multi-processor set U to form a heterogeneous multi-processor set that meets the frequency reduction condition, where RA k Indicates that on heterogeneous processor U k The ratio of the total running time of all replica tasks to the scheduling length; Then, according to the direct successor task set succ(V i ) and the task allocation table of the application DAG graph obtained in step (3-3), obtain the replica task V i x The set of direct successor tasks According to the obtained copy task V i x The direct successor task collection of The minimum value of the task start time of each direct successor task in the task, and calculate the copy task V i x The difference between the task end time and the minimum value, where the copy task V i x The set of direct successor tasks and task V i The set of direct successor tasks of Represents the copy task V i x The set of direct successor tasks of ; Then, for the remaining tasks in the replica task matrix V', repeat the above process to obtain the difference of each replica task in the replica task matrix V'. The difference of all replica tasks in the replica task matrix V' constitutes the difference matrix corresponding to the replica task matrix V'. All replica tasks whose difference is greater than the preset threshold 0 are obtained from the difference matrix corresponding to the obtained replica task matrix V' to form a replica task set that meets the frequency reduction condition. Finally, based on the obtained heterogeneous multi-processor set and replica task set that meet the frequency reduction conditions, a frequency reduction operation is performed on each heterogeneous processor and replica task. The new frequency obtained after the frequency reduction operation satisfies the frequency effective setting interval constraint obtained in step (4-2-1), and the third column of data in the task allocation table generated in step (3-3) is updated according to the obtained new frequency. The updated task allocation table is used as the energy-saving scheduling result of the application DAG graph.
Citation Information
Patent Citations
Heterogeneous multi-core system-based task scheduling method applied to power edge computing
CN114385330A
Low-power-consumption and fault-tolerant collaborative scheduling method and device associated with periodic tasks and medium
CN115480901A
Fault-tolerant scheduling method, system and equipment for instantaneous fault of real-time system
CN116643856A
Scheduling method, scheduler, storage medium, and system
US20200412835A1