DAG fault tolerance method in a heterogeneous real-time system

By dynamically calculating the parallel start time of task replicas and optimizing scheduling, combined with an energy consumption model, the problem of insufficient critical protection and excessive resource consumption caused by non-critical task failures in heterogeneous real-time systems is solved, achieving high reliability and low power consumption task scheduling.

CN119917245BActive Publication Date: 2025-12-16HUNAN SAKABAN TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510073215.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-17
Publication Date
2025-12-16
Estimated Expiration
2045-01-17

AI Technical Summary

Technical Problem

Existing DAG fault-tolerance technology has failed to effectively handle non-critical task failures in heterogeneous real-time systems, resulting in insufficient protection for critical tasks. Furthermore, methods based on delayed backup and multiple replica tasks lead to longer overall task completion times or increased resource consumption.

Method used

By dynamically calculating the parallel start time and priority of task replicas, and combining it with an energy consumption model, task scheduling is optimized to achieve high reliability and low power consumption. Different upward sorting value calculation methods are used to distinguish between critical and non-critical tasks, and critical tasks are prioritized for scheduling under the condition of satisfying task constraints, while processors and replica tasks are reasonably downclocked.

Benefits of technology

It achieves reduced system energy consumption, improved system reliability and resource utilization efficiency while ensuring the criticality of the mission and the overall completion time remain unchanged, and solves the problems of insufficient critical support and excessive resource consumption caused by non-critical mission failures in existing technologies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119917245B_ABST
    Figure CN119917245B_ABST
Patent Text Reader

Abstract

The application discloses a DAG fault-tolerant method in a heterogeneous real-time system, comprising the following steps: obtaining a heterogeneous multiprocessor set composed of a plurality of heterogeneous processors and a task set composed of a plurality of tasks to be run on the heterogeneous multiprocessor set, constructing an application DAG graph according to the heterogeneous multiprocessor set and the task set, obtaining the priority of each task in the task set V according to the application DAG graph, obtaining the replica parallel start time point of each task on the corresponding heterogeneous processor in sequence according to the priority of each task, obtaining a replica parallel start time point set S composed of the replica parallel start time point of each task on the corresponding heterogeneous processor, and obtaining a fault-tolerant safe scheduling result corresponding to the task set V in the application DAG graph, constructing an energy consumption model of the application DAG graph, and obtaining an energy-saving scheduling result of the application DAG graph by using the energy consumption model. The application can respond in time when a task fails, realize high-reliability fault tolerance, shorten the overall completion time, and reduce the extra resource energy consumption caused by a plurality of replica tasks.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of heterogeneous real-time systems, and more particularly relates to a DAG fault-tolerant method in a heterogeneous real-time system. BACKGROUND

[0002] In recent years, with the advancement of semiconductor technology, processors have been continuously developing from single-core processors to multi-core processors, from homogeneous multi-core processors to heterogeneous multi-core processors, and their architectures have become increasingly 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 electromagnetic interference, cosmic rays, etc., two types of faults may occur in the system during operation. One type is permanent fault, which causes permanent damage to the circuits in the system. The other type is transient fault, which causes recoverable functional errors in the circuit.

[0003] In order to tolerate faults and ensure the smooth completion of real-time tasks, meet the real-time design constraints of deadlines, fault-tolerant techniques are usually used. Heterogeneous real-time systems with complex functions are usually modeled as directed acyclic graphs (DAG) to capture data dependencies, and DAG fault tolerance refers to a method for ensuring the successful scheduling of an application DAG graph when a corresponding heterogeneous processor fails (such as transient fault, permanent fault) when scheduling each task in the application DAG graph on the corresponding heterogeneous processor. Therefore, a DAG fault-tolerant method in a heterogeneous real-time system has obvious practical significance.

[0004] One of the existing DAG fault-tolerant techniques is the replication strategy, which sacrifices a small amount of resources to improve data security and shorten the response time during application execution. Replication strategy can be divided into active replication technology and passive replication technology. In active replication, the main task and the backup are performed simultaneously. In passive replication, the backup will only start to execute when the main task fails.

[0005] The current popular DAG fault-tolerant scheme based on active replication mainly includes: first, replication strategy is performed for critical tasks in the application to meet the overall completion time constraints of the application DAG graph; second, delay backup technology, which reduces the redundancy of backups by scheduling each task's corresponding replica task as far back as possible and aborting the execution of the replica task when the main task successfully executes; third, scheduling 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-tolerant schemes based on active replication have some non-negligible defects:

[0007] The first method only performs a replication strategy on a key task in the application DAG graph, and does not consider the failure of a non-key task, so that when the non-key task fails, the criticality of the application DAG graph cannot be guaranteed.

[0008] The second method reduces the redundancy of backup through a delayed backup technology, but since it schedules a replica task corresponding to each task as far back as possible, when a task fails, the processor cannot respond in time, and the overall task completion time is lengthened.

[0009] The third method tolerates multiple failures and improves system reliability by allocating more replica tasks, but since multiple replica tasks are used, more system resources are required, and the overall task completion time is also lengthened. SUMMARY

[0010] In view of the above defects or improvement needs of the prior art, the present application provides a DAG fault-tolerant method in a heterogeneous real-time system, which aims to solve the technical problems that the existing replication strategy based on a key task does not consider non-key task failures, so that when a non-key task fails, the criticality of the application DAG graph cannot be guaranteed, and the existing delayed backup technology causes the processor to be unable to respond in time and the overall task completion time to be lengthened because it schedules a replica task corresponding to each task as far back as possible, the present application considers the failure rate and criticality of each task, dynamically calculates the replica parallel start time point, and shortens the overall completion time while achieving high-reliability DAG fault tolerance, thereby balancing the relationship between high-reliability requirements and completion time; and the existing replication strategy based on allocating more replica tasks causes additional resource consumption and lengthening of the completion time due to multiple replica tasks, so that the present application reduces energy consumption while maintaining the completion time, thereby balancing the relationship between high reliability and low power consumption.

[0011] To achieve the above-mentioned purpose, according to one aspect of the present application, a DAG fault-tolerant method in a heterogeneous real-time system is provided, comprising the following steps:

[0012] (1) obtaining a heterogeneous multiprocessor set composed of a plurality of heterogeneous processors and a task set composed of a plurality of tasks to be run on the heterogeneous multiprocessor set, and constructing an application DAG graph according to the heterogeneous multiprocessor set and the task set;

[0013] (2) obtaining the priority of each task in the task set V according to the application DAG graph obtained in step (1);

[0014] (3) obtaining the priority of each task in the task set V obtained in step (2), obtaining the replica parallel start time point of each task on the corresponding heterogeneous processor in turn, and obtaining the replica parallel start time point set S composed of the replica parallel start time point of each task on the corresponding heterogeneous processor, and the fault-tolerant safe scheduling result corresponding to the task set V in the application DAG graph.

[0015] (4) constructing the energy consumption model of the application DAG graph obtained in step (1), and obtaining the energy-saving scheduling result of the application DAG graph using the energy consumption model.

[0016] Preferably, step (1) comprises the following sub-steps:

[0017] (1-1) obtaining a heterogeneous multiprocessor set U = {U1, U2,..., U |U|} composed of a plurality of heterogeneous processors and a task set V = {V1, V2,..., V |N|} composed of a plurality of tasks to be run on the heterogeneous multiprocessor set, wherein |U| represents the size of the heterogeneous multiprocessor set U, i.e. the total number of heterogeneous processors in the heterogeneous multiprocessor set; |N| represents the size of the task set V, i.e. the total number of tasks in the task set;

[0018] (1-2) constructing an application DAG graph according to the heterogeneous multiprocessor set and the task set obtained in (1-1);

[0019] This step specifically comprises the following steps: first, using the task set V to form a plurality of nodes in the application DAG graph, wherein the tasks V i ∈V (wherein i ∈ [1, the total number of tasks in the task set]) represent tasks with different running times on the heterogeneous multiprocessor set; then obtaining the direct predecessor task set pred(V i ) and the direct successor task set succ(V i ) of the task V entry in the application DAG graph, obtaining the entry task V exit without a direct predecessor task and the exit task V i without a direct successor task in the application DAG graph; then, obtaining the running time W k of the task V i,k running at the maximum frequency on the corresponding heterogeneous processor U i (wherein k ∈ [1, the total number of heterogeneous processors in the heterogeneous multiprocessor set U]), and constructing a running time set W according to the running time of all tasks in the task set V on different heterogeneous processors; thereafter, obtaining the task start time AST of the task V k on the corresponding heterogeneous processor U

[0020]

[0021] Among them, V entry This represents the entry task in the application's DAG graph, with entry task V. entry In the corresponding heterogeneous processor U k The task start time on AST(V) is 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's DAG graph is denoted as PR. i ={PR1,PR2,...PR |PRi|}, where |PR i | Represents task V i The number of direct predecessor tasks in the set of direct predecessor tasks, PR j ∈PR i Indicates task PR j It is Task V i The direct predecessor task, and j∈[1,|PR i |],AFT(PR j ) represents task V i Direct precursor mission PR j The task completion time.

[0022] Preferably, step (2) specifically includes the following sub-steps:

[0023] (2-1) Obtain the critical path of the application based on the DAG graph obtained in step (1);

[0024] (2-2) Based on 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 = {B1, B2, ..., B} in the application DAG graph. |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's DAG graph, and g∈[1,|B|], the critical paths and non-critical task sets in the application's DAG graph together constitute the task set V;

[0025] (2-3) Based on the critical path L obtained in step (2-1) and the non-critical task set B obtained in step (2-2), obtain the set of upward sorted values ​​corresponding to the task set V and the priority of each task in it.

[0026] Preferably, step (2-1) specifically refers to, first, obtaining any one task V in the task set V i , obtaining the running time of the task on each heterogeneous processor in the heterogeneous processor set U, and averaging all running times of the task on all heterogeneous processors in the heterogeneous processor set U to obtain the average running time of the task V i running on each heterogeneous processor 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 processor set U Then, according to the obtained average running time set And using the depth-first algorithm DFS to obtain the critical path L = {L1, L2,..., L L} of the application DAG graph, wherein |L| represents the length of the critical path L, i.e. the number of critical tasks, L p ∈L represents that it is a critical task in the application DAG graph, and p ∈ [1, |L|];

[0027] Step (2-3) specifically refers to, first, obtaining the non-critical task B g 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] Wherein, SU g is the direct successor task set of the non-critical task B g in the application DAG graph, denoted as SU |SUg| ={SU1, SU2,..., SU g}, wherein |SU g | represents the number of direct successor tasks in the direct successor task set of the non-critical task B y , SU g ∈SU y , indicates that the task SU g is a direct successor task of the non-critical task B g , and y ∈ [1, |SU p |];

[0030] Then, for all non-critical tasks in the non-critical task set B, repeat the above process to obtain the upward ranking value set of the non-critical task set B;

[0031] Then, obtaining the critical task L pthe upward ordering value of the task set V, and the calculation formula is as follows:

[0032]

[0033] wherein, SU Lp is a critical task L p The direct successor task set in the application program DAG is denoted as SU Lp ={SU1, SU2, …, SU |SULp|}, wherein |SU Lp | represents the number of direct successor tasks in the direct successor task set of the critical task L p , SU z ∈SU Lp , indicates that the task SU z is a direct successor task of the critical task L p , and z ∈ [1, |SU Lp |].

[0034] Then, for all critical tasks in the critical path L, the above process is repeated to obtain the upward ordering value set of the critical path L;

[0035] Thereafter, the upward ordering value set of the non-critical task set B and the upward ordering value set of the critical path L are merged to obtain the upward ordering value set ranku(V) corresponding to the task set V;

[0036] Finally, according to the upward ordering value set ranku(V), each task in the task set V is sorted in descending order according to its corresponding upward ordering 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), a plurality of tasks satisfying 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 program DAG are obtained.

[0040] (3-3) According to the task end time of each task V i in the task set V obtained in step (3-2) and the task end time of its corresponding replica task, a task allocation table corresponding to the replica task matrix is constructed, and a fault-tolerant safe scheduling result of the application program DAG is obtained.

[0041] Preferably, step (3-1) is specifically,

[0042] Firstly, the lowest frequency set corresponding to the heterogeneous multi-processor set U is obtained

[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 the lowest frequency of the heterogeneous processor U k , f k,max ∈f max represents the highest frequency of the heterogeneous processor U k , and the actual effective frequency matrix corresponding to the heterogeneous multi-processor set U is obtained according to the lowest frequency set and the highest frequency set:

[0044]

[0045] The frequency f k,h of each heterogeneous processor U k in the heterogeneous multi-processor set U can vary from the lowest frequency f k,min to the highest frequency f k,max , and h represents the hth actual effective frequency that the heterogeneous processor U k can be set to;

[0046] Then, the transient fault rate set λ max ={λ 1,max ,λ 2,max ,....λ |U|,max} of each heterogeneous processor U k when running at its highest frequency is obtained, and the transient fault rate λ k,h of the heterogeneous processor U k when running at frequency f k,h is obtained according to the transient fault rate λ k,max of the heterogeneous processor U k when running at its highest frequency in the transient fault rate set, and the specific calculation formula is:

[0047]

[0048] where d k is a constant greater than 0, representing the voltage / frequency scaling sensitive fault rate of the heterogeneous processor U k .

[0049] Subsequently, the above process is repeated to sequentially obtain heterogeneous processor U k The transient failure rates at each of its actual effective frequencies constitute the heterogeneous processor U. k The set of transient failure rates λ k ={λ k,low ,....λ k,max};

[0050] Subsequently, the above process is repeated for all remaining heterogeneous processors in the heterogeneous multiprocessor set U to obtain the transient failure rate set of all heterogeneous processors operating at their respective actual effective frequencies. The transient failure rate sets constitute the transient failure rate matrix λ, specifically represented as follows:

[0051]

[0052] Then, based on the obtained heterogeneous processor U k With its highest frequency f k,max transient failure rate λ during operation k,max Get Task V i In the heterogeneous processor U k The above frequency f k,max Runtime replica parallel start time S i The specific calculation formula is as follows:

[0053]

[0054] Where α and β are both scaling factors, and α∈[0,1], β=1-α, and α and β can be adjusted accordingly based on the running results;

[0055] Then, for all remaining tasks in task set V, repeat the above process to obtain the set of parallel start times S = {S1, S2, ..., S...} corresponding to task set V. |N|}

[0056] Preferably, step (3-2) specifically involves first, selecting task V from the task set V obtained in step (2). i Priority, obtain the task V i In the corresponding heterogeneous processor U k The task end time AFT(V) when no failure occurs (successful completion) 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 replica task is performed on the corresponding 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 It varies depending on whether the current task has failed;

[0059] Subsequently, obtain each task V in the task set V. i The corresponding set of dungeon quests V i '={V i 1 V i 2 ,....V i numi} and the number of dungeon quests in the dungeon quest set, Num i The number of replica tasks corresponding to all tasks constitutes the set of replica task numbers Num = {Num1, Num2, ..., Num...} |N|}, where V i x ∈V i ',x∈[1,Num i ], Represents task V i The corresponding x-th instance task, when x=1 That is, task V i ;

[0060] Subsequently, for all remaining tasks in task set V, the above process is repeated to obtain a replica task matrix V' = {V1', V2', ..., V...} of task set V. |N| '}, specifically represented as

[0061]

[0062] Each task V in the default task set V i The corresponding number of dungeon quests is Num i =2;

[0063] Then, based on the obtained task V i The corresponding set of dungeon quests V i ', Obtain the dungeon quest 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 V instance quest i x In the corresponding heterogeneous processor U q The task end time AFT(V) on i x ), which is equal to task V i Task end time AFT(V) i );

[0064] Finally, based on the critical path of the application DAG obtained in step (2-1), the scheduling length (i.e., the overall completion time) SL(G) of the application DAG is obtained:

[0065]

[0066] Among them, dungeon missions The exit task V represents the DAG graph of the application. exit The corresponding Num exit One instance quest, That is, export task V exit ;

[0067] Step (3-3) specifically involves first generating a task allocation table corresponding to the replica task matrix V', with the following number of rows: The number of columns is 5, where the first column is the dungeon quest V. i x The second column is the dungeon quest V. i x Corresponding heterogeneous processor U q The third column is the dungeon quest V. i x In the corresponding heterogeneous processor U q Frequency f during operation k,h By default, f k,h =f k,max =1, the fourth column is the dungeon quest V i x In the corresponding heterogeneous processor U q The task start time is shown in the top right corner, and the fifth column indicates the dungeon quest V. i x In the corresponding heterogeneous processor Uq the end time of each copy task V i x the start time and the end time of the task on the corresponding heterogeneous processor U q as the row data of the task allocation table, and the generated task allocation table is used as the fault-tolerant safe scheduling result of the application DAG graph.

[0068] Preferably, step (4) specifically comprises the following sub-steps:

[0069] (4-1) constructing an energy consumption model of the application DAG graph obtained in step (1);

[0070] (4-2) obtaining a set of heterogeneous multi-processors and a set of copy tasks that satisfy the frequency reduction condition in the energy consumption model obtained in step (4-1), to obtain an energy-saving scheduling result of the application DAG graph.

[0071] Preferably, step (4-1) specifically comprises the following sub-steps:

[0072] (4-1-1) obtaining the energy consumption model related parameters of the set of heterogeneous multi-processors U according to the application DAG graph obtained in step (1), including the set of frequency-independent dynamic power P ind ={P 1,ind ,P 2,ind ,.....P |U|,ind} of the set of heterogeneous multi-processors U, the set of frequency-dependent dynamic power P d ={P 1,d ,P 2,d ,.....P |U|,d} of the set of heterogeneous multi-processors U, the set of frequency-dependent static power P s ={P 1,s ,P 2,s ,.....P |U|,s} of the set of heterogeneous multi-processors U, the set of effective switching capacitances C ef ={C 1,ef ,C 2,ef ,.....C |U|,ef} of the set of heterogeneous multi-processors U, and the set of dynamic power exponents m={m1,m2,.....m |U|} of the set of heterogeneous multi-processors U, wherein P k,ind represents the frequency-independent dynamic power of the heterogeneous processor U k , P k,d represents the frequency-dependent dynamic power of the heterogeneous processor U k , P k,s represents the frequency-dependent static power of the heterogeneous processor U k , and Ck,ef denotes the effective switched capacitance of the heterogeneous processor U k , m k denotes the dynamic power exponent of the heterogeneous processor U k ;

[0073] (4-1-2) According to the scheduling length SL(G) of the application DAG graph obtained in step (3-2) and the frequency-dependent static power set P s 1,s 2,s |U|,s obtained in step (4-1-1), obtain 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 the dynamic energy consumption of the task V i running on the heterogeneous processor U k,h at frequency f k :

[0075]

[0076] wherein, denotes the actual running time of the task V i running on the heterogeneous processor U k at frequency f k,h ;

[0077] (4-1-4) Repeat the above step (4-1-3) for all remaining tasks in the task set V, to obtain the dynamic energy consumption of each task running on the heterogeneous processor U k,h at frequency f k , and add the dynamic energy consumption of all tasks in the task set running on the heterogeneous processor U k,h at frequency f k 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), obtain the total energy consumption of the application DAG graph, i.e. the energy consumption model of the application DAG graph:

[0079] ET(G) = ES(G) + ED(G);

[0080] Preferably, step (4-2) specifically comprises the following sub-steps:

[0081] ​​​(4-2-1) Based on the energy consumption model obtained in step (4-1), obtain the effective frequency setting range for each heterogeneous processor in the heterogeneous multiprocessor set U;

[0082] Specifically, this step involves first obtaining the energy consumption model parameters obtained in step (4-1-1) to determine the heterogeneous processor U... k energy saving frequency (The reduced frequency should be limited; otherwise, it will increase the occurrence of transient failures and reduce reliability); then, based on the obtained heterogeneous processor U... k Energy-saving frequency, obtain heterogeneous processor U k The lowest configurable frequency f k,low =max(f k,min ,f k,ee Finally, obtain each heterogeneous processor U in the heterogeneous multiprocessor set U. k frequency f k,h Valid setting interval f k,low ≤f k,h ≤f k,max ;

[0083] (4-2-2) Based on the effective frequency setting range obtained in step (4-2-1), obtain the heterogeneous multiprocessor set and replica task set that meet the frequency reduction conditions, so as to obtain the energy-saving scheduling result of the application DAG graph.

[0084] Specifically, this step involves first, based on the scheduling length (overall completion time) obtained in step (3-2) and the task allocation table of the application DAG obtained in step (3-3), obtaining the task allocation table for the application running on the heterogeneous processor U. q The percentage of the total runtime of all replica tasks on the scheduler. Among them, dungeon quest V i x The corresponding heterogeneous processor is U q ;

[0085] Then, for all remaining heterogeneous processors in the heterogeneous multiprocessor set U, the above process is repeated to obtain the proportion of the total running time of all replica tasks on each heterogeneous processor in the heterogeneous multiprocessor set U to the scheduling length. The proportions corresponding to all heterogeneous processors constitute the proportion value set RA = {RA1, RA2, ... RA} of the heterogeneous multiprocessor set U. |U|}, from the obtained set of proportion values ​​of the heterogeneous multiprocessor set U, all heterogeneous processors whose proportion values ​​are less than or equal to a preset threshold are selected to form a heterogeneous multiprocessor set that meets the frequency reduction condition, where RA k Indicates that in heterogeneous processor U k The percentage of the total runtime of all replica tasks relative to the scheduling length;

[0086] Then, based on the direct successor task set succ(V) obtained in step (1-2) i The task allocation table of the application DAG graph obtained in step (3-3) is used to obtain the copy task V. i x The set of direct successor tasks Based on the obtained dungeon quest V i x The set of direct successor tasks, get the set Find the minimum start time of each direct successor task and calculate the replica task V. i x The difference between the task's end time and the minimum value, where the duplicate task V... i x The set of direct successor tasks and task V i The set of direct successor tasks is consistent with that of SU. i x Indicates the dungeon quest V i x The set of direct successor tasks;

[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 differences of all replica tasks in the replica task matrix V' constitute the difference matrix corresponding to the replica task matrix V'. From the obtained difference matrix corresponding to the replica task matrix V', obtain all replica tasks with differences greater than the preset threshold 0 to form a set of replica tasks that meet the frequency reduction condition.

[0088] Finally, based on the obtained set of heterogeneous multiprocessors and replica task sets that meet the frequency reduction conditions, 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 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 summary, compared with the prior art, the above-described technical solutions conceived by this invention can achieve the following beneficial effects:

[0090] (1) The application combines the criticality of the task into the calculation of the upward ranking value (ranku) by adopting step (2), and different upward ranking value (ranku) calculation methods are adopted for critical tasks and non-critical tasks, so that critical tasks are preferentially scheduled under the condition of meeting task constraints, and the criticality of the task is better reflected, so that the technical problem that the existing replication strategy based on critical tasks cannot guarantee the criticality of the application DAG graph when a non-critical task fails because only critical tasks are considered, and the criticality of the task is reflected.

[0091] (2) The application calculates the replica parallel start time point of each task in the task set by adopting steps (3-1) to (3-2), considers the proportion of the failure rate and the task priority in calculating the replica parallel start time point, and dynamically calculates the replica parallel start time point of the task; at the same time, the task end time of each task in the task set is different according to whether a failure occurs, therefore, the method of replica parallel start time point not only meets the fault tolerance demand of the application DAG graph, but also shortens the overall completion time of the task on the basis of realizing high reliability, solves the technical problem that the existing replication strategy based on allocating more replica tasks causes the completion time to become longer due to multiple replica tasks, and the application can be applied to multiple scenes.

[0092] (3) The application further reduces the overall energy consumption on the basis of keeping the completion time unchanged by reasonably reducing the frequency of each heterogeneous processor and replica task in the set according to the generated task allocation table, that is, the fault tolerance and safety scheduling result of the application DAG graph, so as to meet the high reliability and low power consumption demand of the user, and therefore, the technical problem that the existing replication strategy based on allocating more replica tasks causes additional resource consumption due to multiple replica tasks can be solved. BRIEF DESCRIPTION OF DRAWINGS

[0093] Figure 1 is a flowchart of the DAG fault tolerance method in the heterogeneous real-time system of the application. DETAILED DESCRIPTION

[0094] In order to make the purpose, technical scheme and advantages of the application more clear and understandable, the application is further described in detail below in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the application and do not limit the application. In addition, the technical features involved in each embodiment of the application described below can be combined with each other as long as they do not conflict with each other.

[0095] The embodiment of the application provides a DAG fault-tolerant method in a heterogeneous real-time system, which basically comprises the following steps: constructing an application DAG graph; obtaining the priority of each task in a task set according to the obtained application DAG graph, specifically, calculating the critical path and the non-critical task set in the application DAG graph, and using different ranku calculation methods for the critical task and the non-critical task, combining the task criticality with the ranku calculation, and reflecting the role of the critical task in the task priority calculation; obtaining the fault-tolerant safe scheduling result corresponding to the task set in the application DAG graph, specifically, calculating the replica parallel start time point of each task in the task set, considering the proportion of the failure rate and the task priority in the calculation of the replica parallel start time point, dynamically calculating the replica parallel start time point of the task, constructing the task allocation table corresponding to the replica task matrix, that is, the fault-tolerant safe scheduling result of the application DAG graph; constructing an energy consumption model of the application DAG graph, and obtaining the energy-saving scheduling result of the application DAG graph by using the energy consumption model, specifically, according to the obtained task allocation table corresponding to the replica task matrix, obtaining the heterogeneous multiprocessor set and the replica task set that meet the frequency reduction condition, and reasonably reducing the frequency of each heterogeneous processor and replica task in the set, thereby further reducing the energy consumption on the basis of keeping the completion time unchanged.

[0096] As shown in Figure 1 The application provides a DAG fault-tolerant method in a heterogeneous real-time system, which comprises the following steps:

[0097] (1) obtaining a heterogeneous multiprocessor set composed of a plurality of heterogeneous processors and a task set composed of a plurality of tasks to be run on the heterogeneous multiprocessor set, and constructing an application DAG graph according to the heterogeneous multiprocessor set and the task set;

[0098] This step comprises the following substeps:

[0099] (1-1) obtaining a heterogeneous multiprocessor set U={U1, U2,..., U |U|} composed of a plurality of heterogeneous processors and a task set V={V1, V2,..., V |N|} composed of a plurality of tasks to be run on the heterogeneous multiprocessor set, wherein |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 multiprocessor set and the task set obtained in (1-1);

[0101] This step specifically comprises the following steps: first, using the task set V to form a plurality of nodes in the application DAG graph, and using the task Vi ∈V (where i ∈ [1, total number of tasks in task set V]) represents tasks with different running times on the heterogeneous multiprocessor set U; then, the tasks V i The direct predecessor task set pred(Vi) and the direct successor task set succ(V i ) in the application DAG graph are obtained entry The entry task V entry (entry = 1) in the task set V, which has no direct predecessor task in the application DAG graph, and the exit task V exit (exit = |N|) in the task set V, which has no direct successor task in the application DAG graph, are obtained; then, the tasks V exit are obtained i run at the maximum frequency on the corresponding heterogeneous processor U k (where k ∈ [1, total number of heterogeneous processors in the heterogeneous processor set U], the task V i is run on the corresponding heterogeneous processor U k , which is the idle heterogeneous processor in the heterogeneous processor set U that runs the task V i in the shortest time) and the running time W i,k is obtained i ; the running time set W (which is a |N| × |U| matrix, since each task V i ∈V has different running times on different processors due to the heterogeneity of the processors) is constructed according to the running times of all tasks in the task set V on different heterogeneous processors; then, the tasks V k are obtained

[0102]

[0103] where V entry represents the entry task in the application DAG graph, which has no direct predecessor task, is the task that is scheduled first in the application DAG graph, so the entry task V entry has a task start time of AST(V k ,U entry ) = 0 on the corresponding heterogeneous processor U k ; avail[k] represents the earliest available time for the heterogeneous processor U k to execute a task, PR i is the direct predecessor task set of the task V i in the application DAG graph, and is represented as PR i = {PR1, PR2,...PR |PRi|}, where |PRi | Represents task V i The number of direct predecessor tasks in the set of direct predecessor tasks, PR j ∈PR i Indicates task PR j It is Task V i The direct predecessor task, and j∈[1,|PR i |],AFT(PR j ) represents task V i Direct precursor mission PR j The task completion time, and the execution of tasks should satisfy the constraints between them, for task V in task set V. i It 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, we obtain the constructed application DAG graph, denoted as G = (V, W).

[0105] (2) Obtain the priority of each task in the task set V based on 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 based on the DAG graph obtained in step (1);

[0108] Specifically, this step involves first obtaining any one task V from the task set V. i Obtain the runtime of the task on each heterogeneous processor in the heterogeneous multiprocessor set U, and average the runtime of the task across all heterogeneous processors in the heterogeneous multiprocessor set U to obtain task V. i Average runtime on various heterogeneous processors Then, for all remaining tasks in task set V, repeat the above process to obtain the average runtime set of all tasks in task set V on all heterogeneous processors in heterogeneous multiprocessor set U. Then, based on the obtained average runtime set The Depth-First Search (DFS) algorithm is used to obtain the critical path L = {L1, L2, ..., L...} of the application's Directed Acyclic Graph (DAG). L}, where |L| represents the length of the critical path L, i.e., the number of critical tasks, L p ∈L indicates that it is a key task in the application's DAG graph, and 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), a non-critical task set B = {B1, B2,... B |B|} in the application DAG graph is obtained, wherein |B| represents the number of non-critical tasks in the non-critical task set B, B g e B represents that it is a non-critical task in the application DAG graph, and g e [1, |B|], the critical path and the 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 ranking value set corresponding to the task set V and the priority of each task are obtained.

[0111] This step specifically comprises the following steps. First, the upward ranking value (Upward Rank Value, abbreviated as ranku) ranku(B g ) corresponding to the non-critical task B g in the non-critical task set B obtained in step (2-2) is obtained, and the specific calculation formula is as follows:

[0112]

[0113] Wherein, SU g is the direct successor task set of the non-critical task B g in the application DAG graph, and is represented as SU g = {SU1, SU2,... SU |SUg|}, wherein |SU g | represents the number of direct successor tasks in the direct successor task set of the non-critical task B g , SU y e SU g , represents that the task SU y is a direct successor task of the non-critical task B g , and y e [1, |SU g |], which well satisfies the constraint between tasks;

[0114] Then, for all non-critical tasks in the non-critical task set B, the above process is repeated to obtain the upward ranking value set of the non-critical task set B;

[0115] Then, the upward ranking value of the critical task L p in the critical path L obtained in step (2-1) is obtained, and the following calculation formula is used:

[0116]

[0117] wherein SU Lp is a critical task L p In the set of direct successor tasks in the application program DAG, denoted as SU Lp ={SU1, SU2,..., SU |SULp|}, wherein |SU Lp | represents the number of direct successor tasks in the set of direct successor tasks of the critical task L p , SU z ∈SU Lp , represents that the task SU z is a direct successor task of the critical task L p , and z∈[1, |SU Lp |], the formula considers the task criticality while meeting the constraint between tasks.

[0118] Then, for all critical tasks in the critical path L, the above process is repeated to obtain the set of upward ranking values of the critical path L;

[0119] Thereafter, the set of upward ranking values of the non-critical task set B and the set of upward ranking values of the critical path L are merged to obtain the set of upward ranking values ranku(V) corresponding to the task set V;

[0120] Finally, according to the set of upward ranking values ranku(V), each task in the task set V is sorted in descending order according to its corresponding upward ranking 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 program DAG, which combines task criticality with ranku calculation, reflects the role of critical tasks in task priority calculation, and makes the critical task L p precede the non-critical task B g , that is, the ranku(L p ) of the critical task is greater than the ranku(B g ) of the non-critical task, which meets the constraint between tasks while considering the priority of the critical task.

[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 point of each task on the corresponding heterogeneous processor, and the fault-tolerant safe scheduling result corresponding to the task set V in the application program DAG;

[0123] Specifically, this step first obtains the parallel start time of each task on the corresponding heterogeneous processor based on the priority of each task in the task set V obtained in step (2). The proportion of failure rate and task priority in the calculation of the parallel start time is considered. The proportion can be adjusted according to the specific running results to achieve fault-tolerant scheduling of each task in the task set V on the corresponding heterogeneous processor. Second, based on the obtained parallel start time 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, thereby achieving safe scheduling of each task in the task set V on the corresponding heterogeneous processor. Based on the above steps, the fault-tolerant 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) Based on the priority of each task in the task set V obtained in step (2), obtain multiple tasks that meet the priority and their corresponding parallel start time points on the heterogeneous processor. All parallel start time points constitute the set of parallel start time points S corresponding to the task set V.

[0126] Specifically, this step involves first obtaining the set of lowest frequencies 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 Indicates heterogeneous processor U k The lowest frequency, f k,max ∈f max Indicates heterogeneous processor U k The highest frequency, and obtain the actual effective frequency matrix corresponding to the heterogeneous multiprocessor set U based on the lowest frequency set and the highest frequency set:

[0127]

[0128] Each heterogeneous processor U in the heterogeneous multiprocessor set U k frequency f k,h (where h represents heterogeneous processor U) k The h-th actual effective frequency (which can be set) can be from the lowest frequency f k,min up to the highest frequency f k,max change;

[0129] Then, the transient failure rate λ k of the heterogeneous processor U max running at its highest frequency f 1,max is obtained, and the transient failure rate λ 2,max of the heterogeneous processor U |U|,max running at its highest frequency f k is obtained according to the transient failure rate set λ k,max of the heterogeneous processor U k running at its highest frequency f k,h . k,h The transient failure rate λ k of the heterogeneous processor U k running at the frequency f k is obtained, and the specific calculation formula is as follows:

[0130]

[0131] Wherein, d k is a constant greater than 0, representing the voltage / frequency scaling sensitive failure rate of the heterogeneous processor U k .

[0132] Subsequently, the above process is repeated to obtain the transient failure rate of the heterogeneous processor U k,low running at each of its actual effective frequencies, and all the transient failure rates constitute the transient failure rate set λ k,max of the heterogeneous processor U k,h .

[0133] Thereafter, the above process is repeated for all the remaining heterogeneous processors in the heterogeneous processor set U to obtain the transient failure rate set of all the heterogeneous processors running at each of their actual effective frequencies, and all the transient failure rate sets constitute the transient failure rate matrix λ, which is specifically represented as:

[0134]

[0135] In subsequent calculations, by default, the maximum frequency 1 is run, i.e. f k,max = 1, and the running time of the task V i on the corresponding heterogeneous processor U k is still W i,k .

[0136] Then, according to the obtained transient failure rate λ k of the heterogeneous processor U k,max running at its highest frequency f k,max , the transient failure rate λ i of the task V k running on the heterogeneous processor U k,maxRuntime replica parallel start time S i The specific calculation formula is as follows:

[0137]

[0138] Where α and β are both scaling factors, and α∈[0,1], β=1-α, and α and β can be adjusted accordingly based on the running results;

[0139] Then, for all remaining tasks in task set V, repeat the above process to obtain the set of parallel start times S = {S1, S2, ..., S...} corresponding to task set V. |N|};

[0140] The advantage of this step (3-1) is that it obtains the set S of parallel start times for the replicas of the task set V. For any S... i ∈S, when the task has a high failure rate and a high priority, S i S approaches 1 when the task has a low failure rate and low priority. i Approaching 0, dynamic computation task V i The parallel start time of the replicas S i (Non-fixed value) to achieve fault-tolerant scheduling of task set V in the application's DAG graph;

[0141] (3-2) Based on the priority of each task in the task set V obtained in step (2-3), obtain the task completion time and the scheduling length of the application DAG graph.

[0142] Specifically, this step involves first determining the tasks V in the task set V obtained in step (2). i Priority, obtain the task V i In the corresponding heterogeneous processor U k The task end time AFT(V) when no failure occurs (successful completion) 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] Wherein, q∈[1, the total number of heterogeneous processors in the heterogeneous multi-processor set U], and q≠k (that is, each task in the task set and its corresponding replica task are allocated to different heterogeneous processors U) k and U q The above), AST(V i ,U k )+(1-S i )W i,k is the task start time of the replica task on the corresponding heterogeneous processor U q , so that the task V i in the task set V has a task end time AFT(V i ) which is different according to whether the current task fails;

[0145] Subsequently, the corresponding replica task set V i ' of each task V i in the task set V is obtained, which is represented as V i 1 ,V i 2 ,....V i numi} and the number of replica tasks Num i in the replica task set, the number of replica tasks corresponding to all tasks constitutes a replica task number set Num={Num1,Num2.......Num |N|}, wherein V i x ∈V i ' and x∈[1,Num i ], represents the xth replica task corresponding to the task V i , and when x=1 , it is the task V i ;

[0146] Subsequently, the above process is repeated for all remaining tasks in the task set V, so as to obtain the replica task matrix V'={V1',V2',.....V |N| '} of the task set V, which is specifically represented as

[0147]

[0148] In the present application, in order to save the resources of each heterogeneous processor, the number of replica tasks corresponding to each task V i in the task set V is Num i =2 by default;

[0149] Then, according to the obtained replica task set V i ' corresponding to the task V icopy task V i x the start time AST(V q ,U i ) of the task on the corresponding heterogeneous processor U k )+(1-S i )W i,k , and the copy task V i x the end time AFT(V q ) of the task on the corresponding heterogeneous processor U i x , which is equal to the end time AFT(V i ) of the task 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] wherein the copy task represents the exit task V exit of the application DAG graph, and the corresponding Num exit th copy task, is the exit task V exit ;

[0153] (3-3) According to the end time of each task V i in the task set V obtained in step (3-2) and the end time of the corresponding copy task, a copy task matrix corresponding task allocation table is constructed, and a fault-tolerant safe scheduling result of the application DAG graph is obtained;

[0154] This step is specifically, first, a task allocation table corresponding to the copy task matrix V' (which is initially empty) is generated, the number of rows is and the number of columns is 5 (wherein 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 the frequency f q when running on the corresponding heterogeneous processor U k,h , by default f k,h = f k,max = 1, the fourth column is the copy task V i xthe task start time on the corresponding heterogeneous processor U q , the fifth column is the task end time of the replica task V i x the task start time on the corresponding heterogeneous processor U q , the task end time of the replica task V i x the task start time on the corresponding heterogeneous processor U q , the task end time of the replica task V i 1 = V i , that is, the task start time and the task end time of the replica task V i 1 are replaced by the task start time and the task end time of the task V i , and the generated task allocation table is used as the fault-tolerant 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 an energy-saving scheduling result 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), obtaining energy consumption model related parameters of the heterogeneous multi-processor set U, including a set of frequency-independent dynamic power P ind = {P 1,ind , P 2,ind ,..., P |U|,ind} of the heterogeneous multi-processor set U, a set of frequency-dependent dynamic power P d = {P 1,d , P 2,d ,..., P |U|,d} of the heterogeneous multi-processor set U, a set of frequency-dependent static power P s = {P 1,s , P 2,s ,..., P |U|,s} of the heterogeneous multi-processor set U, and a set of effective switching capacitances C ef = {C 1,ef , C 2,ef ,..., C |U|,ef} and a dynamic power exponent set m = {m1, m2,..., m |U|} of the heterogeneous multiprocessor set U, where P k,ind represents the dynamic power of the heterogeneous processor U k independent of frequency, P k,d represents the dynamic power of the heterogeneous processor U k dependent on frequency, P k,s represents the static power of the heterogeneous processor U k dependent on frequency, C k,ef represents the effective switching capacitance of the heterogeneous processor U k , m k represents the dynamic power exponent of the heterogeneous processor U k ;

[0160] (4-1-2) According to the scheduling length SL(G) of the application DAG graph obtained in step (3-2) and the static power set P s = {P 1,s , P 2,s ,..., P |U|,s} of the heterogeneous multiprocessor set U obtained in step (4-1-1), the static energy consumption of the application DAG graph is obtained:

[0161] (4-1-3) According to the energy consumption model related parameters obtained in step (4-1-1), the dynamic energy consumption generated when the task V i runs on the heterogeneous processor U k,h with frequency f k is obtained:

[0162]

[0163] wherein, represents the actual running time of the task V i running on the heterogeneous processor U k with frequency f k,h ;

[0164] (4-1-4) For all the remaining tasks in the task set V, repeat the above step (4-1-3) to obtain the dynamic energy consumption generated when each task runs on the heterogeneous processor U k,h with frequency f k , and add the dynamic energy consumption generated when all the tasks in the task set run on the heterogeneous processor U k,h with frequency f k to obtain the dynamic energy consumption (without considering the communication energy consumption) ED(G) of the application DAG graph:

[0165] (4-1-5) Based on the static energy consumption of the application DAG obtained in step (4-1-2) and the dynamic energy consumption of the application DAG obtained in step (4-1-4), obtain the total energy consumption of the application DAG, i.e., the energy consumption model of the application DAG:

[0166] ET(G) = ES(G) + ED(G);

[0167] (4-2) In the energy consumption model obtained in step (4-1), obtain the set of heterogeneous multiprocessors and the set of replica tasks that meet the frequency reduction condition, so as to obtain the energy-saving scheduling result of the application DAG graph;

[0168] This step specifically includes the following sub-steps:

[0169] (4-2-1) Based on the energy consumption model obtained in step (4-1), obtain the effective frequency setting range for each heterogeneous processor in the heterogeneous multiprocessor set U;

[0170] Specifically, this step involves first obtaining the energy consumption model parameters obtained in step (4-1-1) to determine the heterogeneous processor U... k energy saving frequency (The reduced frequency should be limited; otherwise, it will increase the occurrence of transient failures and reduce reliability); then, based on the obtained heterogeneous processor U... k Energy-saving frequency, obtain heterogeneous processor U k The lowest configurable frequency f k,low =max(f k,min ,f k,ee (Heterogeneous Processor U) k The frequency can be from the lowest frequency f k,min up to the highest frequency f k,max (Change); Finally, obtain each heterogeneous processor U in the heterogeneous multiprocessor set U. k frequency f k,h Valid setting interval f k,low ≤f k,h ≤f k,max ;

[0171] (4-2-2) Based on the effective frequency setting range obtained in step (4-2-1), obtain the heterogeneous multiprocessor set and replica task set that meet the frequency reduction conditions, so as to obtain the energy-saving scheduling result of the application DAG graph.

[0172] Specifically, this step involves first, based on the scheduling length (overall completion time) obtained in step (3-2) and the task allocation table of the application DAG obtained in step (3-3), obtaining the task allocation table for the application running on the heterogeneous processor U. q The percentage of the total runtime of all replica tasks on the scheduler. (Wherein, the copy task V i x The corresponding heterogeneous processor is U q );

[0173] Then, repeat the above process for all remaining heterogeneous processors in the heterogeneous multiprocessor set U to obtain the proportion of the total running time of all copy tasks on each heterogeneous processor in the heterogeneous multiprocessor set U to the scheduling length, and the proportion corresponding to all heterogeneous processors constitutes the proportion value set RA = {RA1, RA2,... RA |U|} of the heterogeneous multiprocessor set U (where RA k represents the proportion of the total running time of all copy tasks on the heterogeneous processor U k to the scheduling length), and the heterogeneous processors whose all proportion values are less than or equal to the preset threshold value (the value range of the preset threshold value is 0 to 2 / 3, and the preferred value is 1 / 2) are obtained from the obtained proportion value set of the heterogeneous multiprocessor set U to constitute the heterogeneous multiprocessor set that meets the frequency reduction condition;

[0174] Then, according to the direct successor task set succ(V i ) obtained in step (1-2) and the task assignment table of the application DAG graph obtained in step (3-3), the direct successor task set of the copy task V i x is obtained. (Wherein, the copy task V i x The direct successor task set of the copy task V i is consistent with the direct successor task set of the task V , and the direct successor task set of the copy task V i x is obtained according to the obtained direct successor task set of the copy task V i x ; the minimum value of the task start time of each direct successor task in the set is obtained, and the difference between the task end time of the copy task V i x and the minimum value is calculated.

[0175] Then, repeat the above process for the remaining tasks of the copy task matrix V' to obtain the difference value of each copy task in the copy task matrix V', and the difference value of all copy tasks in the copy task matrix V' constitutes the difference value matrix corresponding to the copy task matrix V', and the copy tasks whose all difference values are greater than the preset threshold value 0 are obtained from the obtained difference value matrix corresponding to the copy task matrix V' to constitute the copy task set that meets the frequency reduction condition.

[0176] Finally, according to the obtained heterogeneous multi-processor set and the copy task set satisfying the frequency reduction condition, a frequency reduction operation is performed on each heterogeneous processor and copy task, a 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 copy task V i x The frequency f q of the corresponding heterogeneous processor U k,h is updated, and the task allocation table obtained after the update is taken as the energy-saving scheduling result of the application DAG graph.

[0177] The advantage of the present step (4) is that the energy-saving scheduling result of the application DAG graph is obtained, the overall energy consumption is reduced without increasing the overall task completion time, and the low-power consumption demand is met.

[0178] Those skilled in the art will easily understand that the above description is only the preferred embodiment of the present application, and is not intended to limit the present application. Any modification, equivalent replacement, and improvement within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A DAG fault-tolerant method in a heterogeneous real-time system, characterized in that, Includes the following steps: (1) Obtain a heterogeneous multiprocessor set consisting of multiple heterogeneous processors and a task set consisting of multiple tasks to be run on the heterogeneous multiprocessor set, and construct an application DAG graph based on the heterogeneous multiprocessor set and the task set. (2) Obtain the priority of each task in the task set V based on the application DAG graph obtained in step (1); step (2) specifically includes the following sub-steps: (2-1) Obtain the critical path of the application based on the DAG graph obtained in step (1); (2-2) Based on 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 = {B1, B2, ..., B} in the application DAG graph. |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's DAG graph, and g∈[1,|B|], the critical paths and non-critical task sets in the application's DAG graph together constitute the task set V; (2-3) Based on the critical path L obtained in step (2-1) and the set of non-critical tasks B obtained in step (2-2), obtain the set of upward-sorted values ​​corresponding to the task set V and the priority of each task in it. (3) According to the priority of each task in the task set V obtained in step (2), obtain the parallel start time point of each task on the corresponding heterogeneous processor, and obtain the set S of parallel start time points of each task on the corresponding heterogeneous processor, as well as the fault-tolerant and safe scheduling result corresponding to the task set V in the application DAG graph; step (3) includes the following sub-steps: (3-1) Based on the priority of each task in the task set V obtained in step (2), obtain multiple tasks that meet the priority and their corresponding parallel start time points on the heterogeneous processor. All parallel start time points constitute the set of parallel start time points S corresponding to the task set V. (3-2) Obtain the task completion time and scheduling length of the application DAG graph for each task in the task set V obtained in step (2-3) according to the priority of each task; (3-3) Based on each task V in the task set V obtained in step (3-2) i The task completion time and the task completion time of its corresponding replica task are used to construct the task allocation table corresponding to the replica task matrix, and the fault-tolerant and safe scheduling result of the application DAG graph is obtained. (4) Construct an energy consumption model of the application DAG obtained in step (1), and use the energy consumption model to obtain the energy-saving scheduling results of the application DAG; step (4) specifically includes the following sub-steps: (4-1) Construct 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), obtain the set of heterogeneous multiprocessors and the set of replica tasks that meet the frequency reduction condition, so as to obtain the energy-saving scheduling result 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 = {U1, U2, ..., U...} consisting of multiple heterogeneous processors. |U| A task set V = {V1, V2, ..., V} consists of a set of tasks that need to be run on a heterogeneous multiprocessor set. |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) Construct the application DAG graph based on the heterogeneous multiprocessor set and task set obtained in (1-1); Specifically, this step involves first constructing multiple nodes in the application's DAG graph using a task set V, and then defining the tasks V in the application's DAG graph. i ∈V represents tasks with different runtimes on a heterogeneous multiprocessor set; then task V is obtained. i In the application's DAG graph, the direct predecessor task set pred(Vi) and the direct successor task set succ(V) i ), obtain the entry task V in the application's DAG graph that does not have a direct predecessor task. entry And exit mission V that does not have a direct successor mission. exit Then, obtain task V. i Running at maximum frequency on the corresponding heterogeneous processor U k Running time W i,k Then, based on the runtime of all tasks in task set V on different heterogeneous processors, a runtime set W is constructed; subsequently, task V is obtained. i In the corresponding heterogeneous processor U k The AST (Answer Tabular Time) for the mission: Where i∈[1, the total number of tasks in the task set, k∈[1, the total number of heterogeneous processors in the heterogeneous multiprocessor set U], V entry This represents the entry task in the application's DAG graph, with entry task V. entry In the corresponding heterogeneous processor U k The task start time on AST(V) is 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's DAG graph is represented as Among them |PR i | Represents task V i The number of direct predecessor tasks in the set of direct predecessor tasks, PR j ∈PR i Indicates task PR j It is Task V i The direct predecessor task, and j∈[1,|PR i |],AFT(PR j ) represents task V i Direct precursor mission PR j The task completion time.

3. The DAG fault-tolerant method in a heterogeneous real-time system according to claim 2, characterized in that, Step (2-1) specifically involves first obtaining any one task V from the task set V. i Obtain the runtime of the task on each heterogeneous processor in the heterogeneous multiprocessor set U, and average the runtime of the task across all heterogeneous processors in the heterogeneous multiprocessor set U to obtain task V. i Average runtime on various heterogeneous processors Then, for all remaining tasks in task set V, repeat the above process to obtain the average runtime set of all tasks in task set V on all heterogeneous processors in heterogeneous multiprocessor set U. Then, based on the obtained average runtime set The Depth-First Search (DFS) algorithm is used to obtain the critical path L = {L1, L2, ..., L|L|} of the application's Directed Acyclic Graph (DAG), where |L| represents the length of the critical path L, i.e., the number of critical tasks. p ∈L indicates that it is a key task in the application's DAG graph, and p∈[1,|L|]; Step (2-3) specifically involves first obtaining the non-critical tasks B from the non-critical task set B obtained in step (2-2). g The corresponding upward sorting value ranku(B) g The specific calculation formula is as follows: Among them, SU g Non-critical task B g The set of direct successor tasks in the application's 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 set of direct successor tasks, SU y ∈SU g , indicating task SU y Non-critical task B g The direct successor task, and y∈[1,|SU g |]; Then, for all non-critical tasks in the non-critical task set B, repeat the above process to obtain the set of upward sorted values ​​of the non-critical task set B. Then, obtain the critical 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 mission L p The set of direct successor tasks in the application's DAG is denoted as SU. Lp ={SU1,SU2,...,SU |SULp| }, where |SU Lp | Indicates key task L p The number of direct successor tasks in the set of direct successor tasks, SU z ∈SU Lp , indicating task SU z It is a critical mission L p The direct successor task of z, and z∈[1,|SU Lp |]; Then, for all critical tasks in the critical path L, repeat the above process to obtain the set of upward sorted values ​​for the critical path L. Subsequently, the set of upward sorting values ​​for the non-critical task set B and the set of upward sorting values ​​for the critical path L are merged to obtain the set of upward sorting values ​​for the task set V, ranku(V). Finally, based on the set of upward sorting values ​​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.

4. The DAG fault-tolerant method in a heterogeneous real-time system according to claim 3, characterized in that, Step (3-1) specifically involves: First, obtain the set of lowest frequencies 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 Indicates heterogeneous processor U k The lowest frequency, f k,max ∈f max Indicates heterogeneous processor U k The highest frequency, and obtain the actual effective frequency matrix corresponding to the heterogeneous multiprocessor set U based on the lowest frequency set and the highest frequency set: Each heterogeneous processor U in the heterogeneous multiprocessor set U k frequency f k,h From the lowest frequency f k,min up to the highest frequency f k,max Changes, h represents heterogeneous processor U k The h-th actual effective frequency can be set; Then, obtain each heterogeneous processor U k The set of transient failure rates λ at its highest operating frequency max ={λ 1,max ,λ 2,max ,....λ |U|,max }, and based on the heterogeneous processor U in this transient failure rate set k Transient failure rate λ at its highest operating frequency k,max Obtain heterogeneous processor U k With frequency f k,h transient failure rate λ during operation k,h The specific calculation formula is as follows: Where, d k A constant greater than 0 represents the heterogeneous processor U. k The voltage / frequency scaling sensitivity failure rate; Subsequently, the above process is repeated to sequentially obtain heterogeneous processor U k The transient failure rates at each of its actual effective frequencies constitute the heterogeneous processor U. k The set of transient failure rates λ k ={λ k,low ,....λ k,max }; Subsequently, the above process is repeated for all remaining heterogeneous processors in the heterogeneous multiprocessor set U to obtain the transient failure rate set of all heterogeneous processors operating at their respective actual effective frequencies. The transient failure rate sets constitute the transient failure rate matrix λ, specifically represented as follows: Then, based on the obtained heterogeneous processor U k With its highest frequency f k,max transient failure rate λ during operation k,max Get Task V i In the heterogeneous processor U k The above frequency f k,max Runtime replica parallel start time S i The specific calculation formula is as follows: Where α and β are both scaling factors, and α∈[0,1], β=1-α, and α and β can be adjusted accordingly based on the running results; Then, for all remaining tasks in task set V, repeat the above process to obtain the set of parallel start times S = {S1, S2, ..., S...} corresponding to task set V. |N| } 5. The DAG fault-tolerant method in a heterogeneous real-time system according to claim 4, characterized in that, Step (3-2) specifically involves first, based on the task set V obtained in step (2), selecting task V... i Priority, obtain the task V i In the corresponding heterogeneous processor U k The task completion time AFT(V) when no failure occurs i ) = AST(V i U k )+W i,k and the task V i Task end time AFT(V) when a failure occurs on the corresponding heterogeneous processor 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 replica task is performed on the corresponding 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 It varies depending on whether the current task has failed; Subsequently, obtain each task V in the task set V. i The corresponding set of dungeon quests V i '={V i 1 V i 2 ,....V i numi } and the number of dungeon quests in the dungeon quest set, Num i The number of replica tasks corresponding to all tasks constitutes the set of replica task numbers Num = {Num1, Num2, ..., Num...} |N| }, where V i x ∈V i ',x∈[1,Num i ], V i x Represents task V i The corresponding x-th instance task, when x=1, V i x That is, task V i ; Subsequently, for all remaining tasks in task set V, the above process is repeated to obtain a replica task matrix V' = {V1', V2', ..., V...} of task set V. |N| '}, specifically represented as Each task V in the default task set V i The corresponding number of dungeon quests is Num i =2; Then, based on the obtained task V i The corresponding set of dungeon quests V i ', Obtain the dungeon quest 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 V instance quest i x In the corresponding heterogeneous processor U q The task end time AFT(V) on i x ), which is equal to task V i Task end time AFT(V) i ); Finally, based on the critical path of the application DAG obtained in step (2-1), the scheduling length SL(G) of the application DAG is obtained: Among them, dungeon missions The exit task V represents the DAG graph of the application. exit The corresponding Num exit One instance quest, That is, export task V exit ; Step (3-3) specifically involves first generating a task allocation table corresponding to the replica task matrix V', with the following number of rows: The number of columns is 5, where the first column is the dungeon quest V. i x The second column is the dungeon quest V. i x Corresponding heterogeneous processor U q The third column is the dungeon quest V. i x In the corresponding heterogeneous processor U q Frequency f during operation k,h By default, f k,h =f k,max =1, the fourth column is the dungeon quest V i x In the corresponding heterogeneous processor U q The task start time is shown in the top right corner, and the fifth column indicates the dungeon quest V. i x In the corresponding heterogeneous processor U q The task end time is specified; then, each copy of the task V is used. i x In the corresponding heterogeneous processor U q The task start time and task end time are used as row data in the task allocation table, and the resulting task allocation table is used as the fault-tolerant and safe scheduling result of the application's DAG graph.

6. The DAG fault-tolerant method in a heterogeneous real-time system according to claim 5, characterized in that, Step (4-1) specifically includes the following sub-steps: (4-1-1) Based on the application DAG graph obtained in step (1), obtain the relevant parameters of the energy consumption model of the heterogeneous multiprocessor set U, including the frequency-independent dynamic power set P of the heterogeneous multiprocessor 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 }, heterogeneous multiprocessor set U and frequency-dependent static power set P s ={P 1,s ,P 2,s ,.....P |U|,s The effective switched 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 = {m1, m2, ..., m} of the heterogeneous multiprocessor set U. |U| }, where P k,ind Indicates heterogeneous processor U k Frequency-independent dynamic power, P k,d Indicates heterogeneous processor U k Frequency-dependent dynamic power, P k,s Indicates heterogeneous processor U k Frequency-dependent static power, C k,ef Indicates heterogeneous processor U k Effective switched capacitor, m k Indicates heterogeneous processor U k The dynamic power index; (4-1-2) Based on the scheduling length SL(G) of the application DAG 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 }, obtain the static energy consumption of the application's DAG graph. (4-1-3) Based on the energy consumption model 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 during runtime: in, Represents task V i In heterogeneous processor U k The above frequency f k,h The actual runtime at runtime; (4-1-4) For all remaining tasks in the task set V, repeat step (4-1-3) above to obtain the frequency f for each task. k,h heterogeneous processor U k The dynamic energy consumption generated during runtime, and all tasks in the task set at a frequency of f k,h heterogeneous processor U k The dynamic energy consumption generated during runtime is summed to obtain the dynamic energy consumption ED(G) of the application's DAG graph: (4-1-5) Based on the static energy consumption of the application DAG obtained in step (4-1-2) and the dynamic energy consumption of the application DAG obtained in step (4-1-4), obtain the total energy consumption of the application DAG, i.e., the energy consumption model of the application DAG: ET(G) = ES(G) + ED(G).

7. The DAG fault-tolerant method in a heterogeneous real-time system according to claim 6, characterized in that, Step (4-2) specifically includes the following sub-steps: (4-2-1) Based on the energy consumption model obtained in step (4-1), obtain the effective frequency setting range for each heterogeneous processor in the heterogeneous multiprocessor set U; Specifically, this step involves first obtaining the energy consumption model parameters obtained in step (4-1-1) to determine the heterogeneous processor U... k energy saving frequency Then, based on the obtained heterogeneous processor U k Energy-saving frequency, obtain heterogeneous processor U k The lowest configurable frequency f k,low =max(f k,min ,f k,ee Finally, obtain each heterogeneous processor U in the heterogeneous multiprocessor set U. k frequency f k,h Valid setting interval f k,low ≤f k,h ≤f k,max ; (4-2-2) Based on the effective frequency setting range obtained in step (4-2-1), obtain the heterogeneous multiprocessor set and replica task set that meet the frequency reduction conditions, so as to obtain the energy-saving scheduling result of the application DAG graph; Specifically, this step involves first, based on the scheduling length obtained in step (3-2) and the task allocation table of the application DAG graph obtained in step (3-3), obtaining the task allocation table of the application running on the heterogeneous processor U. q The percentage of the total runtime of all replica tasks on the scheduler. Among them, dungeon quest V i x The corresponding heterogeneous processor is U q ; Then, for all remaining heterogeneous processors in the heterogeneous multiprocessor set U, the above process is repeated to obtain the proportion of the total running time of all replica tasks on each heterogeneous processor in the heterogeneous multiprocessor set U to the scheduling length. The proportions corresponding to all heterogeneous processors constitute the proportion value set RA = {RA1, RA2, ... RA} of the heterogeneous multiprocessor set U. |U| }, from the obtained set of proportion values ​​of the heterogeneous multiprocessor set U, all heterogeneous processors whose proportion values ​​are less than or equal to a preset threshold are selected to form a heterogeneous multiprocessor set that meets the frequency reduction condition, where RA k Indicates that in heterogeneous processor U k The percentage of the total runtime of all replica tasks relative to the scheduling length; Then, based on the direct successor task set succ(V) obtained in step (1-2) i The task allocation table of the application DAG obtained in step (3-3) is used to obtain the copy task V. i x The set of direct successor tasks Based on the obtained dungeon quest V i x The set of direct successor tasks, get the set Find the minimum start time of each direct successor task and calculate the replica task V. i x The difference between the task's end time and the minimum value, where the duplicate task V... i x The set of direct successor tasks and task V i The set of direct successor tasks is consistent. Indicates the dungeon quest V i x The set of direct successor tasks; 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 differences of all replica tasks in the replica task matrix V' constitute the difference matrix corresponding to the replica task matrix V'. From the obtained difference matrix corresponding to the replica task matrix V', obtain all replica tasks with differences greater than the preset threshold 0 to form a set of replica tasks that meet the frequency reduction condition. Finally, based on the obtained set of heterogeneous multiprocessors and replica task sets that meet the frequency reduction conditions, 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 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

  • Fault-tolerant scheduling method, system and equipment for instantaneous fault of real-time system

    CN116643856A