DAG task scheduling method and device oriented to heterogeneous multiprocessor system
By using the current maximum estimation workload sorting method of task nodes in heterogeneous multiprocessor systems, the scheduling priority of task nodes is updated in real time, and the problems of large storage space occupation and low solution efficiency in the prior art are solved, and the efficiency and success rate of DAG task scheduling are improved.
Patent Information
- Application Number
- CN202510291275.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-12
- Publication Date
- 2025-07-11
AI Technical Summary
The existing DAG task scheduling method for heterogeneous multi-credit real-time systems occupies a large storage space and has low solution efficiency, making it difficult to efficiently schedule multiple DAG task sets.
The current maximum estimated workload of the task node is used as the sorting basis. The task node's scheduling priority is updated in real time through the priority queue, and a reasonable processor is selected for task scheduling, avoiding the merger of multiple DAG tasks into one large DAG task, reducing storage space usage and improving solution efficiency.
It realizes that the solution efficiency and scheduling success rate of DAG task scheduling are improved without occupying a large amount of storage space, ensuring the real-time and accuracy of the task.
Smart Images

Figure CN120295724A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of real-time system task scheduling, and more specifically, relates to a DAG task scheduling method and device for a heterogeneous multi-processor system. Background Technique
[0002] With the booming development of heterogeneous multi-processor systems, parallel hardware architectures have become the mainstream, and parallel programming models are the performance basis for utilizing these architectures. In recent years, great progress has been made in the parallel task scheduling problem with real-time constraints, such as application programs in the fields of intelligent driving, aerospace, automation, etc., and many different types of scheduling methods have been derived. The main purpose of these methods is to achieve the parallel execution function within tasks, that is, a single task consists of multiple parallel code parts that can be executed simultaneously. Usually, tasks in a heterogeneous multi-processor system are modeled as a Directed Acyclic Graph (DAG), including task nodes and edges representing the communication cost between nodes. In a heterogeneous multi-core environment, there are usually multiple DAG tasks to be executed, forming a DAG task set. In a super-period of the DAG task set, some DAG tasks will be executed periodically, which greatly increases the difficulty of DAG task scheduling in a multi-processor system.
[0003] Existing DAG task scheduling methods for heterogeneous multi-core real-time systems usually merge multiple DAG tasks in a super-period of a DAG task set into a large DAG task for scheduling in a way of period merging. This way will occupy a large storage space and also make the computational complexity of solving the scheduling sequence relatively large, and the solving efficiency is relatively low. Summary of the Invention
[0004] In view of the above defects or improvement requirements of the prior art, the present invention provides a DAG task scheduling method and device for a heterogeneous multi-processor system, aiming to improve the solving efficiency of the scheduling sequence without occupying a large storage space.
[0005] To achieve the above object, in a first aspect, the present invention provides a DAG task scheduling method for a heterogeneous multi-processor system, including:
[0006] S1. Construct a priority queue from all task nodes in the DAG task set of the heterogeneous multi-processor system; calculate the current maximum estimated workload of each task node in the current priority queue; wherein, the current maximum estimated workload L(τ) of any task node τ = r(τ) + T(D τ )(K(D τ ) - 1); r(τ) is the sorting value of τ; T(D τ ) and K(D τThey are respectively the task cycle length of DAG task D where τ is located and the current number of unexecuted instances of D within the supercycle; The initial value of K(D τ is K τ (D τ ); K all (D τ ) is the total number of times that D all (D τ ) needs to be repeatedly executed within the supercycle; τ
[0007] S2. Judge whether the current priority queue is empty. If so, go to S6; otherwise, go to S3;
[0008] S3. Obtain the task node τ corresponding to the maximum estimated workload in the current priority queue, and select a processor from each processor of the heterogeneous multi-processor system as the candidate processor of τ, and put τ top and its candidate processor number into the scheduling sequence correspondingly; top top
[0009] S4. Delete τ in the current priority queue, judge whether the out-degree of τ top is 0. If so, subtract 1 from the current number of unexecuted instances of top within the supercycle, and go to S5; otherwise, go to S2;
[0010] S5. Judge whether is 0. If so, go to S2; otherwise, add all the task nodes in to the current priority queue, and calculate the current maximum estimated workload of all task nodes in , and go to S3;
[0011] S6. Take the current scheduling sequence as the scheduling result of the DAG task set.
[0012] Further preferably, the above S3 includes:
[0013] Obtain the task node τ corresponding to the maximum estimated workload in the current priority queue, predict the earliest completion time of τ top in different processors respectively, and take the minimum time among the obtained earliest completion times as the actual completion time of τ top , and the corresponding processor as the candidate processor of τ top , and update the earliest available time of the candidate processor of τ top to the above actual completion time of τ top ; top
[0014] When the actual completion time of τ top is less than or equal to the absolute deadline of the DAG task where τ top is located, put τ corresponding to the number of its candidate processors into the scheduling sequence; top
[0015] Among them, the earliest completion time of τ top in any processor p x is the sum of the earliest start execution time of τ top on p x and the required duration of τ top when executed on p x .
[0016] Further preferably, the earliest start execution time of τ top on p x is:
[0017]
[0018] Among them, Avail(p x ) is the earliest available time of processor p x ; Pred(τ top ) is the set composed of all predecessor task nodes of task node τ top ; AFT(τ j ) is the actual completion time of task node τ j ; t(τ j , τ top ) is the communication time between task node τ j and task node τ top ; when p j = p x , t(τ j , τ top ) is 0; when p j ≠ p x , t(τ j , τ top ) is the communication cost between node τ j and node τ top divided by the link bandwidth between p j and p x .
[0019] Further preferably, the above S3 further includes: when the above earliest completion time is greater than the absolute deadline of the DAG task where τ top is located, clear the scheduling sequence and go to S6.
[0020] Further preferably, the sorting value r(τ) of the task node τ is as follows:
[0021]
[0022] where Succ(τ) is the set composed of all successor task nodes of the task node τ; r(τ i ) is the sorting value of the task node τ i ; C(τ i , τ) is the communication cost between the node τ i and the node τ; ET(τ) is the average value of the execution duration required when the task node τ is executed on different processors.
[0023] In a second aspect, the present invention provides a DAG task scheduling device, including: a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, it executes the DAG task scheduling method provided in the first aspect of the present invention.
[0024] In a third aspect, the present invention provides a heterogeneous multi-processor system, including: the DAG task scheduling device provided in the second aspect of the present invention.
[0025] In a fourth aspect, the present invention provides an electronic device, including: a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, it executes the DAG task scheduling method provided in the first aspect of the present invention.
[0026] In a fifth aspect, the present invention further provides a computer-readable storage medium, the computer-readable storage medium includes a stored computer program, wherein when the computer program is run by a processor, it controls the device where the storage medium is located to execute the DAG task scheduling method provided in the first aspect of the present invention.
[0027] In a sixth aspect, the invention further provides a computer program product, including a computer program / instructions, and when the computer program / instructions are executed by a processor, they implement the DAG task scheduling method provided in the first aspect of the present invention.
[0028] Generally speaking, through the above technical solutions conceived by the present invention, the following beneficial effects can be achieved:
[0029] 1. The present invention provides a DAG task scheduling method for a heterogeneous multi-processor system. The sum of the sorting value representing the remaining workload of a task node and the workload corresponding to the remaining unexecuted instances is used as the maximum estimated workload of the task node, so as to measure the urgency of different task nodes in the DAG task set to be executed, and thus determine the scheduling priority order. Among them, the maximum estimated workload will be updated in real time according to the execution progress of the DAG task, and the scheduling priority sorting of each task node in the DAG task set will also be updated in real time, thereby obtaining a real-time and accurate scheduling priority sorting. The present invention does not need to merge multiple DAG tasks into a large DAG task for scheduling in a periodic merging manner, does not need to occupy a large storage space, the computational complexity of solving the scheduling sequence is small, and the solving efficiency is high.
[0030] 2. Further, in the DAG task scheduling method provided by the present invention, the minimum time among the earliest completion times of the task node τ top in different processors is used as the actual completion time of τ top , and the corresponding processor is used as the candidate processor of τ top . By judging whether the actual completion time of τ top does not exceed the absolute deadline of the DAG task top where τ is located, the selectable rationality of the candidate processor is determined, and thus an accurate processor scheduling selection is obtained.
[0031] 3. Further, in the DAG task scheduling method provided by the present invention, the sorting value representing the remaining workload of a task node is calculated by the formula to maximize the remaining workload of a certain node, make the maximum estimated remaining workload more real, the obtained scheduling sequence more reasonable, and increase the scheduling success rate of the task set. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 is a flowchart of a DAG task scheduling method for a heterogeneous multi-processor system provided by an embodiment of the present invention;
[0033] Figure 2 is the deadline miss rate of the scheduling method provided by an embodiment of the present invention for processing different numbers of tasks;
[0034] Figure 3 is a schematic structural diagram of three real-time DAG tasks provided by an embodiment of the present invention;
[0035] Figure 4 is the execution time of three real-time DAG tasks provided by an embodiment of the present invention under three different processors;
[0036] Figure 5 is the maximum estimated workload of different instances of three real-time DAG tasks provided by the embodiments of the present invention;
[0037] Figure 6 is the timing diagram of the scheduling result of scheduling three real-time DAG tasks using the DAG task scheduling method provided by the present invention. Specific Embodiments
[0038] In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below with reference to 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 used 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.
[0039] To achieve the above objective, in a first aspect, the present invention provides a DAG task scheduling method for a heterogeneous multi-processor system, including:
[0040] S1. Construct a priority queue from all task nodes in the DAG task set of the heterogeneous multi-processor system; calculate the current maximum estimated workload of each task node in the current priority queue; wherein, the current maximum estimated workload L(τ) of any task node τ = r(τ) + T(D τ )(K(D τ ) - 1); r(τ) is the sorting value of τ; T(D τ ) and K(D τ ) are respectively the task cycle length of the DAG task D where τ is located and the current number of unexecuted instances of D τ within the supercycle; the initial value of K(D τ ) is K τ (D all ); K τ (D all ) is the total number of times D τ needs to be repeatedly executed within the supercycle; τ K
[0041] It should be noted that the supercycle, that is, the period of the task set, is the least common multiple of the task cycle lengths of all DAG tasks in the DAG task set.
[0042] S2. Determine whether the current priority queue is empty. If so, go to S6; otherwise, go to S3;
[0043] S3. Obtain the task node τ corresponding to the maximum maximum estimated workload in the current priority queue top , and select a processor from each processor of the heterogeneous multi-processor system as τ topThe candidate processor corresponding to τ top is placed in the scheduling sequence according to its corresponding candidate processor number;
[0044] It should be noted that here, the task node τ corresponding to the maximum estimated workload in the current priority queue is obtained. top There are multiple ways. For example, the current priority queue can be sorted in descending order according to the maximum estimated workload of the task nodes in it first, and then the first node (the first task node) after sorting is taken, which is the task node τ corresponding to the maximum estimated workload in the current priority queue. top Or the current priority queue can be sorted in ascending order according to the maximum estimated workload of the task nodes in it first, and then the last task node after sorting is taken, which is the task node τ corresponding to the maximum estimated workload in the current priority queue. top There is no limitation here.
[0045] S4. Delete τ in the current priority queue top , and judge whether the out-degree of τ top is 0. If so, then the current number of unexecuted instances within the supercycle is decremented by one, and go to S5; otherwise, go to S2;
[0046] S5. Judge whether is 0. If so, go to S2; otherwise, add all the task nodes in to the current priority queue, and calculate the current maximum estimated workload of all task nodes in . Generally, after adding all the task nodes in
[0047] to the current priority queue, the current priority queue will not be empty, so it can directly go to S3; but more strictly, it can still go to S2 first to judge whether the current priority queue is empty.
[0048] It should be noted that the supercycle, that is, the period of the task set, is the least common multiple of the task cycle lengths of all DAG tasks in the DAG task set.
[0049] It should be noted that there are multiple calculation methods for the sorting value of the task node τ. For example, the CPOP algorithm, the LESA algorithm, etc. are not limited here. Preferably, in an alternative implementation, the sorting value r(τ) of the task node τ is:
[0050]
[0051] Among them, Succ(τ) is the set composed of all successor task nodes of the task node τ; r(τ i ) is the sorting value of the task node τ i ; C(τ i , τ) is the communication cost between the node τ i and the node τ; ET(τ) is the average value of the time required for the task node τ to execute on different processors.
[0052] The sorting value of the task node mentioned in the above implementation manner represents the remaining workload; the above communication cost is generally measured by dividing the data exchange volume between task nodes by the bandwidth between the corresponding processors where the nodes are located; when two task nodes are on the same processor, the communication cost is 0.
[0053] In an alternative implementation manner, the above S3 includes:
[0054] Obtain the task node τ corresponding to the maximum estimated workload in the current priority queue top , predict the earliest completion time of τ top in different processors respectively, and use the minimum time (earliest time) among the obtained earliest completion times as the actual completion time of τ top , the corresponding processor as the candidate processor of τ top , and update the earliest available time of the candidate processor of τ top to the actual completion time of the above τ top ;
[0055] When the actual completion time of τ top is less than or equal to the absolute deadline of the DAG task top where τ is located, put τ top and its candidate processor number into the scheduling sequence correspondingly;
[0056] Among them, the earliest completion time of τ top in any processor p x is the sum of the earliest start execution time of τ top on p x and the time required for τ top to execute on p x .
[0057] Preferably, the earliest start execution time of τ top on p x is:
[0058]
[0059] Among them, Avail(p x ) is the earliest available time of processor p x ; Pred(τ top ) is the set composed of all predecessor task nodes of task node τ top ; AFT(τ j ) is the actual completion time of task node τ j ; t(τ j , τ top ) is the communication time between task node τ j and task node τ top ; when p j = p x , t(τ j , τ top ) is 0; when p j ≠ p x , t(τ j , τ top ) is the communication cost between node τ j and node τ top divided by the link bandwidth between p j and p x .
[0060] It should be noted that the method of selecting a processor from the processors of the heterogeneous multi - processor system as the candidate processor of τ top is not limited to the above method. It can also use the earliest completion time of the task node on a certain processor plus the remaining workload of the task node on this processor as the predicted completion time of the corresponding DAG task, and select the processor that can minimize the predicted completion time and other methods, which are not limited here.
[0061] In an alternative implementation, the above S3 further includes: when the above earliest completion time is greater than the absolute deadline of the DAG task top where τ is located, clear the scheduling sequence and go to S6.
[0062] When the scheduling sequence obtained in S6 is empty, it indicates that the DAG task set is not schedulable, the scheduling fails, and the scheduling ends; when the scheduling sequence obtained in S6 is not empty, it indicates that the DAG task set is schedulable, and the scheduling sequence is output.
[0063] In an alternative implementation, when corresponding τ top and the number of its candidate processor are put into the scheduling sequence, τ topThe earliest start execution time on its candidate processors and the corresponding earliest completion time are put into the scheduling sequence. In addition to outputting whether it is schedulable and the selected candidate processors, it is also possible to clearly know the earliest start execution time and the earliest completion time of the task nodes, providing richer scheduling information.
[0064] To further illustrate the DAG task scheduling method for heterogeneous multi-processor systems provided by the present invention, a specific embodiment will be described in detail below:
[0065] Figure 1 Shows the processing process of the multi-DAG task scheduling method based on workload sorting. As Figure 1 shown, given a set of real-time tasks, this set of tasks includes the execution time of the task nodes in the DAG tasks under different processors in the system, the data exchange volume between nodes, and the task cycle length. In this embodiment, the period of the DAG task set will be calculated first to facilitate the solution of the number of instances of each task in the next step. At the same time, this embodiment will save the sorting values (i.e., the remaining workload) of each calculated task node. Subsequently, the maximum estimated remaining workload of the nodes to be executed is estimated using the number of instances and the remaining workload. On this basis, the present invention uses a priority queue to arrange all the nodes to be executed in descending order of the maximum estimated remaining workload and schedules them in this order.
[0066] Furthermore, the method will schedule the nodes in the priority queue in sequence. First, take out the first task node in the priority queue, and select a suitable processor for this node with the earliest completion time of this node as the index. If the obtained earliest completion time is less than its deadline, then it meets the real-time requirement, store the selected candidate processor and the execution time in the scheduling sequence, and at the same time delete the head node of the priority queue, otherwise it is regarded as timeout and does not meet the real-time requirement, clear the scheduling sequence and output the result.
[0067] In order to enable the method to output a correct and complete scheduling sequence, after allocating a processor to the node and checking the real-time performance, it is necessary to determine whether the node is the exit node of a certain instance, that is, whether the out-degree of the node is 0. If it is not the exit node, continue to schedule the node from the priority queue. If it is the exit node, first subtract one from the current number of unexecuted instances of the DAG task where the node is located, and determine whether the current number of unexecuted instances is 0. If it is 0, it means that all instances of this DAG within the task set period (super period) have been executed. Otherwise, it is necessary to release the next DAG instance. At this time, it is necessary to calculate the maximum estimated remaining workload of the instance nodes and add them to the priority queue. If the priority queue is empty, it means that the scheduling is completed, and then output the scheduling sequence.
[0068] Specifically, the overall process of this embodiment includes the following steps:
[0069] A1. All task nodes in the DAG task set of the heterogeneous multi-processor system form a priority queue; calculate the current maximum estimated workload of each task node in the current priority queue; where the current maximum estimated workload of any task node τ is L(τ) = r(τ) + T(D τ )(K(D τ )-1); r(τ) is the ranking value of τ; T(D τ ) and K(D τ ) are the DAG tasks D in which τ is located. τ The task cycle length and D τ The number of currently unexecuted instances within the super period; K(D τ ) has an initial value of K all (D τ );K all (D τ ) is D τ The total number of times the execution needs to be repeated within the super cycle; D τ The total number of repetitions required within the supercycle is calculated by dividing the supercycle by D τ The task cycle is obtained.
[0070] In this embodiment, the ranking value r(τ) of the task node τ is:
[0071]
[0072] Among them, Succ(τ) is the set of all successor task nodes of task node τ; r(τ i ) is the task node τ i The ranking value of C(τ i ,τ) is the node τ i The communication cost between node τ and task node τ; ET(τ) is the average time required for task node τ to execute on different processors.
[0073] A2, determine whether the current priority queue is empty, if so, go to A8; otherwise, go to A3;
[0074] A3. Arrange the current priority queue in descending order according to the maximum estimated workload of the task nodes in the current priority queue;
[0075] A4. Get the first task node τ in the current priority queue top , predict τ top The earliest completion time in different processors, and the minimum time among the earliest completion times is taken as τ top The actual completion time of the corresponding processor is τ top The candidate processors will be topThe earliest available time of the candidate processor is updated to the above-mentioned τ top The actual completion time; where τ top Among any processor p x The earliest completion time is τ top In p x The earliest start execution time on and τ top In p x The sum of the required duration when executing on;
[0076] In this embodiment, τ top The earliest start execution time on p x EST(τ top , p x ) =
[0077]
[0078] Where Avail(p x ) is the earliest available time of processor p x When the processor p x Has not been selected as the corresponding candidate processor by any task node, its earliest available time is 0); Pred(τ top ) is the set composed of all predecessor task nodes of the task node τ top ; AFT(τ j ) is the actual completion time of the task node τ j ; t(τ j , τ top ) is the communication time between the task node τ j And the task node τ top ; When p j = p x , t(τ j , τ top ) is 0; When p j ≠ p x , τ(τ j , τ top ) is the communication cost between the node τ j And the node τ top Divided by the link bandwidth between p j And p x . It should be noted that when τ top Is the first node in the corresponding DAG task, Pred(τ top ) is empty, at this time,
[0079] A5. Determine whether the above earliest completion time is less than τ top The DAG task where it is located The absolute deadline; if so, then τ top Put it into the scheduling sequence corresponding to the number of its candidate processors, and go to A6; otherwise, clear the scheduling sequence and go to A8;
[0080] A6. Delete τ in the current priority queue top , and judge whether τ top has an out-degree of 0. If so, then The current number of unexecuted instances within the super period minus one, and go to A7; otherwise, go to A3;
[0081] A7. Judge whether is 0. If so, go to A3; otherwise, add all the task nodes in to the current priority queue, and calculate the current maximum estimated workload of all task nodes in, and go to A2;
[0082] A8. Take the current scheduling sequence as the scheduling result of the DAG task set. Among them, when the scheduling sequence obtained by A8 is empty, it indicates that the DAG task set is not schedulable and the scheduling fails; when the scheduling sequence obtained by A8 is not empty, it indicates that the DAG task set is schedulable.
[0083] As Figure 2 shown, in order to demonstrate the ability of this method to process task sets, the present invention tests different numbers of random DAG sets in an environment with 3 processors, 500 for each number of random DAG sets, records the number of scheduling failures after scheduling the 500 DAG task sets using the scheduling method provided by the present invention, and uses the deadline miss rate (unschedulable ratio) as the evaluation criterion. As Figure 2 shown, when the number of tasks is 3 - 9, the miss rate is basically 0, that is, when the difference between the number of processors and the number of tasks is within 3 times, this method basically has a schedulable rate of more than 95%. As the number of tasks increases, when 3 processors process 60 DAG tasks, there is still a schedulable rate of about 50%.
[0084] As Figure 3 shown, G 1 , G 2 , G 3 are three periodic real-time tasks, whose periods are 90, 60, and 180 respectively. According to this method, the period of the set composed of these three tasks is 180, and the number of DAG instances to be executed within this period is 2, 3, and 1 respectively. Combining Figure 4 the execution time of each task node on different processors, calculate the sorting value (i.e., the remaining workload), and its value is as Figure 5 shown. Among them, G 1,1Denote G 1 as the first DAG instance of 1 . The maximum estimated workload values of all DAG instances are shown in the table. According to the scheduling process of the present invention, the timing diagram of the final scheduling result is as Figure 6 shown.
[0085] In summary, the present invention provides a DAG task scheduling method for heterogeneous multi-processor systems. The sum of the sorting value representing the remaining workload of the task node and the workload corresponding to the remaining unexecuted instances is used as the maximum estimated workload of the task node to measure the urgency of different task nodes in the DAG task set to be executed, thereby determining the scheduling priority order. Among them, the maximum estimated workload will be updated in real time according to the execution progress of the DAG task, and the scheduling priority order of each task node in the DAG task set will also be updated in real time, thereby obtaining a real-time and accurate scheduling priority order. The present invention does not need to merge multiple DAG tasks into a large DAG task for scheduling in a periodic merging manner, does not need to occupy a large storage space, and the computational complexity of solving the scheduling sequence is also small, and the solving efficiency is high.
[0086] Furthermore, the present invention verifies the effectiveness of the proposed method through experiments with the number of tasks equal to the number of processors and the number of tasks within three times the number of processors. The experimental results show that the present invention has a scheduling success rate of 92% or more, which indicates that the multi-DAG scheduling method based on workload sorting provided by the present invention has a high success rate in dealing with the periodic multi-DAG scheduling problem in real-time systems.
[0087] In a second aspect, the present invention provides a DAG task scheduling device, including: a memory and a processor, where the memory stores a computer program, and the processor executes the computer program to execute the DAG task scheduling method provided in the first aspect of the present invention.
[0088] The related technical solutions are the same as the DAG task scheduling method provided in the first aspect of the present invention, and will not be elaborated here.
[0089] In a third aspect, the present invention provides a heterogeneous multi-processor system, including: the DAG task scheduling device provided in the second aspect of the present invention.
[0090] The related technical solutions are the same as the DAG task scheduling device provided in the second aspect of the present invention, and will not be elaborated here.
[0091] In a fourth aspect, the present invention provides an electronic device, including: a memory and a processor, where the memory stores a computer program, and the processor executes the computer program to execute the DAG task scheduling method provided in the first aspect of the present invention.
[0092] The related technical solutions are the same as the DAG task scheduling method provided in the first aspect of the present invention, which will not be elaborated here.
[0093] In a fifth aspect, the present invention further provides a computer-readable storage medium, which includes a stored computer program. When the computer program is run by a processor, it controls the device where the storage medium is located to execute the DAG task scheduling method provided in the first aspect of the present invention.
[0094] The related technical solutions are the same as the DAG task scheduling method provided in the first aspect of the present invention, which will not be elaborated here.
[0095] In a sixth aspect, the invention further provides a computer program product, including a computer program / instructions. When the computer program / instructions are executed by a processor, they implement the DAG task scheduling method provided in the first aspect of the present invention.
[0096] The related technical solutions are the same as the DAG task scheduling method provided in the first aspect of the present invention, which will not be elaborated here.
[0097] Those skilled in the art can easily understand that the above are only the preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, and improvements made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A DAG task scheduling method for heterogeneous multi-processor systems, characterized in that Including: S1. Form a priority queue with all task nodes in the DAG task set of the heterogeneous multi-processor system; Calculate the current maximum estimated workload of each task node in the current priority queue; where the current maximum estimated workload of any task node τ is L(τ) = r(τ) + T(D τ )(K(D τ )-1); r(τ) is the ranking value of τ; T(D τ ) and K(D τ ) are the DAG tasks D in which τ is located. τ The task cycle length and D τ The number of currently unexecuted instances within the super period; K(D τ ) has an initial value of K all (D τ );K all (D τ ) is D τ The total number of repetitions required within the super cycle; S2. Determine whether the current priority queue is empty. If so, go to S6; otherwise, go to S3; S3. Obtain the task node τ corresponding to the maximum estimated workload in the current priority queue, and select a processor from each processor of the heterogeneous multi-processor system as the candidate processor for τ, and correspondingly put τ and the number of its candidate processor into the scheduling sequence; top top top S4. Delete τ from the current priority queue top , and check τ top to see if its out-degree is 0. If so, decrement the current number of unexecuted instances within the supercycle by one, and go to S5; otherwise, go to S2; S5. Judgment Whether it is 0. If so, go to S2; otherwise, add all task nodes in to the current priority queue, and calculate the current maximum estimated workload of all task nodes in , then go to S2 or S3; S6. Use the current scheduling sequence as the scheduling result of the DAG task set.
2. The DAG task scheduling method according to claim 1, wherein The said S3 includes: Obtain the task node τ corresponding to the maximum estimated workload among the current priority queues top , and predict τ top The earliest completion time in different processors respectively, and take the minimum time among the obtained earliest completion times as the actual completion time of τ top , and the processor corresponding thereto as the candidate processor for τ top , and update the earliest available time of the candidate processor for τ top to the actual completion time of the said τ top ; When τ top 's actual completion time is less than or equal to τ top 's DAG task 's absolute deadline, τ top and its corresponding candidate processor number are placed into the scheduling sequence; where τ top is the earliest completion time on any processor p x and is the sum of the earliest start execution time on p top and the required duration when executing on p x with τ top on p x .
3. The DAG task scheduling method according to claim 2, wherein τ top at p x The earliest start execution time is: Among them, Avail(p x ) is the earliest available time of processor p x ; Pred(τ top ) is the set composed of all predecessor task nodes of task node τ top ; AFT(τ j ) is the actual completion time of task node τ j ; t(τ j , τ top ) is the communication time between task node τ j and task node τ top ; when p j = p x , t(τ j , τ top ) is 0; when p j ≠ p x , t(τ j , τ top ) is the communication cost between node τ j and node τ top divided by the link bandwidth between p j and p x .
4. The DAG task scheduling method according to claim 2 or 3, characterized in that The S3 further includes: when the earliest completion time is greater than τ top of the DAG task whose absolute deadline is reached, clear the scheduling sequence and go to S6.
5. The DAG task scheduling method according to any one of claims 1-3, characterized in that The sorting value r(τ) of the task node τ is: where, Succ(τ) is the set consisting of all successor task nodes of task node τ; r(τ i ) is the sorting value of task node τ i ; C(τ i , τ) is the communication cost between node τ i and node τ; ET(τ) is the average value of the required execution time when task node τ is executed on different processors.
6. A DAG task scheduling device, characterized in that Including: A memory and a processor, where the memory stores a computer program, and when the processor executes the computer program, it executes the DAG task scheduling method according to any one of claims 1-5.
7. A heterogeneous multi-processor system, characterized in that, Including: The DAG task scheduling device according to claim 6.
8. An electronic device, characterized in that, Including: A memory and a processor, where the memory stores a computer program, and when the processor executes the computer program, it executes the DAG task scheduling method according to any one of claims 1-5.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored computer program, wherein when the computer program is run by a processor, it controls the device where the storage medium is located to execute the DAG task scheduling method according to any one of claims 1-5.
10. A computer program product, characterized in that, Including computer program / instructions, which when executed by a processor implement the DAG task scheduling method according to any one of claims 1-5.