Parallel task fine-grained dynamic priority scheduling strategy based on DAG model on multi-core platform

By building a DAG unit task model and dynamic scheduling framework on a multi-core platform, dynamically adjusting task priorities, solving the problem of uneven resource utilization caused by static priority allocation, improving the flexibility and efficiency of task scheduling, and optimizing response time and resource utilization.

CN120256047APending Publication Date: 2025-07-04CHONGQING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202510310936.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-17
Publication Date
2025-07-04

AI Technical Summary

Technical Problem

In the existing DAG task scheduling methods on multi-core platforms, static priority allocation leads to uneven resource utilization and limited task parallelism, which cannot be flexibly adjusted, affecting system performance and response time.

Method used

By building a DAG unit task model, the tasks are divided into smaller unit tasks, the priority is dynamically adjusted, and a fine-grained dynamic scheduling framework and WCRT calculation algorithm are proposed to optimize task dependencies and resource allocation.

Benefits of technology

It realizes the flexibility and efficiency improvement of task scheduling, makes full use of multi-core platform resources, optimizes response time and resource utilization, and improves the overall performance and real-time nature of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120256047A_ABST
    Figure CN120256047A_ABST
Patent Text Reader

Abstract

The invention relates to a fine-grained dynamic unit task scheduling strategy, aims to solve the problem of real-time scheduling of DAG (directed acyclic graph) tasks on a multi-core platform, and belongs to the field of real-time embedded system task scheduling. Static priority distribution is adopted in an existing priority preemptive scheduling method, the parallel execution degree of tasks is limited, and response time is possibly increased. According to the method, the DAG vertex is divided into a plurality of unit nodes, the independent priority is allocated to each unit node, execution is performed with the shorter worst case execution time (WCET), the priority is dynamically adjusted, the limitation of the static priority is broken through, the task parallelism degree is improved, and the calculation limit of the worst response time (WCRT) is optimized. Meanwhile, a unit node priority distribution algorithm is designed, and the task scheduling efficiency is further improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of multi-core platform task scheduling, and in particular to a parallel task fine-grained dynamic priority scheduling method based on a DAG model, which is suitable for parallel real-time task scheduling optimization on a multi-core platform and aims to improve the parallel execution efficiency and response time of tasks with complex dependencies on the multi-core platform. Background Art

[0002] With the widespread application of real-time embedded systems in cutting-edge fields such as edge computing, industrial automation, and the Internet of Things, a large amount of real-time data needs to be processed, such as data in sensor networks, aircraft position information in air traffic control systems, and temperature and air pressure in engine control. The salient feature of real-time systems is that they must complete calculations and information processing within strict time limits. The timeliness and accuracy of the results are crucial, and failure to meet these requirements may have serious consequences. Single-processor platforms are often unable to handle these complex real-time tasks, so multi-processor platforms have gradually become the mainstream architecture of real-time systems, which can provide stronger computing power and processing performance. The DAG (directed acyclic graph) task model has become a research hotspot for parallel task models on multi-core platforms because it can intuitively describe the dependencies between tasks. The DAG model is usually used to represent the various subtasks in task execution and their dependencies, and is particularly suitable for complex parallel computing.

[0003] At present, many DAG task scheduling methods rely on static priority allocation to determine the order of task execution. However, this static priority allocation has certain limitations in the scheduling process, especially in the scheduling of complex parallel tasks. Specifically, although the vertices of DAG tasks are scheduled according to fixed time units, in traditional scheduling algorithms, the priority of tasks remains unchanged throughout their life cycle. Such static priority allocation cannot be flexibly adjusted according to real-time load changes or specific needs of task execution. For example, when the system load is high, some low-priority tasks may be blocked for a long time, while the execution of high-priority tasks may lead to uneven resource utilization and affect the overall performance of the system. In addition, static priority also limits the parallelism between tasks. On multi-core platforms, parallel execution of tasks is often the key to improving system throughput and reducing response time, while static priority allocation cannot fully schedule independent parts of tasks, resulting in the failure to optimally utilize computing resources, thereby affecting the scheduling efficiency of the entire system and the responsiveness of real-time tasks. Therefore, how to overcome the limitations of static priority allocation and achieve more flexible and dynamic priority adjustment has become a core issue that needs to be solved in the field of DAG task scheduling on multi-core platforms. Summary of the invention

[0004] To solve the existing problems, the present invention proposes a fine-grained dynamic priority scheduling strategy for parallel tasks based on the DAG model on a multi-core platform. The method mainly includes:

[0005] Construct a DAG unit task model. According to the worst-case execution time (WCET) of DAG nodes, tasks are logically divided into smaller unit tasks, thereby improving the flexibility of task scheduling.

[0006] Assign priorities to DAG unit tasks through a specific algorithm, fully exploiting the parallelism within the DAG task internal structure, and maximizing the utilization of computing resources on the multi-core platform.

[0007] Based on the offline execution sequence and priority order of tasks, propose a WCRT calculation algorithm to eliminate the pessimism commonly found in traditional task response time estimation, thereby achieving more accurate task scheduling and response time analysis.

[0008] Propose a fine-grained dynamic unit task scheduling framework. Each vertex is logically divided into unit nodes, and each node executes with a smaller WCET, improving the DAG task scheduling efficiency.

[0009] Advantages and effects of the present invention:

[0010] 1) Through the fine-grained dynamic priority scheduling framework of the present invention, tasks are divided into smaller execution units, making the scheduling process more flexible and efficient. This framework can dynamically adjust task priorities according to the real-time load of the system and the task execution status to reduce the total execution time of tasks and improve the utilization rate of system resources. Different from traditional static priority scheduling methods, the fine-grained scheduling framework can respond in real time to the changes in dependencies and computing requirements between tasks, avoiding resource waste caused by fixed priorities. By this method, the parallel computing power of the multi-core platform can be fully utilized, the allocation of computing resources can be optimized, the potential of the multi-core platform can be maximized, thereby improving the overall scheduling performance and ensuring the satisfaction of real-time requirements.

[0011] 2) The present invention proposes a WCRT calculation algorithm based on the offline execution sequence of tasks, eliminating the pessimism problem commonly existing in traditional task response time estimation. In traditional scheduling methods, due to overly conservative estimation of task dependencies and resource allocation, it often leads to low scheduling efficiency and low resource utilization. And this algorithm provides a more accurate evaluation of response time limits through precise analysis of task dependencies, execution order, and dynamic resource allocation. This not only ensures the efficiency of task scheduling, reduces the performance bottleneck caused by overly conservative estimation, but also optimizes the use of computing resources, avoids unnecessary resource waste, improves the overall efficiency of task scheduling, and enables more reasonable allocation and utilization of system resources. Description of the Drawings

[0012] Figure 1 It is a schematic diagram of parallel tasks based on the DAG model;

[0013] Figure 2 It is a schematic diagram of the DAG unit task model constructed by the present invention;

[0014] Figure 3 It is a schematic diagram of the execution sequence in which the present invention maps the DAG task to a multi-core platform according to the fine-grained dynamic scheduling framework.

[0015] Figure 4 It is the attached drawing of the abstract of the specification. Specific embodiments

[0016] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0017] First, Figure 1 It shows a schematic diagram of parallel tasks based on the DAG model. On a multi-core platform with M homogeneous cores, the scheduling problem of the DAG task can be expressed as G=(V, E), where V is the set of subtask nodes and E is the dependency relationship (directed edge) between tasks. Each node v i ∈V represents a subtask, and the value in the circle represents the worst-case execution time (WCET) of the task. The sum of the WCETs of all nodes is defined as the computational load Volume(G) of the task. A path p is composed of a series of nodes connected by directed edges, and the path length len(p) is equal to the sum of the WCETs of all nodes on the path. The dependency relationship between nodes determines the execution order of tasks. If v i points to v j , then v i is the predecessor node of v j , and v j is the successor node of v i . The set of predecessor nodes is pred(v j ), and the set of successor nodes is succ(v i ). If there exists a path from v i to v j , then v i is the ancestor node of v j , and v j is the descendant node of v i . The set of ancestor nodes is ance(v j), and the set of descendant nodes is desc(v i ). In the DAG, the source node v src has no predecessor nodes, and the sink node v sink has no successor nodes. If there are multiple source nodes or sink nodes in the graph, virtual nodes with a WCET of 0 can be created to ensure that there is only one source node and one sink node. These relationships determine the execution order and scheduling strategy of the tasks.

[0018] Figure 1 The shown DAG task graph has 7 subtasks, where v1 is v src , and v7 is v sink . The longest path len(G) = len({v1, v2, v6, v7}) = 8, and Volume(G) = 17. For node v6, the following relationships exist:

[0019] pred(v6) = {v2, v3}, succ(v6) = {v7}

[0020] ance(v6) = {v1, v2, v3}, desc(v6) = {v7}

[0021] Secondly, Figure 2 is a schematic diagram of the DAG unit task model constructed for the present invention. Taking the unitization and segmentation of the DAG task in Figure 1 as an example. The WCET of vertex v4 is 4, and after unitization, it is divided into 4 unit nodes, respectively represented as The WCET of each unit node is 1. In the DAG unit task model, each vertex v i of the original DAG is subdivided into multiple unit nodes where the value range of α is from 1 to the WCET of this vertex. These unit nodes are assigned independent priorities The smaller the priority value, the more priority the task has for execution. Through this subdivision, the scheduler can more precisely arrange the execution of tasks to ensure that critical tasks are executed first. The unitization process is a logical abstraction aimed at optimizing the design of the scheduling algorithm and does not require changing the physical hardware or system architecture. In the unit task model, the execution time of the unit node is fixed at 1 and cannot be split. Once execution starts, even if a higher-priority node is ready, the current execution cannot be interrupted.

[0022] The present invention designs the following algorithm to determine the priority of each unit task and its final allocation order. By calculating the remaining path length (rpl) and delay volume (dv), priorities are assigned to each unit node in the unit DAG task. The content includes:

[0023] S1. Initialize the penultimate unit node (such as )'s rpl and dv, and set their values to 1. Indicates from to the final sink node the longest remaining path length between, while reflects the total computational load of the delay of this node, that is, the maximum cumulative delay that the unit task may affect.

[0024] S2. Remove the last two unit nodes (such as and ) from the node set V.

[0025] S3. Traverse the remaining nodes in the unit node set V in reverse topological order, backtracking from the third-to-last unit node (such as ) to the source node to calculate the rpl and dv of each unit node. Among them:

[0026]

[0027] S4. Sort all unit nodes according to the rpl value. Introduce dv as the secondary sorting criterion, that is, among the nodes with the same rpl value, the unit node with the largest dv value is scheduled first.

[0028] S5. Return the final sequence, which is the priority assignment order of the DAG unit tasks.

[0029] Next, based on the offline execution sequence and priority order of tasks, the present invention proposes a WCRT calculation algorithm. The content includes:

[0030] S1. Initialize the values of m time tuples tGroup to 0, identifying different cores. Initialize to 0, representing the earliest start time of.

[0031] S2. Initialize the earliest start time of the node in a loop according to the topological sequence. It is expressed as:

[0032]

[0033] S3. Process the unit task with the highest priority in a loop

[0034] S31. Loop through the m time tuples tGroup. If the time tuple marks that a suitable core is found for the current task, adjust the current time tuple:

[0035]

[0036] S32. Otherwise, select the time tuple with the smallest value and adjust the current time tuple:

[0037]

[0038] tGroup(i).time = tGroup(i).time + 1

[0039] S33. Adjust the earliest start time of the node according to the time tuple selected by the final unit task.

[0040]

[0041] S4. The settlement result of the worst-case completion time of the final task is:

[0042] WCRT = max(tGroup(m))

[0043] Based on the WCRT calculated by the algorithm and combined with parameters such as the deadline and period of the task, it can help evaluate the schedulability of DAG tasks. Through this information, it can be determined whether the tasks can be completed on time under the given time constraints and ensure that the execution of all tasks does not exceed the time limit or conflict.

[0044] Finally, the present invention proposes a fine-grained dynamic unit task scheduling framework. The content includes:

[0045] S1. In the initialization stage, all m cores are marked as idle and uniformly added to the set to facilitate the scheduler to manage available resources.

[0046] S2. Clean up tasks. The scheduler checks the vertices in the DAG task, removes the vertices that have completed execution, and keeps the scheduling set updated.

[0047] S3. The scheduler checks the system resource status and confirms whether the following two conditions are simultaneously satisfied: (1) There are still idle cores in the set . (2) There are still unexecuted vertices in the set V.

[0048] S4. Perform task selection. If the two conditions are satisfied, the scheduler selects the vertex v with the highest priority from the set V h for execution, ensuring that v h > v j , that is, v h has the highest priority among all other vertices.

[0049] S5. The scheduler immediately allocates an idle core m ic to v h , regardless of v hWhether the immediate execution condition is met to avoid task blocking or resource competition

[0050] S6. Update the task status, and remove the idle core allocated to v h from and remove v h from the set V and add it to the unfinished task set UnfinishedSet.

[0051] S7. Update the priority triplet associated with v h to ensure that its priority information is correct, facilitating sorting and allocation based on the latest information in subsequent scheduling cycles. The priority triplet is defined as follows:

[0052] For any v i ∈V, where v i is composed of c i unit nodes, and its priority set is Then the priority triplet is defined as follows, where p i represents the initial priority of v i (i.e., ).

[0053] pt i ={p i , base i , ev i}

[0054] base i satisfies the following conditions, where ε i is the smallest integer that satisfies this condition.

[0055]

[0056] The encoded value ev i is defined as follows, where represents the priority of the α-th unit node of v i , and represents the (c i - 2)-th power of base i .

[0057]

[0058] During runtime, the priorities of the internal unit nodes of v i are dynamically regenerated as follows:

[0059] 1. The priority of the initial unit node is set to:

[0060]

[0061] 2. For each subsequent unit node, its priority is calculated based on the priority of the previous unit node and a bitwise AND operation:

[0062]

[0063] 3. Then update ev using a logical right shift operation i :

[0064] ev i = ev i >> ε i

[0065] S8. All unexecuted vertices are merged back into set V to prepare for the next round of scheduling. Reset {UnfinishedSet} to an empty set to prepare for processing the next batch of tasks.

[0066] S9. The entire scheduling process continues to run until all vertices in the DAG tasks are executed, ensuring that the task graph calculation is completed and all core resources are fully utilized.

[0067] Figure 3 shows Figure 2 the execution sequence of the unit DAG task in the fine-grained dynamic scheduling framework based on 2 cores. As can be seen from the figure, there are only two idle time blocks, which significantly improves the utilization rate of the cores.

[0068] The present invention designs a priority allocation algorithm, reduces the bound by optimizing the priority allocation of unit nodes, and proposes a fine-grained unit scheduling framework to dynamically adjust the vertex priorities of DAG tasks throughout their entire life cycle. At the same time, in addition to the pessimism inherent in traditional analysis, it improves task parallelism and schedulability, and enhances resource utilization efficiency.

[0069] Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing relevant hardware through a program, and this program can be stored in a computer-readable storage medium. The storage medium can include: ROM, RAM, disk, or optical disc, etc.

[0070] Although the embodiments of the present invention have been shown and described, those of ordinary skill in the art can understand that various changes, modifications, substitutions, and variations can be made to these embodiments without departing from the principles and spirit of the present invention. The scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A fine-grained dynamic priority scheduling strategy for parallel tasks based on the DAG model on a multi-core platform, characterized in that, The method includes: Construct a DAG unit task model, and logically divide tasks into smaller unit tasks according to the worst-case execution time (WCET) of DAG nodes, thereby improving the flexibility of task scheduling; Assign priorities to DAG unit tasks through a specific algorithm, fully exploit the parallelism of the internal structure of DAG tasks, and maximize the utilization of computing resources on multi-core platforms; Based on the offline execution sequence and priority order of tasks, propose a WCRT calculation algorithm to eliminate the pessimism commonly found in traditional task response time estimation, thereby achieving more accurate task scheduling and response time analysis; Propose a fine-grained dynamic unit task scheduling framework, where each vertex is logically divided into unit nodes, and each node is executed with a smaller WCET to improve the scheduling efficiency of DAG tasks.

2. A fine-grained dynamic priority scheduling strategy for parallel tasks based on the DAG model on a multi-core platform according to claim 1, characterized in that In the constructed DAG unit task model, each vertex v of the original DAG i is subdivided into multiple unit nodes according to its WCET where the value range of α is from 1 to the WCET value of this vertex. Each unit node has an independent priority 3. A fine-grained dynamic priority scheduling strategy for parallel tasks based on the DAG model on a multi-core platform according to claim 1, characterized in that, In the priority assignment algorithm, backtracking from the sink node to the source node is performed through recursive calculation according to the remaining path length (rpl) and delay volume (dv). The priority sorting is based on the rpl value of the node for the main sorting. In the case of the same rpl value, the unit node with a larger dv value of the delay volume is scheduled first. The calculation methods for the remaining path length and delay volume are respectively:

4. A fine-grained dynamic priority scheduling strategy for parallel tasks based on the DAG model on a multi-core platform according to claim 1, characterized in that, The earliest start time in the proposed task-based offline sequence WCRT calculation method In the initialization process, nodes are traversed in topological order, and the earliest start time of each node is calculated recursively to ensure that the execution order of nodes does not violate the dependency relationship. The calculation method is as follows:

5. A fine-grained dynamic priority scheduling strategy for parallel tasks based on the DAG model on a multi-core platform according to claim 1, characterized in that In the proposed method for calculating the WCRT of a task-based offline sequence, the core selection judgment loop traverses m time tuples tGroup. If the time tuple then mark that the appropriate core has been found for the current task and adjust the current time tuple:

6. A fine-grained dynamic priority scheduling strategy for parallel tasks based on a DAG model on a multi-core platform according to claim 1, characterized in that, In the proposed task-based offline sequence WCRT calculation method, if none of the time tuples satisfy Ensure the effective utilization of the core by selecting the minimum time tuple. That is, select the time tuple:

7. A fine-grained dynamic priority scheduling strategy for parallel tasks based on the DAG model on a multi-core platform according to claim 1, characterized in that, The priority triple pt in the proposed fine-grained dynamic unit task scheduling framework i is used to represent the initial priority of node v i , the base value base i and the encoded value ev i . The ev i is dynamically updated through the calculation of the priority difference between nodes and the base value base i to ensure the correctness of the priority and the rationality of the task order during the scheduling period.

8. A fine-grained dynamic priority scheduling strategy for parallel tasks based on the DAG model on a multi-core platform according to claim 1, characterized in that The framework can flexibly allocate computing cores according to the priorities of tasks and the idle conditions of resources, and ensure the high efficiency of task execution and the maximization of resource utilization.

Citation Information

Cited By

  • Priority scheduling method and system for on-orbit data processing tasks

    CN121144051A

  • Prioritization scheduling method and system for on-orbit data processing tasks

    CN121144051B

  • Efficient dynamic graph pattern mining method and system based on DAG drive execution

    CN121561175A