Task scheduling method and device for heterogeneous computing system, equipment and medium

By combining edge-covering queues and distribution estimation algorithms with a graph random walk strategy, the problem of high scheduling algorithm complexity in heterogeneous computing systems is solved, achieving efficient task scheduling, reducing computation time and workload, and improving scheduling efficiency.

CN115756803BActive Publication Date: 2026-07-31UNIV OF ELECTRONICS SCI & TECH OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
UNIV OF ELECTRONICS SCI & TECH OF CHINA
Filing Date
2022-11-30
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Existing task scheduling algorithms for heterogeneous computing systems suffer from high computational complexity and long iteration times, making them difficult to be effective in practical applications. Furthermore, table-based scheduling algorithms are also ineffective.

Method used

An edge-covering queue scheduling method is adopted, which combines a distribution estimation algorithm and a graph random walk strategy. The random walk algorithm determines a specified point within a preset range to generate an edge-covering queue, and the scheduling is simulated using a probability distribution algorithm, thereby reducing computational complexity and the number of iterations.

Benefits of technology

While reducing computational complexity and iteration count, it improves the optimization effect of the scheduling scheme, reduces computation time and computational load, and enhances the task scheduling efficiency of heterogeneous computing systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115756803B_ABST
    Figure CN115756803B_ABST
Patent Text Reader

Abstract

This invention discloses a task scheduling method, apparatus, device, and medium for heterogeneous computing systems, comprising: acquiring a directed acyclic task graph corresponding to application tasks on a target heterogeneous computing system and determining its task node queue; determining a probability distribution matrix and a topologically feasible point queue based on the topological relationship between the task node queue and the directed acyclic task graph; selecting any random number within a preset range based on a random walk algorithm, determining multiple specified points in the probability distribution matrix based on the random number, and obtaining a set of specified points; converting the topologically feasible point queue into an edge-covered queue based on the set of specified points; performing simulated scheduling on the edge-covered queue based on a probability distribution algorithm, and updating the current probability distribution matrix; repeating the random walk and probability distribution estimation algorithm a preset number of times to obtain the target probability distribution matrix, and thus obtaining the target scheduling scheme. This invention proposes a scheduling method using an edge-covered queue, and designs a method for generating an edge-covered queue based on a probability distribution estimation algorithm and a graph random walk strategy, reducing computational complexity and the number of iterations.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of task scheduling technology for heterogeneous computing systems, and to a task scheduling method, apparatus, device, and medium for heterogeneous computing systems. Background Technology

[0002] A heterogeneous computing system refers to a group of interconnected processors with different computing and storage capabilities. Due to the diversity of tasks and the differences in processor architecture, heterogeneous computing systems are widely present in various computing scenarios. In practice, applications are typically modeled as Directed Acyclic Graphs (DAGs), where each node represents a subtask of the application. This DAG is then scheduled to the heterogeneous computing system. Efficient scheduling schemes can improve the performance of heterogeneous computing systems and the quality of user experience. However, due to the heterogeneity of heterogeneous computing systems, priority constraints between tasks, and the NP-hard nature of DAGs, achieving efficient scheduling is very difficult.

[0003] Existing scheduling algorithms are broadly classified into two categories: table-based scheduling algorithms and evolutionary algorithms. Table-based scheduling algorithms have low computational and time complexity, but their scheduling results are often unsatisfactory in many scenarios, easily getting trapped in local optima. Evolutionary algorithms are globally optimized algorithms, achieving excellent scheduling results with sufficient computation, but they have very high computational and time complexity. In parallel and distributed heterogeneous computing systems, heuristic task scheduling algorithms typically include two stages: task priority determination and processor selection. In heuristic task scheduling algorithms, different priorities will result in different maximum completion times on heterogeneous computing systems. Therefore, a good scheduling algorithm should be able to effectively allocate priorities and processors to each subtask based on minimizing the maximum completion time.

[0004] The use of table-based scheduling algorithms involves two stages. First, tasks are sorted by priority and weight to obtain a task scheduling queue. Then, tasks in the queue are sequentially placed onto processors using a fixed method. Early scheduling algorithms were mostly designed for homogeneous processing systems. Among the representative algorithms of this category, the Earliest Start Time (EST) and Earliest Finish Time (EFT) algorithms are the simplest time-greedy algorithms. To adapt to heterogeneous environments, Heterogeneous Earliest Start Time (HEFT) and critical path algorithms were proposed. In the HEFT algorithm, tasks are sorted according to the longest path length from a node to the bottom of the DAG. Then, taking into account the available idle time slots of processors, tasks are sequentially assigned to processors that enable them to achieve the earliest finish time. In the critical path algorithm, the critical path of the DAG is first calculated, and then the critical path is assigned to the same processor that minimizes the completion time of the critical path. The remaining tasks are then assigned sequentially. Predictive table-based scheduling algorithms schedule tasks by estimating the impact of task allocation on subsequent tasks. In the Predict Earliest Finish Time (PEFT) algorithm, one of the predictive table scheduling algorithms, an optimistic cost table is constructed, listing the shortest paths from each combination of task and processor to its child nodes and the exit node. Tasks are then sorted from highest to lowest using the average optimistic cost table (OCT) value for each task. Finally, an insert processor available idle time slot strategy is introduced, and tasks are assigned to the processor with the shortest EFT+OCT value. The Lookahead (LO) algorithm is a special type of table scheduling algorithm where each task is assigned to the processor that minimizes the completion time of all its child tasks. It performs well in medium-sized DAGs and some specific scenario scheduling, but it is also one of the most computationally complex table scheduling algorithms.

[0005] Evolutionary algorithms are globally optimized algorithms that can provide satisfactory solutions to complex problems within an acceptable timeframe. For the DAG-SP problem, various evolutionary algorithms, including Genetic Algorithm (GA), Ant Colony Optimization (ACO), and Differential Evolution (DE), have been explored for application in task scheduling. Beyond directly providing task-processor scheduling schemes, research has also focused on evolutionary algorithms that prioritize initial task scheduling queues. The MPQGA method proposes a task scheduling scheme for heterogeneous computing systems based on a multi-priority queue genetic algorithm. The Genetic Algorithm (GA) method is suitable for DAG scheduling scenarios, using crossover, mutation, and fitness functions to assign priorities to each subtask, while employing a heuristically earlyest complete time (EFT) method to search for solutions to the task-processor mapping. However, the large number of iterations and iteration time of evolutionary algorithms limit their application scope. Summary of the Invention

[0006] The purpose of this invention is to overcome the problems of high computational complexity and long iteration time of existing DAG scheduling algorithms for heterogeneous computing systems, which make them difficult to implement in practice, and poor performance of table scheduling algorithms. This invention provides a task scheduling method, device, equipment and medium for heterogeneous computing systems. This method can find the optimal scheduling solution while significantly reducing the computation time and amount of computation compared with the prior art.

[0007] To achieve the above-mentioned objectives, the present invention provides the following technical solution:

[0008] A task scheduling method for heterogeneous computing systems includes:

[0009] S1. Obtain the directed acyclic graph corresponding to the target heterogeneous computing system.

[0010] S2. Determine the initial scheduling scheme and the task node queue corresponding to the directed acyclic graph, determine the probability distribution matrix based on the task node queue and its topological relationship, and construct a topologically feasible point queue based on the topological relationship of the task node queue.

[0011] S3. Based on the random walk algorithm, take any random number within a preset range, determine multiple designated points in the probability distribution matrix based on the random number, and obtain a set of designated points; convert the topologically feasible point queue into an edge-covering queue based on the set of designated points.

[0012] S4. Simulate scheduling of the edge coverage queue based on the probability distribution algorithm and update the current probability distribution matrix;

[0013] S5. Repeat steps S3 to S4 until the preset number of times is reached to obtain the target probability distribution matrix and its edge coverage queue, and then generate the target scheduling scheme.

[0014] According to a specific implementation, in the above-described task scheduling method for heterogeneous computing systems, the preset range is:

[0015] [0, 1 / (n+1)]

[0016] Where n is the total number of nodes in the task node queue.

[0017] According to a specific implementation, in the above-described task scheduling method for heterogeneous computing systems, determining multiple specified points in the probability distribution matrix based on the random number includes:

[0018] Traverse all nodes in the probability distribution matrix and determine whether the imaginary part of the diagonal element corresponding to each node exceeds the random number. If yes, the node is a designated point; otherwise, the node is not a designated point.

[0019] According to a specific implementation, in the above-described task scheduling method for heterogeneous computing systems, the step of converting the topologically feasible point queue into an edge-covering queue based on the specified point set includes:

[0020] Starting from the second node in the queue of topologically feasible points, traverse each node pi. i Determine pi i Is it a node in the specified set of points? If yes, then set pi... i and its successor node succ(pi) i ) converted to (pi i ,succ(pi i If not, add it to the edge-covering queue; otherwise, select node pi. i The corresponding target predecessor node pred(pi) i ), will (succ(pi i ),pi i ) Add to the edge coverage queue; wherein, the target predecessor node is the predecessor node with the highest communication cost with the current node.

[0021] According to a specific implementation, the above-mentioned task scheduling method for heterogeneous computing systems further includes a decontiguous step after converting the topologically feasible point queue into an edge-covered queue based on the specified point set.

[0022] The decontinuity step includes: based on the specified point set [m] i Find the edge-covering queue (pred(m)). i ),m i Check if deleting the edge will cause a logical error. If not, delete it; if so, keep it.

[0023] According to a specific implementation, in the above-described task scheduling method for heterogeneous computing systems, step S2, determining the probability distribution matrix based on the task node queue and its topological relationship, includes:

[0024] Initialize a complex matrix, and assign values ​​to the elements of the complex matrix based on the task node queue and its topological relationship; calculate and sort the PL value of each node in the task node queue; select nodes with PL values ​​from largest to smallest. The set of nodes is PL_S; where n is the total number of nodes in the task node queue, and PL is the heterogeneity variance of the task on the processor.

[0025] Based on the point set PL_S, the complex matrix is ​​iterated through a probability distribution until the preset number of iterations is reached, thereby generating the probability distribution matrix.

[0026] According to a specific implementation, in the above-described task scheduling method for heterogeneous computing systems, the preset number of times is: The number of times is given, where n is the total number of nodes in the task node queue.

[0027] Another aspect of the present invention provides a task scheduling apparatus for heterogeneous computing systems, comprising:

[0028] The acquisition unit is used to acquire the directed acyclic graph corresponding to the target heterogeneous computing system.

[0029] An initialization unit is used to determine an initial scheduling scheme and the task node queue corresponding to the directed acyclic graph, determine a probability distribution matrix based on the task node queue and its topological relationship, and construct a topologically feasible point queue based on the topological relationship of the task node queue.

[0030] An edge-covering queue iteration unit is used to generate and output a target scheduling scheme. The target scheduling scheme is generated by the following method: S3, based on a random walk algorithm, any random number is selected within a preset range, and multiple designated points are determined in the probability distribution matrix based on the random number to obtain a set of designated points; the topologically feasible point queue is converted into an edge-covering queue based on the set of designated points; S4, the edge-covering queue is simulated and scheduled based on a probability distribution algorithm, and the current probability distribution matrix is ​​updated; S5, steps S3 to S4 are repeated until a preset number of times are reached to obtain the target probability distribution matrix and its edge-covering queue, thereby generating the target scheduling scheme.

[0031] In another aspect, the present invention provides an electronic device including a processor, a network interface, and a memory, wherein the processor, the network interface, and the memory are interconnected, wherein the memory is used to store a computer program, the computer program including program instructions, and the processor is configured to invoke the program instructions to execute the above-described task scheduling method for heterogeneous computing systems.

[0032] In another aspect, the present invention provides a computer-readable storage medium, characterized in that the computer-readable storage medium stores program instructions, which, when executed by at least one processor, are used to implement the above-described task scheduling method for heterogeneous computing systems.

[0033] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0034] This invention proposes the idea of ​​using edge-covered queues for scheduling. During the scheduling process, the edge-covered queue can explore local greedy algorithms based on point greedy algorithms, which is a hybrid scheduling strategy of point greedy and edge greedy algorithms. Based on the Estimation of Distribution Algorithm (EDA) and graph random walk strategy, a method for generating edge-covered queues is designed, which has low computational complexity and number of iterations. Attached Figure Description

[0035] Figure 1 This is a flowchart of a task scheduling method for heterogeneous computing systems according to one embodiment of the present invention;

[0036] Figure 2 This is a flowchart illustrating the operation of a task scheduling device for heterogeneous computing systems in one embodiment of the present invention.

[0037] Figure 3 This is a schematic diagram of a DAG graph and its task representation in one embodiment of the present invention;

[0038] Figure 4 This is a schematic diagram of the final scheduling scheme in one embodiment of the present invention;

[0039] Figure 5 This invention provides a comparison of the performance of ECSA with other algorithms in one embodiment. Figure 1 ;

[0040] Figure 6 This invention provides a comparison of the performance of ECSA with other algorithms in one embodiment. Figure 2 ;

[0041] Figure 7 This invention provides a comparison of the performance of ECSA with other algorithms in one embodiment. Figure 3 ;

[0042] Figure 8 This is a block diagram of an electronic device structure in one embodiment of the present invention. Detailed Implementation

[0043] The present invention will be further described in detail below with reference to experimental examples and specific embodiments. However, this should not be construed as limiting the scope of the above-mentioned subject matter of the present invention to the following embodiments; all technologies implemented based on the content of the present invention fall within the scope of the present invention.

[0044] Example 1

[0045] Figure 1 An exemplary embodiment of the present invention illustrates a task scheduling method for heterogeneous computing systems, comprising:

[0046] S1. Obtain the directed acyclic graph corresponding to the target heterogeneous computing system.

[0047] S2. Determine the initial scheduling scheme and the task node queue corresponding to the directed acyclic graph, determine the probability distribution matrix based on the task node queue and its topological relationship, and construct a topologically feasible point queue based on the topological relationship of the task node queue.

[0048] S3. Based on the random walk algorithm, take any random number within a preset range, determine multiple designated points in the probability distribution matrix based on the random number, and obtain a set of designated points; convert the topologically feasible point queue into an edge-covering queue based on the set of designated points.

[0049] S4. Simulate scheduling of the edge coverage queue based on the probability distribution algorithm and update the current probability distribution matrix;

[0050] S5. Repeat steps S3 to S4 until the preset number of times is reached to obtain the target probability distribution matrix and its edge coverage queue, and then generate the target scheduling scheme (i.e., what task each processor will process at what time).

[0051] This embodiment proposes the idea of ​​using an edge-covered queue for scheduling. The edge-covered queue can explore local greedy algorithms on the basis of point greedy algorithms during the scheduling process, which is a hybrid scheduling strategy of point greedy and edge greedy algorithms. Based on the Estimation of Distribution Algorithm (EDA) and graph random walk strategy, a method for generating the edge-covered queue is designed to reduce the computational complexity and the number of iterations.

[0052] Example 2

[0053] In one possible implementation, the task scheduling method for heterogeneous computing systems (hereinafter referred to as the ECSA algorithm) described above, in step S2, determining the initial scheduling scheme and the task node queue corresponding to the directed acyclic graph specifically includes:

[0054] For the DAG (Directed Acyclic Graph) corresponding to the obtained target heterogeneous computing system, any heuristic scheduling algorithm (e.g., HEFT algorithm, PEFT algorithm, etc.) is used to generate the DAG graph node queue; the pi_HEFT and pi_PEFT are compared, and the one with better initial performance is selected as the DAG graph as the initial scheduling scheme and task node queue Qi.

[0055] In one possible implementation, the task scheduling method for heterogeneous computing systems described above, specifically including S2, determining the probability distribution matrix based on the task node queue and its topological relationship, and constructing a topologically feasible point queue based on the topological relationship of the task node queue, includes:

[0056] S21. Convert the adjacency matrix of the DAG into a 0-1 matrix A. Use dynamic programming to find the longest path s on matrix A, and then obtain P = A. 1 +A 2 +…+A s The P matrix contains all directed path information of the DAG graph and can be used to represent the topological relationships of nodes. In the resulting P matrix, P... ij >0 indicates that node i is the topological predecessor of node j, and i and j cannot be swapped; P ij =0 indicates that node i and node j have no topological relationship, and i and j can be freely swapped. (Corresponding to P) ij Nodes i and j with a value of 0 are the main forces in random diffusion, P ij Nodes with a value of 0 are the main objects of the EDA algorithm; and a topologically feasible point queue (a queue that does not violate the topological relationship) is constructed based on the topological relationship of the task node queue.

[0057] S22. Initialize a complex matrix S (n+1)(n+1) For the element S in row i and column j... ij The complex matrix S is obtained by assigning values ​​according to the following rules:

[0058] If i = j: Re(S) ij ) = 0

[0059] If i≠j: Re(S ij =0.5or0 (if P in matrix P) ij =0, then assign 0.5; if P ij If ≠0, then assign 0.

[0060] And, calculate q for each node in the task node queue Qi. i PL (prediction lookahead, variance of task heterogeneity on processor) and sort:

[0061]

[0062] Select PL values ​​from largest to smallest. The nodes form a point set PL_S.

[0063] The elements in matrix S are then assigned values ​​again according to the following rules:

[0064] If i = j: Im(S) ij ) = 1 / (n+1)or0 (if i = 0, then assign 0); where n is the total number of nodes in the task node queue;

[0065] If i ≠ j: Im(S) ij ) = 0;

[0066] S22. Select a point from the point set PL_S in sequence as the designated point; convert the task node queue into an edge cover queue based on the designated point: starting from the second node of the task node queue, traverse each node q. i Determine q i Is it the specified point? If so, then q i If the node succ(qi) and its successor node are converted to (ni, succ(qi)) and added to the edge covering queue, then node n is selected. i The corresponding target predecessor node pred(qi) is added to the edge coverage queue (pred(qi), qi); wherein, the target predecessor node is the predecessor node with the highest communication cost with the current node; and based on the current specified point s i Find (pred(si), si) in the edge coverage queue, check whether deleting this edge will cause a logical error. If not, delete it; if so, keep it and generate a decontiguous edge coverage queue.

[0067] Accordingly, the imaginary part of the S matrix is ​​updated based on the generated edge coverage queue scheduling results:

[0068] Im(S ii )=k*Im(S ii )+(1-k)*Δt;

[0069] S23, Repeat step S22 a preset number of times ( (This process is repeated) to iterate through every point in the point set PL_S. The imaginary part of the diagonal elements of matrix S is then normalized to ensure that the sum of the diagonal elements is a single imaginary unit. At this point, the probability distribution matrix S is initialized.

[0070] In one possible implementation, the above-described task scheduling method for heterogeneous computing systems, specifically includes S3:

[0071] S31. Based on the random walk algorithm, take any random number within a preset range; the preset range is: [0, 1 / (n+1)]; where n is the total number of nodes in the task node queue;

[0072] S33. Traverse all nodes in the probability distribution matrix and determine whether the imaginary part of the diagonal element corresponding to each node exceeds the random number. If yes, the node is a designated point; otherwise, the node is not a designated point, thus obtaining the set of designated points [m]. i ];

[0073] S33. Based on the specified set of points, convert the queue of topologically feasible points into an edge-covered queue.

[0074] Starting from the second node in the queue of topologically feasible points, traverse each node pi. i Determine pi i Is it a node in the specified set of points? If yes, then set pi... i and its successor node succ(pi) i ) converted to (pi i ,succ(pi i Add to the edge-covering queue; otherwise, select node pi. i The corresponding target predecessor node pred(pi) i ), will (pred(pi i ),pi i Add the target node to the edge coverage queue; wherein the target predecessor node is the predecessor node with the highest communication cost with the current node.

[0075] And, based on the specified set of points [m i Find the edge-covered queue set (pred(m)). i ),m i Check if deleting the edge will cause a logical error. If not, delete it; if so, keep it. Generate a queue of edges after removing contiguous edges.

[0076] Furthermore, after generating the edge-covering queue, execute S4 (simulate scheduling of the edge-covering queue based on the probability distribution algorithm and update the current probability distribution matrix), and return to S3; repeat steps S3 to S4 until the preset number of times is reached. (times), to obtain the target probability distribution matrix, and generate the edge coverage queue and target scheduling scheme based on the target probability distribution matrix.

[0077] Specifically, the graph random walk algorithm traverses a graph starting from one or a series of vertices. At any vertex, the traverser will move to its neighboring vertices with probability (1-a), and will randomly jump to any vertex in the graph with probability 'a', where 'a' is called the jump probability. After each walk, a probability distribution is obtained, which describes the probability of each vertex being visited. This probability distribution is used as the input for the next walk, and this process is iterated repeatedly. When certain preconditions are met, this probability distribution will tend to converge; after convergence, a stationary probability distribution can be obtained.

[0078] In the ECSA algorithm, the random walk module contains the following:

[0079] random(0,1 / (n+1)) adds points whose diagonal is greater than or equal to this value to the point set (if the selected points can form an edge, choose the one with the larger PL value), in descending order of imaginary part.

[0080] Another aspect of the present invention provides a task scheduling apparatus for heterogeneous computing systems, comprising:

[0081] The acquisition unit is used to acquire the directed acyclic graph corresponding to the target heterogeneous computing system.

[0082] An initialization unit is used to determine an initial scheduling scheme and the task node queue corresponding to the directed acyclic graph, determine a probability distribution matrix based on the task node queue and its topological relationship, and construct a topologically feasible point queue based on the topological relationship of the task node queue.

[0083] An edge-covering queue iteration unit is used to generate and output a target scheduling scheme. The target scheduling scheme is generated using the following method: S3, based on a random walk algorithm, any random number is selected within a preset range, and multiple designated points are determined in the probability distribution matrix based on the random number to obtain a set of designated points; the topologically feasible point queue is converted into an edge-covering queue based on the set of designated points; S4, the edge-covering queue set is simulated and scheduled based on a probability distribution algorithm, and the current probability distribution matrix is ​​updated; S5, steps S3 to S4 are repeated until a preset number of times is reached to obtain a target probability distribution matrix, and the edge-covering queue and the target scheduling scheme are generated based on the target probability distribution matrix.

[0084] Specifically, the edge cover queue iteration unit includes: an edge cover queue generation module, a probability distribution module (EDA), and a random walk module;

[0085] Edge Cover Queue Generation Module: Edge cover queue generation is divided into two sub-modules, including: point queue-edge cover queue conversion module and decontinuity module.

[0086] 1.1 Point Queue to Edge Cover Queue Conversion Module:

[0087] The point queue-edge cover queue conversion module yields a topologically feasible point queue pi and a specified point queue [n]. i Starting from the second node of pi, for node pi... i It becomes (pred(pi) i ),pi i And place it into the display queue. If pi i It is a specified point queue [n i [One of the members, all succ(pi)] i ) becomes (pi i ,succ(pi i And add it to the explicit queue. If not, select the pred(pi) with the largest edge weight. i ). The remainder (pred(pi) i ),pi i The data is placed into an implicit queue. The resulting explicit queue is then output as the module's output.

[0088] 1.2 Remove the continuity module:

[0089] In the edge cover queue generated by the point queue-edge cover queue conversion module, if you want n i To change to a non-contiguous node, find (pred(n i ),n i Check if deleting it will cause a logical error; if it will not cause a topological error, then delete it.

[0090] The probability distribution module (EDA) is divided into two modules: the EDA-exchange module, which guides changes in topological relationships, and the EDA-update module, which guides updates to the S matrix.

[0091] 2.1 EDA-exchange module:

[0092] All (n i ,succ(n i The elements are extracted, topologically sorted, and then sequentially placed into an empty queue. During the placement process, the corresponding succ(n) values ​​in the S matrix are... i The probability distribution values ​​between (n) are used to determine the position of the edge using the roulette wheel method, resulting in (n) i ,succ(1)),(n i ,succ(2))…,Then fill the edges back into the explicit queue in this order. If a topological error occurs at the fill position, continue to place it at the beginning of the queue and select the next edge to fill. If the last [n i If the queue is not empty, then the position will be filled back to the initial position.

[0093] 2.2 EDA-update module:

[0094] Based on the Δt and succ(n) of the new queue and the old queue i The topological relationship between n. j ∈ succ(n i ),n k ∈succ(n i If task n j In n k Before:

[0095]

[0096]

[0097] 3. Random walk module

[0098] Graph random walk algorithms traverse a graph starting from one or a series of vertices. At any given vertex, the traverser will move to its neighboring vertices with probability (1-a), and will randomly jump to any other vertex in the graph with probability 'a', where 'a' is the jump probability. After each walk, a probability distribution is derived, which describes the probability of each vertex being visited. This probability distribution is used as the input for the next walk, and this process is iterated repeatedly. Under certain preconditions, this probability distribution will tend to converge. Once converged, a stationary probability distribution is obtained.

[0099] In the ECSA algorithm, the random walk module contains the following:

[0100] random(0, i / (n+1)) adds points whose diagonal is greater than or equal to this value to the point set (if the selected points can form an edge, select the one with the larger PL value), in descending order of imaginary part.

[0101] Accordingly, the above modules constitute the edge cover queue iteration unit. In the edge cover queue iteration module, the S matrix guides the generation of a new edge cover queue. The specific steps are as follows:

[0102] (1) Receive the initial queue and the specified scheduling algorithm.

[0103] (2) Using random walk, take a random number within a preset range, and add points with imaginary parts greater than or equal to this value to the point set (if there are points that can form an edge among the selected points, select the one with the larger PL value and delete the other), in order of imaginary parts from large to small.

[0104] (3) Pass the initial point queue and point set into the point queue and then into the edge cover queue generation module to obtain an edge cover queue.

[0105] (4) Pass the edge coverage queue and the point set into the continuity module to obtain a new edge coverage queue.

[0106] (5) Local EDA module, guided by the real part of the S matrix, sequentially processes the n points in the point set. i succ(n) i The topology is changed, and the real part of the S matrix is ​​updated based on the scheduling results.

[0107] (6) Update the imaginary part of all points in the point set and normalize it.

[0108] (7) Repeat steps (2)(3)(4)(5)(6) until... Next, output the scheduling result.

[0109] Accordingly, the task scheduling device for heterogeneous computing systems provided in this embodiment of the invention takes the communication matrix and heterogeneous computing matrix of the DAG as input and the scheduling scheme of the DAG as output. Specifically, as shown in the figure... Figure 2 The workflow of this scheduling method is shown.

[0110] In summary, this invention applies edge-covered queues to task scheduling models modeled as directed acyclic graphs (DAGs), and utilizes probability distribution algorithms and random walk algorithms to guide the generation of suitable edge-covered queues to achieve better scheduling results. Theoretical and experimental results demonstrate that this approach can effectively reduce scheduling lengths on both stochastic task graphs and common engineering program graphs (FFT, GE).

[0111] Example 3

[0112] In a further embodiment of the present invention, with Figure 3 Taking the DAG graph and task node queue of a heterogeneous computing system as an example, the flow of the ECSA scheduling algorithm described in this embodiment of the invention is illustrated, including:

[0113] 1. Obtain the adjacency matrix A of the DAG graph, and calculate the longest path length as 4; calculate the topology matrix P = A. 1 +A 2 +…+A 4 Thus, the topological matrix corresponding to the DAG is obtained;

[0114] 2. Using a heuristic greedy method, schedule the DAG in either the fastest time (FT) or the fastest time (OEFT). Choose the heuristic greedy method that seems better (FT or OEFT). In this example, the OEFT greedy method is better, so ECSA's heuristic greedy method is OEFT, and the initial point queue is [1,4,6,2,3,5,8,7,9,10].

[0115] 3. Initialize the probability matrix S:

[0116] Calculate the PL value to obtain PLS = [1,2,7]; pass the initial point queue [1,4,6,2,3,5,8,7,9,10] and [1] into the vertex-to-line and loss-continuity functions to obtain: Line2 = [(1,4),(1,6),(1,2),(1,3),(1,5),(4,8),(3,7),(5,9),(8,10)];

[0117] Perform EDA on Line2 and [1] to obtain Line3; schedule and update the real and imaginary parts of the S matrix; do the same for [3] and [7], and the S matrix initialization is complete.

[0118] 4. Perform a random walk (random(0, 1 / (n+1)) and add points whose imaginary part on the diagonal is greater than this point to the set of points V1. Then, use the set of points V1 to add the real parts of the corresponding diagonal elements in the S matrix to V2. For example, in this iteration, V1 = [1] and V2 = [1]:

[0119] Line1=vertex-to-line(π,V1);

[0120] Line2=loss-continuity(line1,V2);

[0121] Line3=EDA-exchange(line2,V1,S);

[0122] Repeat the above steps iteratively. The output line 3 of the last iteration is the edge cover queue obtained by ECSA. This time, the edge cover queue is: [(1,3),(1,2),(1,4),(1,6),(1,5),(4,8),(3,7),(5,9),(8,10)]; the final scheduling result is as follows. Figure 4 .

[0123] Furthermore, to evaluate the relative performance of the ECSA provided by this invention, a DAG graph for simulating a heterogeneous computing system was generated using the DAG generation program TGFF (a DAG generation tool). For TGFF, there are many parameters related to the task graph structure: the average value of the lower limit of the number of nodes in the graph, maturity, the maximum in-degree and out-degree of the graph nodes, etc. Based on the preset parameters, 1920 different DAGs were randomly generated. In each DAG, 20 different random graphs generated different communication cost edges and computation cost tasks. Therefore, 38400 random DAGs were used in the re-search.

[0124] In ECSA, the learning rate k is 0.005 in both EDA and graph random walk updates. To evaluate the performance of ECSA, we compared it with four algorithms (EFT, HEFT, PEFT, and LO), all coded in MATLAB-2021b and run on the same computer with an AMD 5800x 3.8GHz processor and 32GB of RAM. The results are as follows: Figures 5-7 As shown.

[0125] Figure 5 , Figure 6 ( Figure 5 , 6 In the diagram, the vertical axis represents the maximum completion time, m is the number of processors in the heterogeneous computing system, and n is the number of tasks. This shows the maximum completion time as a function of the DAG size n, processor type m, and CCR. Figure 5 , 6 It can be seen that ECSA can effectively reduce the maximum completion time of the DAG graph as the size of the DAG gradually increases. The more tasks there are, the greater the reduction in maximum completion time. HEFE and PEFT maintain similar performance in stochastic DAGs. EFT is the simplest greedy algorithm and has the worst performance. The LO algorithm is designed and used for DAGs with specific structures. Although it has higher complexity, it performs similarly to HEFE and PEFT when the DAG size is small, but its performance is worse than HEFE and PEFT when the DAG size is large. Overall, considering all stochastic graphs as a whole, ECSA reduces the maximum completion time by 8% compared to EFT, 5% compared to HEFT, 4.3% compared to PEFT, and 6.2% compared to the LO algorithm.

[0126] Maximum completion time is the most direct goal in task scheduling, while SLR is a parameter that better reflects the performance of the scheduling algorithm; from Figure 7 ( Figure 7 In the table, from top to bottom, the algorithms are EFT, LO, HEFT, PEFT, and ECSA. It can be seen that the scheduling scheme provided by ECSA has a lower SLR than other scheduling algorithms. Furthermore, as the DAG size increases, the SLR increases, while ECSA further reduces the SLR.

[0127]

[0128] Where makespan is the scheduling length of the scheduling scheme, CP MIN It is the shortest critical path in the DAG graph.

[0129] In summary, the experimental results show that ECSA has a significant performance improvement over existing scheduling algorithms.

[0130] Example 4

[0131] In another aspect of the invention, such as Figure 8 As shown, an electronic device is also provided, including a processor, a network interface, and a memory, wherein the processor, the network interface, and the memory are interconnected, wherein the memory is used to store a computer program, the computer program including program instructions, and the processor is configured to call the program instructions to execute the above-described task scheduling method for heterogeneous computing systems.

[0132] In embodiments of the present invention, the processor can be an integrated circuit chip with signal processing capabilities. The processor can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0133] The various methods, steps, and logic diagrams disclosed in the embodiments of this invention can be implemented or executed. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this invention can be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The processor reads information from the storage medium and, in conjunction with its hardware, completes the steps of the above methods.

[0134] In another aspect, the present invention provides a computer storage medium storing program instructions, which, when executed by at least one processor, are used to implement the above-described task scheduling method for heterogeneous computing systems.

[0135] In one possible implementation, the storage medium may be a memory, such as volatile memory or non-volatile memory, or may include both volatile and non-volatile memory.

[0136] Among them, non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory.

[0137] Volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (Synchlink DRAM, SLDRAM), and direct memory bus RAM (DRRAM).

[0138] The storage media described in the embodiments of the present invention are intended to include, but are not limited to, these and any other suitable types of memory.

[0139] It should be understood that the system disclosed in this invention can be implemented in other ways. For example, the division of modules is merely a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the communication connection between modules can be through some interfaces, indirect coupling or communication connections between servers or units, and can be electrical or other forms.

[0140] Furthermore, the functional modules in the various embodiments of the present invention can be integrated into one processing unit, or each module can exist physically separately, or two or more modules can be integrated into one processing unit. The integrated unit described above can be implemented in hardware or as a software functional unit.

[0141] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0142] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A task scheduling method for a heterogeneous computing system, characterized in that, include: S1. Obtain the directed acyclic graph corresponding to the target heterogeneous computing system. S2. Determine the initial scheduling scheme and the task node queue corresponding to the directed acyclic graph, determine the probability distribution matrix based on the task node queue and its topological relationship, and construct a topologically feasible point queue based on the topological relationship of the task node queue. S3. Based on the random walk algorithm, take any random number within a preset range, determine multiple designated points in the probability distribution matrix based on the random number, and obtain a set of designated points; convert the topologically feasible point queue into an edge-covering queue based on the set of designated points. S4. Simulate scheduling of the edge coverage queue based on the distribution estimation algorithm and update the current probability distribution matrix; S5. Repeat steps S3 to S4 until the preset number of times is reached to obtain the target probability distribution matrix and its edge coverage queue, and then generate the target scheduling scheme. Specifically, converting the topologically feasible point queue into an edge-cover queue based on the specified point set includes: Starting from the second node in the queue of topologically feasible points, traverse each node pi. i Determine pi i Is it a node in the specified set of points? If yes, then set pi... i and its successor node succ(pi) i ) converted to (pi i ,succ(pi i If not, add it to the edge-covering queue; otherwise, select node pi. i The corresponding target predecessor node pred(pi) i ), will (pred(pi i ),pi i ) Add to the edge coverage queue; wherein, the target predecessor node is the predecessor node with the highest communication cost with the current node.

2. The task scheduling method for a heterogeneous computing system according to claim 1, wherein, The preset range is: [0,1 / (n+1)] Where n is the total number of nodes in the task node queue.

3. The task scheduling method for a heterogeneous computing system according to claim 1, wherein, The step of determining multiple specified points in the probability distribution matrix based on the random number includes: Traverse all nodes in the probability distribution matrix and determine whether the imaginary part of the diagonal element corresponding to each node exceeds the random number. If yes, the node is a designated point; otherwise, the node is not a designated point.

4. The task scheduling method for a heterogeneous computing system according to claim 1, wherein, The method further includes a decontinuity step after converting the topologically feasible point queue into an edge-covered queue based on the specified point set; The decontinuity step includes: based on the specified point set [m] i Find the edge coverage queue (pred(m)) i ),m i Check if deleting the edge will cause a logical error. If not, delete it; if so, keep it.

5. The task scheduling method for a heterogeneous computing system according to claim 1, wherein, In step S2, determining the probability distribution matrix based on the task node queue and its topological relationship includes: Initialize a complex matrix, and assign values ​​to the elements of the complex matrix based on the task node queue and its topological relationship; calculate and sort the PL value of each node in the task node queue; select nodes with PL values ​​from largest to smallest. The set of nodes is PL_S; where n is the total number of nodes in the task node queue, and PL is the heterogeneity variance of the task on the processor. Based on the point set PL_S, a point is selected sequentially within the point set PL_S as a designated point; based on the designated point, the task node queue is converted into an edge-covering queue; based on the generated edge-covering queue scheduling result, the imaginary part of the complex matrix is ​​updated; the complex matrix is ​​iterated through probability distribution until the preset number of iterations is reached, and the probability distribution matrix is ​​generated.

6. The task scheduling method for a heterogeneous computing system according to claim 1 or 5, wherein, The preset number of times is The number of times is given, where n is the total number of nodes in the task node queue.

7. A task scheduling device for heterogeneous computing systems, characterized in that, include: The acquisition unit is used to acquire the directed acyclic graph corresponding to the target heterogeneous computing system. An initialization unit is used to determine an initial scheduling scheme and the task node queue corresponding to the directed acyclic graph, determine a probability distribution matrix based on the task node queue and its topological relationship, and construct a topologically feasible point queue based on the topological relationship of the task node queue. An edge-covering queue iteration unit is used to generate and output a target scheduling scheme. The target scheduling scheme is generated using the following method: S3, based on a random walk algorithm, taking any random number within a preset range, determining multiple specified points in the probability distribution matrix based on the random number, and obtaining a set of specified points; converting the topologically feasible point queue into an edge-covering queue based on the set of specified points; S4, performing simulated scheduling on the edge-covering queue based on a distribution estimation algorithm, and updating the current probability distribution matrix; S5, repeating steps S3 to S4 until a preset number of times is reached, obtaining the target probability distribution matrix and its edge-covering queue, thereby generating the target scheduling scheme. Specifically, converting the topologically feasible point queue into an edge-cover queue based on the specified point set includes: Starting from the second node in the queue of topologically feasible points, traverse each node pi. i Determine pi i Is it a node in the specified set of points? If yes, then set pi... i and its successor node succ(pi) i ) converted to (pi i ,succ(pi i If not, add it to the edge-covering queue; otherwise, select node pi. i The corresponding target predecessor node pred(pi) i ), will (pred(pi i ),pi i ) Add to the edge coverage queue; wherein, the target predecessor node is the predecessor node with the highest communication cost with the current node.

8. An electronic device, comprising: The system includes a processor, a network interface, and a memory, which are interconnected. The memory stores a computer program, which includes program instructions. The processor is configured to invoke the program instructions and execute the program as described in claim 1. The task scheduling method for heterogeneous computing systems as described in any one of the six claims.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores program instructions that, when executed by at least one processor, are used to implement claim 1. The task scheduling method for heterogeneous computing systems as described in any one of the six claims.