Movatterモバイル変換


[0]ホーム

URL:


CN117453379A - Scheduling method and system for AOE network computing tasks in Linux system - Google Patents

Scheduling method and system for AOE network computing tasks in Linux system
Download PDF

Info

Publication number
CN117453379A
CN117453379ACN202311787825.8ACN202311787825ACN117453379ACN 117453379 ACN117453379 ACN 117453379ACN 202311787825 ACN202311787825 ACN 202311787825ACN 117453379 ACN117453379 ACN 117453379A
Authority
CN
China
Prior art keywords
nodes
node
scheduling
time
aoe network
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202311787825.8A
Other languages
Chinese (zh)
Other versions
CN117453379B (en
Inventor
谭一鸣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Kirin Software Co Ltd
Original Assignee
Kirin Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Kirin Software Co LtdfiledCriticalKirin Software Co Ltd
Priority to CN202311787825.8ApriorityCriticalpatent/CN117453379B/en
Publication of CN117453379ApublicationCriticalpatent/CN117453379A/en
Application grantedgrantedCritical
Publication of CN117453379BpublicationCriticalpatent/CN117453379B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

The invention discloses a scheduling method and a scheduling system for an AOE network computing task in a Linux system, wherein the method comprises the following steps: acquiring calculation tasks represented by an AOE network, determining the scheduling sequence of nodes in the AOE network according to the degree of node incidence, and dividing the nodes in the AOE network into key nodes and non-key nodes; when the nodes in the AOE network are sequentially scheduled according to the scheduling sequence, the key nodes are respectively scheduled in real time, and the non-key nodes are respectively scheduled in common. The invention creates the key nodes in the AOE network as real-time tasks through real-time scheduling, so that the key nodes have higher priority, and the key nodes can be guaranteed to have the fastest execution time no matter which processor or processing core is scheduled to execute during scheduling, thereby ensuring that the whole AOE network calculation task can be completed to execute in the fastest time.

Description

Translated fromChinese
Linux系统中AOE网计算任务的调度方法及系统Scheduling method and system for AOE network computing tasks in Linux system

技术领域Technical field

本发明涉及任务调度技术,尤其涉及一种Linux系统中AOE网计算任务的调度方法及系统。The invention relates to task scheduling technology, and in particular to a scheduling method and system for AOE network computing tasks in a Linux system.

背景技术Background technique

在图论中,有向无环图 (Directed Acyclic Graph,DAG)表示在一个有向图中,无法从任一顶点出发经过若干条边再回到该点的图。DAG图常常用来对操作系统中计算任务的建模,反映子任务之间先后的调度执行依赖关系。In graph theory, a Directed Acyclic Graph (DAG) represents a directed graph that cannot start from any vertex and return to that point through several edges. DAG diagrams are often used to model computing tasks in operating systems, reflecting the sequential scheduling and execution dependencies between subtasks.

Activity On Edge(AOE)网是一种特殊的DAG图,如图1所示,在AOE网中,节点表示任务,有向边表示任务之间的依赖关系,边上的权值表示前驱任务执行完成到后继任务准备调度执行的时间,简称为节点的执行时间。在任务调度领域,常常用AOE网对计算任务进行建模。通过AOE网的建模,除了可以反映整个计算任务中所有子任务之间的先后依赖关系,同时还可以根据每个子任务的执行时间,预测整个AOE计算任务的执行时间。Activity On Edge (AOE) network is a special DAG graph, as shown in Figure 1. In the AOE network, nodes represent tasks, directed edges represent dependencies between tasks, and the weights on the edges represent the execution of predecessor tasks. The time from completion to when the subsequent task is ready to be scheduled for execution is referred to as the execution time of the node. In the field of task scheduling, AOE networks are often used to model computing tasks. Through the modeling of the AOE network, in addition to reflecting the sequential dependencies between all subtasks in the entire computing task, the execution time of the entire AOE computing task can also be predicted based on the execution time of each subtask.

在AOE网中,节点的入度表示当前有多少边指向它,节点的入度为0表示没有前驱节点指向该点,即该节点不依赖于其它节点,则该节点表示的子任务可立即调度执行。同时入度为0的多个节点之间无依赖关系,可以并行调度执行。同时,在AOE网中,从源点的节点到终点的节点有多条由不同的边组成的路径,由于边的长度(权重)不同,这些路径的长度可能各不相同。如图2所示,其中具有最大路径长度(权重)的路径称为关键路径,关键路径上的节点被称为关键节点。关键路径的长度决定了整个AOE网表示的计算任务的执行时间。In the AOE network, the in-degree of a node indicates how many edges currently point to it. An in-degree of a node of 0 means that there is no predecessor node pointing to that point, that is, the node does not depend on other nodes, and the subtask represented by the node can be scheduled immediately. implement. There is no dependency between multiple nodes with in-degree 0 at the same time, and they can be scheduled and executed in parallel. At the same time, in the AOE network, there are multiple paths composed of different edges from the source node to the destination node. Due to the different lengths (weights) of the edges, the lengths of these paths may be different. As shown in Figure 2, the path with the maximum path length (weight) is called the critical path, and the nodes on the critical path are called critical nodes. The length of the critical path determines the execution time of the computing tasks represented by the entire AOE network.

针对AOE网表示的计算任务,现有的调度算法仅根据子任务之间的依赖关系,确定各节点表示的子任务的调度顺序,但是并没有针对关键路径上的节点表示的子任务进行有针对性的优化,具体是没有区分可以并行调度执行的多个子任务的调度优先级。例如子任务v2和v3可并行执行如果v2和v3在同一处理核上调度执行时,v3可能先于关键任务v2进行调度;如果v2和v3在不同的处理核上调度执行,v2同样可能会被其它任务影响调度的进度。因为在Linux系统中,v2虽然是AOE网中的关键节点任务,但是Linux系统默认是将v2和其它任务一起看成为普通的进程进行统一的调度。For the computing tasks represented by the AOE network, the existing scheduling algorithm only determines the scheduling order of the subtasks represented by each node based on the dependencies between the subtasks, but does not specifically target the subtasks represented by the nodes on the critical path. The specific optimization is that there is no distinction between the scheduling priorities of multiple subtasks that can be scheduled and executed in parallel. For example, subtasks v2 and v3 can be executed in parallel. If v2 and v3 are scheduled for execution on the same processing core, v3 may be scheduled before the key task v2 ; if v2 and v3 are on different processing cores Scheduling execution,v2 may also be affected by other tasks to schedule the progress. Because in the Linux system, although v2 is a key node task in the AOE network, the Linux system defaults to treating v2 and other tasks as ordinary processes for unified scheduling.

发明内容Contents of the invention

本发明要解决的技术问题就在于:由于关键路径上的关键节点是影响整个AOE网计算任务执行时间的关键因素,因此必须针对这些关键节点的调度执行时间进行有针对性的优化,从而保证整个AOE网计算任务的执行时间较短。The technical problem to be solved by this invention is: since the key nodes on the critical path are the key factors that affect the execution time of the entire AOE network computing task, the scheduling execution time of these key nodes must be targeted and optimized to ensure that the entire The execution time of AOE network computing tasks is short.

针对现有技术存在的技术问题,本发明提供一种Linux系统中AOE网计算任务的调度方法及系统,对AOE网中关键节点任务的调度进行优化,可以减少整个AOE网计算任务的完成时间。In view of the technical problems existing in the existing technology, the present invention provides a scheduling method and system for AOE network computing tasks in a Linux system, which optimizes the scheduling of key node tasks in the AOE network and can reduce the completion time of the entire AOE network computing tasks.

为解决上述技术问题,本发明提出的技术方案为:In order to solve the above technical problems, the technical solutions proposed by the present invention are:

一种Linux系统中AOE网计算任务的调度方法,包括以下步骤:A method for scheduling AOE network computing tasks in a Linux system, including the following steps:

S101)获取AOE网表示的计算任务,根据节点的入度确定AOE网中节点的调度顺序,并且对AOE网中节点划分关键节点和非关键节点;S101) Obtain the computing tasks represented by the AOE network, determine the scheduling order of the nodes in the AOE network according to the in-degree of the nodes, and divide the nodes in the AOE network into critical nodes and non-critical nodes;

S102)按照调度顺序对AOE网中节点依次进行调度时,对关键节点分别进行实时调度,对非关键节点分别进行普通调度。S102) When the nodes in the AOE network are scheduled sequentially according to the scheduling order, real-time scheduling is performed on key nodes and ordinary scheduling is performed on non-key nodes.

进一步的,步骤S102具体包括以下步骤:Further, step S102 specifically includes the following steps:

若当前批次待调度节点包括至少两个节点,遍历当前批次待调度节点;If the current batch of nodes to be scheduled includes at least two nodes, traverse the current batch of nodes to be scheduled;

若当前节点为关键节点,使用实时调度器将当前节点调度到对应的处理器或处理核上执行,所述处理器或处理核与关键节点一一对应;If the current node is a key node, use the real-time scheduler to schedule the current node to the corresponding processor or processing core for execution. The processor or processing core corresponds to the key node one-to-one;

若当前节点为非关键节点,使用完全公平调度器将当前节点调度到负载最小的处理器或处理核上执行。If the current node is a non-critical node, use the completely fair scheduler to schedule the current node to the processor or processing core with the smallest load for execution.

进一步的,步骤S102具体包括以下步骤:Further, step S102 specifically includes the following steps:

若当前批次待调度节点包括一个节点,且所述节点为关键节点,使用实时调度器将所述节点调度到负载最小的处理器或处理核上执行;If the current batch of nodes to be scheduled includes one node, and the node is a critical node, use the real-time scheduler to schedule the node to the processor or processing core with the smallest load for execution;

若当前批次待调度节点包括一个节点,且所述节点为非关键节点,使用完全公平调度器将所述节点调度到负载最小的处理器或处理核上执行。If the current batch of nodes to be scheduled includes one node, and the node is a non-critical node, use the completely fair scheduler to schedule the node to the processor or processing core with the smallest load for execution.

可选的,所述实时调度器采用FIFO实时调度算法,所述完全公平调度器采用SCHED_NORMAL调度算法,步骤S102之前还包括:Optionally, the real-time scheduler adopts the FIFO real-time scheduling algorithm, and the completely fair scheduler adopts the SCHED_NORMAL scheduling algorithm. Before step S102, it also includes:

将所有关键节点的调度策略设置为FIFO实时调度算法,并设置所有关键节点的进程优先级为第一值;Set the scheduling strategy of all key nodes to the FIFO real-time scheduling algorithm, and set the process priority of all key nodes to the first value;

将所有非关键节点的调度策略设置为SCHED_NORMAL调度算法,并设置所有非关键节点的进程优先级为第二值。Set the scheduling policy of all non-critical nodes to the SCHED_NORMAL scheduling algorithm, and set the process priority of all non-critical nodes to the second value.

可选的,所述第一值为实时任务的进程优先级范围最大值,所述第二值为普通进程的优先级范围中间值。Optionally, the first value is the maximum value of the process priority range of the real-time task, and the second value is the middle value of the priority range of the ordinary process.

进一步的,步骤S101中,根据节点的入度确定AOE网中节点的调度顺序时,包括:Further, in step S101, when determining the scheduling order of nodes in the AOE network according to the in-degree of the nodes, it includes:

S201)统计AOE网中入度为0的节点,将所统计的节点加入当前批次待调度节点的依赖调度集合;S201) Count the nodes with indegree 0 in the AOE network, and add the counted nodes to the dependent scheduling set of the current batch of nodes to be scheduled;

S202)在AOE网中删除当前批次待调度节点的依赖调度集合中的节点,将下一批次待调度节点的依赖调度集合作为当前批次待调度节点的依赖调度集合,跳转执行步骤S201,直到AOE网中的节点删除完毕。S202) Delete the nodes in the dependent scheduling set of the current batch of nodes to be scheduled in the AOE network, use the dependent scheduling set of the next batch of nodes to be scheduled as the dependent scheduling set of the current batch of nodes to be scheduled, and jump to step S201. , until the nodes in the AOE network are deleted.

进一步的,步骤S101中,对AOE网中节点划分关键节点和非关键节点时,包括:Further, in step S101, dividing the nodes in the AOE network into key nodes and non-key nodes includes:

S301)正序计算每个节点的最早发生时间,然后逆序计算每个节点的最晚发生时间;S301) Calculate the earliest occurrence time of each node in forward order, and then calculate the latest occurrence time of each node in reverse order;

S302)将每条边的前驱节点的最早发生时间作为每条边的最早发生时间,计算每条边后继节点的最晚发生时间与每条边的权值的差,得到每条边的最晚发生时间;S302) Use the earliest occurrence time of the predecessor node of each edge as the earliest occurrence time of each edge, calculate the difference between the latest occurrence time of the successor node of each edge and the weight of each edge, and obtain the latest occurrence time of each edge. Time of occurrence;

S303)将最早发生时间与最晚发生时间相同的边作为关键边,关键边的前驱节点与后继节点作为关键节点,且其余节点作为非关键节点。S303) Use the edge with the same earliest occurrence time and the same latest occurrence time as a critical edge, the predecessor node and successor node of the critical edge as critical nodes, and the remaining nodes as non-critical nodes.

进一步的,正序计算每个节点的最早发生时间时,包括:Further, when calculating the earliest occurrence time of each node in forward sequence, it includes:

将源点的节点的最早发生时间设置为0;Set the earliest occurrence time of the source node to 0;

针对每个节点,分别计算所述节点的所有前驱节点的最早开始时间与对应边的权重的和,并将所有前驱节点的最早开始时间与对应边的权重的和的最大值作为所述节点的最早发生时间。For each node, calculate the sum of the earliest start time of all predecessor nodes and the weight of the corresponding edge of the node, and use the maximum value of the sum of the earliest start time of all predecessor nodes and the weight of the corresponding edge as the node's earliest occurrence time.

进一步的,逆序计算每个节点的最晚发生时间时,包括:Further, when calculating the latest occurrence time of each node in reverse order, it includes:

将终点的节点的最早发生时间作为最晚发生时间;Use the earliest occurrence time of the end point node as the latest occurrence time;

针对每个节点,分别计算所述节点的所有后继节点的最晚开始时间与对应边的权重的差,并将所有后继节点的最晚开始时间与对应边的权重的差的最小值作为所述节点的最晚发生时间。For each node, calculate the difference between the latest start time of all successor nodes of the node and the weight of the corresponding edge, and use the minimum value of the difference between the latest start time of all successor nodes and the weight of the corresponding edge as the The latest occurrence time of the node.

本发明还提出一种Linux系统中AOE网计算任务的调度系统,包括互相连接的微处理器和计算机可读存储介质,所述微处理器被编程或配置以执行任一项所述的Linux系统中AOE网计算任务的调度方法。The present invention also proposes a scheduling system for AOE network computing tasks in a Linux system, which includes an interconnected microprocessor and a computer-readable storage medium. The microprocessor is programmed or configured to execute any one of the Linux systems described in the present invention. Scheduling method of computing tasks in China AOE network.

与现有技术相比,本发明的优点在于:Compared with the prior art, the advantages of the present invention are:

本发明针对AOE网表示的计算任务,根据节点的入度确定AOE网中节点的调度顺序,并且对AOE网中节点划分关键节点和非关键节点,按照调度顺序对AOE网中节点依次进行调度时,对关键节点进行实时调度,对非关键节点进行普通调度。通过实时调度将AOE网中的关键节点创建为实时任务,使其有更高的优先级,在调度时,无论将关键节点调度到哪一个处理器或处理核上执行,都能保证其有最快的执行时间,从而保证整个AOE网计算任务能够在最快的时间内能够完成执行。Aiming at the computing tasks represented by the AOE network, the present invention determines the scheduling order of the nodes in the AOE network according to the in-degree of the nodes, and divides the nodes in the AOE network into key nodes and non-critical nodes, and schedules the nodes in the AOE network sequentially according to the scheduling order. , perform real-time scheduling on key nodes, and perform ordinary scheduling on non-critical nodes. Through real-time scheduling, key nodes in the AOE network are created as real-time tasks, giving them a higher priority. During scheduling, no matter which processor or processing core the key nodes are scheduled to be executed, they can be guaranteed to have the highest priority. Fast execution time, thereby ensuring that the entire AOE network computing task can be completed in the fastest time.

附图说明Description of the drawings

图1为AOE网示意图。Figure 1 is a schematic diagram of the AOE network.

图2为AOE网的关键路径示意图。Figure 2 is a schematic diagram of the critical path of the AOE network.

图3为本发明实施例的流程图。Figure 3 is a flow chart of an embodiment of the present invention.

具体实施方式Detailed ways

以下结合说明书附图和具体优选的实施例对本发明作进一步描述,但并不因此而限制本发明的保护范围。The present invention will be further described below in conjunction with the accompanying drawings and specific preferred embodiments of the specification, but the protection scope of the present invention will not be limited thereby.

AOE网中关键节点的执行时间是影响整个AOE计算任务的关键因素,对关键节点调度执行时间的优化,可提高整个AOE计算任务的完成时间。The execution time of key nodes in the AOE network is a key factor affecting the entire AOE computing task. Optimizing the scheduling execution time of key nodes can improve the completion time of the entire AOE computing task.

在Linux系统中,普通用户进程默认采用的是完全公平调度器CFS(CompletelyFair Scheduler),体现了公平调度原则,采用SCHED_NORMAL调度算法。In the Linux system, ordinary user processes use the Completely Fair Scheduler CFS (CompletelyFair Scheduler) by default, which embodies the principle of fair scheduling and uses the SCHED_NORMAL scheduling algorithm.

同时,Linux系统也提供了实时调度器RT_sched,体现了抢占了机制,主要用于实时任务的调度,有两种调度算法;FIFO和RR,其中,FIFO调度算法思想是:进程按照优先级的顺序进行调度,高优先级任务可以抢占低优先级任务。当一个进程执行时,除非被抢占,否则一致执行,直到它自己被阻塞或者主动放弃 CPU。采用FIFO实时调度算法的计算任务有更高的优先级,可以抢占采用SCHED_NORMAL普通调度算法的计算任务。At the same time, the Linux system also provides a real-time scheduler RT_sched, which embodies the preemption mechanism and is mainly used for real-time task scheduling. There are two scheduling algorithms; FIFO and RR. Among them, the idea of FIFO scheduling algorithm is: processes are in order of priority. Scheduling is performed so that high-priority tasks can preempt low-priority tasks. When a process executes, unless preempted, it executes consistently until it is blocked or actively gives up the CPU. Computing tasks using the FIFO real-time scheduling algorithm have a higher priority and can preempt computing tasks using the SCHED_NORMAL ordinary scheduling algorithm.

因此,本实施例提出一种Linux系统中AOE网计算任务的调度方法,通过将AOE网中关键节点创建为实时任务,使其有更高的优先级,在调度时,无论将关键节点调度到哪一个处理器或处理核上执行,都能保证其有最快的执行时间,从而保证整个AOE网计算任务能够在最快的时间内能够完成执行。如图3所示,包括以下步骤:Therefore, this embodiment proposes a method for scheduling AOE network computing tasks in a Linux system. By creating key nodes in the AOE network as real-time tasks, they have a higher priority. During scheduling, whether the key nodes are scheduled to Whichever processor or processing core is executed is guaranteed to have the fastest execution time, thereby ensuring that the entire AOE network computing task can be completed in the fastest time. As shown in Figure 3, it includes the following steps:

S101)获取AOE网表示的计算任务,根据节点的入度确定AOE网中节点的调度顺序,并且对AOE网中节点划分关键节点和非关键节点;S101) Obtain the computing tasks represented by the AOE network, determine the scheduling order of the nodes in the AOE network according to the in-degree of the nodes, and divide the nodes in the AOE network into critical nodes and non-critical nodes;

S102)按照调度顺序对AOE网中节点依次进行调度时,对关键节点分别进行实时调度,对非关键节点分别进行普通调度。S102) When the nodes in the AOE network are scheduled sequentially according to the scheduling order, real-time scheduling is performed on key nodes and ordinary scheduling is performed on non-key nodes.

下面对于每个步骤进行具体说明。Each step is explained in detail below.

在步骤S101中,AOE网表示的计算任务具体是指针对一个AOE网建模的计算任务,例如Linux系统中,基于systemd机制进行系统引导启动的过程,就可以表示为一个AOE网,通过所有unit定义中的Requires、Wants字段,可得出所有unit之间的依赖关系,同时每个unit的启动时间可通过测量得到,最终可得到一个AOE网,包括AOE网的节点集合V={v1,v2,…,vn};每个节点的入度集合D={d1,d2,…,dn};AOE网的边集合E={e1,e2,…,em},边ek=(vi, vj),其中,vi为边ek的前驱节点,vj为边ek的后继节点;由于前驱节点vi会有多个后继节点vj;每条边的权值集合W={w1,w2,…,wm},其中wk为边ek=(vi, vj)的权值,权值还可以表示为:wk=w(vi,vj)。In step S101, the computing tasks represented by the AOE network specifically refer to the computing tasks modeled for an AOE network. For example, in the Linux system, the system boot process based on the systemd mechanism can be represented as an AOE network, through all units The Requires and Wants fields in the definition can determine the dependencies between all units. At the same time, the startup time of each unit can be measured. Finally, an AOE network can be obtained, including the node set of the AOE network V={v1 , v2 ,…,vn };The in-degree set D of each node={d1 ,d2 ,…,dn };The edge set E of the AOE network={e1 ,e2 ,…,em } , edge ek = (vi , vj ), wherevi is the predecessor node of edge ek , vj is the successor node of edge ek ; since the predecessor nodevi will have multiple successor nodes vj ; each The edge weight set W = {w1 , w2 ,..., wm }, where wk is the weight of edge ek = (vi , vj ). The weight can also be expressed as: wk = w(vi ,vj ).

步骤S101中,根据节点的入度确定AOE网中节点的调度顺序时,根据入度表法BFS,从源点v1开始,逐步统计入度为0的所有节点,所有入度为0的节点组成一个子集合Vdx(后文称为依赖调度集合),且该子集合中节点不存在依赖关系,可并行执行。然后在AOE网中依次删除该子集合Vdx中节点,然后继续统计入度为0的所有节点,形成另一个入度为0的节点子集合Vd(x+1)。可知,后一个入度为0的节点子集合Vd(x+1)依赖于前一个入度为0的节点子集合Vdx。最终,可得到AOE网中所有子任务的执行的过程,包括以下步骤:In step S101, when determining the scheduling order of nodes in the AOE network based on the in-degree of the nodes, according to the in-degree table method BFS, starting from the source point v1 , gradually count all nodes with an in-degree of 0, and all nodes with an in-degree of 0. A sub-set Vdx (hereinafter referred to as the dependent scheduling set) is formed, and the nodes in this sub-set have no dependencies and can be executed in parallel. Then the nodes in the sub-set Vdx are deleted in sequence in the AOE network, and then all nodes with in-degree 0 are continued to be counted to form another node sub-set Vd(x+1) with in-degree 0. It can be seen that the latter node subset Vd(x+1) with in-degree 0 depends on the previous node subset Vdx with in-degree 0. Finally, the execution process of all subtasks in the AOE network can be obtained, including the following steps:

S201)统计AOE网中入度为0的节点,将所统计的节点加入当前批次待调度节点的依赖调度集合;S201) Count the nodes with indegree 0 in the AOE network, and add the counted nodes to the dependent scheduling set of the current batch of nodes to be scheduled;

S202)在AOE网中删除当前批次待调度节点的依赖调度集合中的节点,将下一批次待调度节点的依赖调度集合作为当前批次待调度节点的依赖调度集合,跳转执行步骤S201,直到AOE网中的节点删除完毕。S202) Delete the nodes in the dependent scheduling set of the current batch of nodes to be scheduled in the AOE network, use the dependent scheduling set of the next batch of nodes to be scheduled as the dependent scheduling set of the current batch of nodes to be scheduled, and jump to step S201. , until the nodes in the AOE network are deleted.

根据入度表法(BFS 算法),任务调度时,每次只调度入度为0的子任务,例如图1中所有子任务根据依赖关系的调度步骤为:According to the in-degree table method (BFS algorithm), when scheduling tasks, only sub-tasks with an in-degree of 0 are scheduled each time. For example, the scheduling steps of all sub-tasks based on dependencies in Figure 1 are:

1)AOE网中v1为顶点,入度一开始为0,因此最先调度执行,定义依赖调度集合Vd1={v1};1) In the AOE network, v1 is the vertex, and the in-degree is 0 at the beginning, so it is scheduled to be executed first, and the dependent scheduling set Vd1 = {v1 } is defined;

2)AOE网中删除v1后,v2和v3入度为0,则v2和v3可以调度执行,且可并行执行,因为v2和v3之间不存在先后依赖关系,定义依赖调度集合Vd2={v2,v3};2) After deleting v1 in the AOE network, the in-degree of v2 and v3 is 0, then v2 and v3 can be scheduled and executed in parallel, because there is no sequential dependency between v2 and v3 , defined Dependent scheduling set Vd2 ={v2 , v3 };

3)AOE网中删除v2和v3后,v4和v5入度为0,则v4和v5可以调度执行,且可并行执行,因为v4和v5之间不存在先后依赖关系,定义依赖调度集合Vd3={v4,v5};3) After deleting v2 and v3 in the AOE network, the in-degree of v4 and v5 is 0, then v4 and v5 can be scheduled and executed in parallel, because there is no sequential dependence between v4 and v5 Relationship, define dependent scheduling set Vd3 ={v4 , v5 };

4)AOE网中删除v4和v5后,v6和v7入度为0,则v6和v7可以调度执行,且可并行执行,因为v6和v7之间不存在先后依赖关系,定义依赖调度集合Vd4={v6,v7};4) After deleting v4 and v5 in the AOE network, the in-degree of v6 and v7 is 0, then v6 and v7 can be scheduled and executed in parallel, because there is no sequential dependence between v6 and v7 Relationship, define dependent scheduling set Vd4 ={v6 , v7 };

5)AOE网中删除v6和v7后,v8入度为0,则v8可以调度执行,定义依赖调度集合Vd5={v8}。5) After deleting v6 and v7 in the AOE network, the in-degree of v8 is 0, then v8 can be scheduled for execution, and the dependent scheduling set Vd5 = {v8 } is defined.

最终,图2中每步统计的依赖调度集合如下:Finally, the dependent scheduling set counted at each step in Figure 2 is as follows:

①Vd1={v1}①Vd1 ={v1 }

②Vd2={v2,v3}②Vd2 ={v2 ,v3 }

③Vd3={v4,v5}③Vd3 ={v4 ,v5 }

④Vd4={v6,v7}④Vd4 ={v6 ,v7 }

⑤Vd5={v8}⑤Vd5 ={v8 }

步骤S101中,对AOE网中节点划分关键节点和非关键节点时,使用关键路径法。通过关键路径算法可计算出AOE网中的关键路径和关键节点。In step S101, when dividing the nodes in the AOE network into critical nodes and non-critical nodes, the critical path method is used. The critical path and critical nodes in the AOE network can be calculated through the critical path algorithm.

首先定义:First define:

1)ve(i)表示:节点i的最早发生时间;1) ve(i) represents: the earliest occurrence time of node i;

2)vl(i)表示:节点i的最迟发生时间;2) vl(i) represents: the latest occurrence time of node i;

3)e(j)表示:边ej的最早开始时间;3) e(j) represents: the earliest starting time of edge ej ;

4)l(j)表示:边ej的最迟开始时间。4) l(j) represents: the latest starting time of edge ej .

关键路径计算步骤为:The critical path calculation steps are:

1)从源点出发,令ve(源点) = 0,按拓扑排序的正序求其余点的最早发生时间ve(i)。1) Starting from the source point, let ve(source point) = 0, and find the earliest occurrence time ve(i) of the remaining points in the positive order of topological sorting.

2)从终点出发,令vl(终点)=ve(终点),按拓扑排序的逆序求其余点的最迟发生时间vl(i)。2) Starting from the end point, let vl (end point) = ve (end point), and find the latest occurrence time vl (i) of the remaining points in the reverse order of topological sorting.

3)根据各顶点的ve(i)值求所有边的最早开始时间e(j)。3) Find the earliest starting time e(j) of all edges based on the ve(i) value of each vertex.

4)根据各顶点的vl(i)值求所有边的最迟开始时间l(j)。4) Find the latest start time l(j) of all edges based on the vl(i) value of each vertex.

5)选择最早开始时间e(j)和最迟开始时间l(j)相等的边,如果e(j)= l(j),表示边ej为关键边,边上的点为关键节点,所有关键边组成关键路径。5) Select the edge whose earliest start time e(j) and latest start time l(j) are equal. If e(j)= l(j), it means that edge ej is a key edge and the point on the edge is a key node. All critical edges form the critical path.

因此,本实施例中对AOE网中节点划分关键节点和非关键节点时,包括以下步骤:Therefore, in this embodiment, when dividing the nodes in the AOE network into key nodes and non-key nodes, the following steps are included:

S301)正序计算每个节点的最早发生时间ve(i),然后逆序计算每个节点的最晚发生时间vl(i);S301) Calculate the earliest occurrence time ve(i) of each node in forward sequence, and then calculate the latest occurrence time vl(i) of each node in reverse sequence;

正序计算每个节点的最早发生时间时,包括:When calculating the earliest occurrence time of each node in forward order, it includes:

将源点的节点的最早发生时间设置为0,ve(源点) = 0,即ve(1) = 0;Set the earliest occurrence time of the node of the source point to 0, ve(source point) = 0, that is, ve(1) = 0;

针对每个节点,分别计算所述节点的所有前驱节点的最早开始时间与对应边的权重的和,并将所有前驱节点的最早开始时间与对应边的权重的和的最大值作为所述节点的最早发生时间。以图2为例,所有节点最早发生时间如下表所示:For each node, calculate the sum of the earliest start time of all predecessor nodes and the weight of the corresponding edge of the node, and use the maximum value of the sum of the earliest start time of all predecessor nodes and the weight of the corresponding edge as the node's earliest occurrence time. Taking Figure 2 as an example, the earliest occurrence time of all nodes is as shown in the following table:

表1 节点最早发生时间表Table 1 The earliest node occurrence timetable

逆序计算每个节点的最晚发生时间时,包括:When calculating the latest occurrence time of each node in reverse order, include:

将终点的节点的最早发生时间作为最晚发生时间;Use the earliest occurrence time of the end point node as the latest occurrence time;

针对每个节点,分别计算所述节点的所有后继节点的最晚开始时间与对应边的权重的差,并将所有后继节点的最晚开始时间与对应边的权重的差的最小值作为所述节点的最晚发生时间。以图2为例,vl(8) = ve(8)=14,节点最晚发生时间表如下表所示:For each node, calculate the difference between the latest start time of all successor nodes of the node and the weight of the corresponding edge, and use the minimum value of the difference between the latest start time of all successor nodes and the weight of the corresponding edge as the The latest occurrence time of the node. Taking Figure 2 as an example, vl(8) = ve(8)=14, the latest node occurrence schedule is as shown in the following table:

表2 节点最晚发生时间表Table 2 Latest occurrence schedule of nodes

S302)将每条边的前驱节点的最早发生时间作为每条边的最早发生时间e(j),计算每条边后继节点的最晚发生时间与每条边的权值的差,得到每条边的最晚发生时间l(j);S302) Use the earliest occurrence time of the predecessor node of each edge as the earliest occurrence time e(j) of each edge, calculate the difference between the latest occurrence time of the successor node of each edge and the weight of each edge, and obtain each The latest occurrence time of the edge l(j);

假设边ej=(vt,vw),则边ej前驱节点为vt,后继结点为vw,边ej的最早开始时间e(j)等于前驱节点vt的最早发生时间,即e(j)=ve(t)。最终形成所有边最早发生时间表,以图2为例,所有边最早发生时间表如下表所示:Assume edge ej =(vt ,vw ), then the predecessor node of edge ej is vt and the successor node is vw . The earliest start time e(j) of edge ej is equal to the earliest occurrence time of predecessor node vt , that is, e(j)=ve(t). Finally, the earliest occurrence timetable of all edges is formed. Taking Figure 2 as an example, the earliest occurrence timetable of all edges is as shown in the following table:

表3边最早发生时间表Table 3 edge earliest occurrence timetable

同样假设边ej=(vt,vw),前驱节点为vt,后继结点为vw,边ej的最晚发生时间l(j)等于后继结点vw的最晚发生时间与边ej权值wj的差,即l(j)=vl(w)-wj。最终形成所有边最晚发生时间表,以图2为例,所有边最早发生时间表如下表所示:Also assume that edge ej =(vt ,vw ), the predecessor node is vt , the successor node is vw , the latest occurrence time l(j) of edge ej is equal to the latest occurrence time of successor node vw The difference from the edge ej weight wj , that is, l(j)=vl(w)-wj . Finally, the latest occurrence timetable of all edges is formed. Taking Figure 2 as an example, the earliest occurrence timetable of all edges is as shown in the following table:

表4边最晚发生时间表Table 4 edge latest occurrence timetable

S303)将最早发生时间与最晚发生时间相同的边作为关键边,关键边的前驱节点与后继节点作为关键节点并加入关键节点集合Vcp,且其余节点作为非关键节点并加入非关键节点集合VncpS303) Use the edge with the same earliest occurrence time and the latest occurrence time as a key edge, the predecessor node and successor node of the key edge as key nodes and added to the key node set Vcp , and the remaining nodes as non-key nodes and added to the non-key node setVncp .

具体的,以图2为例,根据表3和表4,比较所有边的最早开始时间e(j)和最迟开始时间l(j)的值,如下表所示:Specifically, taking Figure 2 as an example, according to Table 3 and Table 4, compare the values of the earliest start time e(j) and the latest start time l(j) of all edges, as shown in the following table:

表5 关键路径计算表Table 5 Critical path calculation table

表5中,e(j)-l(j)等于0的边构成关键边,所有关键边构成关键路径,根据表5和图3可知,关键路径为:(e1,e5,e11),其中,边e1=(v1, v2),e5=(v2, v6),e11=(v6, v8);关键节点为:{v1,v2,v6,v8},且整个关键路径的长度为边e1,e5,e11各自权值的和,即w1+w5+w11=14。In Table 5, the edge with e(j)-l(j) equal to 0 constitutes the critical edge, and all critical edges constitute the critical path. According to Table 5 and Figure 3, the critical path is: (e1 , e5 , e11 ) , among them, edges e1 =(v1 , v2 ), e5 =(v2 , v6 ), e11 =(v6 , v8 ); the key nodes are: {v1 , v2 , v6 , v8 }, and the length of the entire critical path is the sum of the respective weights of edges e1 , e5 , and e11 , that is, w1 +w5 +w11 =14.

本实施中,在任务调度时,对关键节点集合和非关键节点集合中子任务采用不同的调度算法进行调度。对于非关键节点任务采用SCHED_NORMAL调度算法,针对关键节点任务,则采用FIFO实时调度算法。因此,在步骤S102之前,还包括以下步骤:In this implementation, during task scheduling, different scheduling algorithms are used to schedule subtasks in critical node sets and non-critical node sets. For non-critical node tasks, the SCHED_NORMAL scheduling algorithm is used, and for critical node tasks, the FIFO real-time scheduling algorithm is used. Therefore, before step S102, the following steps are also included:

将关键节点集合Vcp中所有关键节点的调度策略设置为FIFO实时调度算法,并设置所有关键节点的进程优先级为第一值;Set the scheduling strategy of all key nodes in the key node set Vcp to the FIFO real-time scheduling algorithm, and set the process priority of all key nodes to the first value;

将非关键节点集合Vncp中所有非关键节点的调度策略设置为SCHED_NORMAL调度算法,并设置所有非关键节点的进程优先级为第二值。Set the scheduling policy of all non-critical nodes in the non-critical node set Vncp to the SCHED_NORMAL scheduling algorithm, and set the process priority of all non-critical nodes to the second value.

本实施例中,所述第一值为实时任务的进程优先级范围最大值,所述第二值为普通进程的优先级范围中间值,具体的,实时任务的进程优先级范围是 0 ~ 99,且设置的值越大优先级越高,第一值设置为99,优先级的值可根据需要进行调整,同时,Linux中,普通进程的优先级的范围是100 ~ 139,且设置的值越小优先级越高,第二值设置为120,优先级的值可根据需要进行调整。In this embodiment, the first value is the maximum value of the process priority range of the real-time task, and the second value is the intermediate value of the priority range of the ordinary process. Specifically, the process priority range of the real-time task is 0 ~ 99. , and the larger the value set, the higher the priority. The first value is set to 99. The priority value can be adjusted as needed. At the same time, in Linux, the priority range of ordinary processes is 100 ~ 139, and the set value The smaller the value, the higher the priority. The second value is set to 120. The priority value can be adjusted as needed.

本实施例中,步骤S102具体包括以下步骤:In this embodiment, step S102 specifically includes the following steps:

若当前批次待调度节点包括至少两个节点,则多个节点的表示的子任务不存在依赖关系,可以并行执行,遍历当前批次待调度节点;If the current batch of nodes to be scheduled includes at least two nodes, the subtasks represented by multiple nodes have no dependencies and can be executed in parallel to traverse the current batch of nodes to be scheduled;

若当前节点为关键节点,使用实时调度器将当前节点调度到对应的处理器或处理核上执行,根据前文内容,本实施例中,实时调度器采用FIFO实时调度算法,所述处理器或处理核与关键节点一一对应,避免多个关键任务之间发生计算资源的抢占;If the current node is a key node, use the real-time scheduler to schedule the current node to the corresponding processor or processing core for execution. According to the previous content, in this embodiment, the real-time scheduler uses the FIFO real-time scheduling algorithm. The processor or processing There is a one-to-one correspondence between cores and key nodes to avoid preemption of computing resources between multiple key tasks;

若当前节点为非关键节点,使用完全公平调度器将当前节点调度到负载最小的处理器或处理核上执行,根据前文内容,本实施例中,完全公平调度器采用SCHED_NORMAL调度算法;If the current node is a non-critical node, use the completely fair scheduler to schedule the current node to the processor or processing core with the smallest load for execution. According to the previous content, in this embodiment, the completely fair scheduler uses the SCHED_NORMAL scheduling algorithm;

若当前批次待调度节点仅包括一个节点,无论该节点是关键节点还是非关键节点,都将其调度到负载最小的处理器或处理核上,具体的所述节点为关键节点时,使用实时调度器将所述节点调度到负载最小的处理器或处理核上执行;所述节点为非关键节点时,使用完全公平调度器将所述节点调度到负载最小的处理器或处理核上执行。If the current batch of nodes to be scheduled only includes one node, whether the node is a critical node or a non-critical node, it will be scheduled to the processor or processing core with the smallest load. When the specific node is a critical node, use real-time The scheduler schedules the node to the processor or processing core with the smallest load for execution; when the node is a non-critical node, a completely fair scheduler is used to schedule the node to the processor or processing core with the smallest load for execution.

以图2为例,图2中任务集合V={v1,v2,v3,v4,v5,v6,v7,v8}按照如下顺序调度执行:Take Figure 2 as an example. In Figure 2, the task set V={v1 , v2 , v3 , v4 , v5 , v6 , v7 , v8 } is scheduled and executed in the following order:

1)先调度子任务集合Vd1={v1},v1为关键节点,实时调度器采用FIFO实时调度算法将节点v1调度到对应的处理器1或处理核1上执行;1) First schedule the subtask set Vd1 = {v1 }, v1 is the key node, and the real-time scheduler uses the FIFO real-time scheduling algorithm to schedule node v1 to the corresponding processor 1 or processing core 1 for execution;

2)再调度子任务集合Vd2={v2,v3},v2为关键节点,且{v2,v3}可并行调度,实时调度器采用FIFO实时调度算法将节点v2调度到对应的处理器2或处理核2上执行,同时完全公平调度器采用SCHED_NORMAL调度算法将节点v3调度到负载最小的处理器或处理核上执行;2) Rescheduling subtask set Vd2 = {v2 , v3 }, v2 is a key node, and {v2 , v3 } can be scheduled in parallel. The real-time scheduler uses the FIFO real-time scheduling algorithm to schedule node v2 to Execute on the corresponding processor 2 or processing core 2, and at the same time, the completely fair scheduler uses the SCHED_NORMAL scheduling algorithm to schedule node v3 to the processor or processing core with the smallest load for execution;

3)再调度子任务集合Vd3={v4,v5},{v4,v5}可并行调度,完全公平调度器采用SCHED_NORMAL调度算法将节点v4和v5同时调度到负载最小的处理器或处理核上执行;3) The rescheduling subtask set Vd3 = {v4 , v5 }, {v4 , v5 } can be scheduled in parallel. The completely fair scheduler uses the SCHED_NORMAL scheduling algorithm to simultaneously schedule nodes v4 and v5 to the node with the smallest load. Executed on a processor or processing core;

4)再调度子任务集合Vd4={v6,v7},v6为关键节点,且{v6,v7}可并行调度,实时调度器采用FIFO实时调度算法将节点v6调度到对应的处理器3或处理核3上执行,同时完全公平调度器采用SCHED_NORMAL调度算法将节点v7调度到负载最小的处理器或处理核上执行;4) Reschedule the subtask set Vd4 = {v6 , v7 }, v6 is a key node, and {v6 , v7 } can be scheduled in parallel. The real-time scheduler uses the FIFO real-time scheduling algorithm to schedule node v6 to Execute on the corresponding processor 3 or processing core 3, and at the same time, the completely fair scheduler uses the SCHED_NORMAL scheduling algorithm to schedule node v7 to the processor or processing core with the smallest load for execution;

5)再调度子任务集合Vd5={v8},v8为关键节点,实时调度器采用FIFO实时调度算法将节点v8调度到对应的处理器4或处理核4上执行5) Reschedule the subtask set Vd5 = {v8 }, v8 is a key node, and the real-time scheduler uses the FIFO real-time scheduling algorithm to schedule node v8 to the corresponding processor 4 or processing core 4 for execution.

基于前述内容,本实施例提出的Linux系统中AOE网计算任务的调度方法的主要伪代码描述如下:Based on the foregoing content, the main pseudo-code description of the scheduling method for AOE network computing tasks in the Linux system proposed in this embodiment is as follows:

本实施例还提出一种Linux系统中AOE网计算任务的调度系统,包括互相连接的微处理器和计算机可读存储介质,所述微处理器被编程或配置以执行本实施例所述的Linux系统中AOE网计算任务的调度方法。This embodiment also proposes a scheduling system for AOE network computing tasks in a Linux system, including an interconnected microprocessor and a computer-readable storage medium. The microprocessor is programmed or configured to execute the Linux described in this embodiment. Scheduling method for AOE network computing tasks in the system.

综上所述,本发明针对针对Linux系统中,基于AOE网建模的计算任务,提出了一种高效的任务调度技术,通过对AOE网中关键路径的识别,将关键路径上的关键任务采用实时调度算法,而其它非关键任务采用普通调度算法,从而使关键任务能够优先得到调度,保证整个AOE网计算任务能够在最短的时间内执行完毕,最终实现高效调度的目的。To sum up, the present invention proposes an efficient task scheduling technology for computing tasks based on AOE network modeling in the Linux system. By identifying the critical path in the AOE network, the key tasks on the critical path are assigned Real-time scheduling algorithm, while other non-critical tasks use ordinary scheduling algorithms, so that key tasks can be scheduled first, ensuring that the entire AOE network computing tasks can be completed in the shortest time, and ultimately achieving the purpose of efficient scheduling.

上述只是本发明的较佳实施例,并非对本发明作任何形式上的限制。虽然本发明已以较佳实施例揭露如上,然而并非用以限定本发明。因此,凡是未脱离本发明技术方案的内容,依据本发明技术实质对以上实施例所做的任何简单修改、等同变化及修饰,均应落在本发明技术方案保护的范围内。The above are only preferred embodiments of the present invention, and do not limit the present invention in any form. Although the present invention has been disclosed above in terms of preferred embodiments, this is not intended to limit the present invention. Therefore, any simple modifications, equivalent changes and modifications made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solution of the present invention shall fall within the protection scope of the technical solution of the present invention.

Claims (10)

Translated fromChinese
1.一种Linux系统中AOE网计算任务的调度方法,其特征在于,包括以下步骤:1. A method for scheduling AOE network computing tasks in a Linux system, which is characterized by including the following steps:S101)获取AOE网表示的计算任务,根据节点的入度确定AOE网中节点的调度顺序,并且对AOE网中节点划分关键节点和非关键节点;S101) Obtain the computing tasks represented by the AOE network, determine the scheduling order of the nodes in the AOE network according to the in-degree of the nodes, and divide the nodes in the AOE network into critical nodes and non-critical nodes;S102)按照调度顺序对AOE网中节点依次进行调度时,对关键节点分别进行实时调度,对非关键节点分别进行普通调度。S102) When the nodes in the AOE network are scheduled sequentially according to the scheduling order, real-time scheduling is performed on key nodes and ordinary scheduling is performed on non-key nodes.2.根据权利要求1所述的Linux系统中AOE网计算任务的调度方法,其特征在于,步骤S102具体包括以下步骤:2. The scheduling method of AOE network computing tasks in the Linux system according to claim 1, characterized in that step S102 specifically includes the following steps:若当前批次待调度节点包括至少两个节点,遍历当前批次待调度节点;If the current batch of nodes to be scheduled includes at least two nodes, traverse the current batch of nodes to be scheduled;若当前节点为关键节点,使用实时调度器将当前节点调度到对应的处理器或处理核上执行,所述处理器或处理核与关键节点一一对应;If the current node is a key node, use the real-time scheduler to schedule the current node to the corresponding processor or processing core for execution. The processor or processing core corresponds to the key node one-to-one;若当前节点为非关键节点,使用完全公平调度器将当前节点调度到负载最小的处理器或处理核上执行。If the current node is a non-critical node, use the completely fair scheduler to schedule the current node to the processor or processing core with the smallest load for execution.3.根据权利要求1所述的Linux系统中AOE网计算任务的调度方法,其特征在于,步骤S102具体包括以下步骤:3. The scheduling method of AOE network computing tasks in the Linux system according to claim 1, characterized in that step S102 specifically includes the following steps:若当前批次待调度节点包括一个节点,且所述节点为关键节点,使用实时调度器将所述节点调度到负载最小的处理器或处理核上执行;If the current batch of nodes to be scheduled includes one node, and the node is a critical node, use the real-time scheduler to schedule the node to the processor or processing core with the smallest load for execution;若当前批次待调度节点包括一个节点,且所述节点为非关键节点,使用完全公平调度器将所述节点调度到负载最小的处理器或处理核上执行。If the current batch of nodes to be scheduled includes one node, and the node is a non-critical node, use the completely fair scheduler to schedule the node to the processor or processing core with the smallest load for execution.4.根据权利要求2或3所述的Linux系统中AOE网计算任务的调度方法,其特征在于,所述实时调度器采用FIFO实时调度算法,所述完全公平调度器采用SCHED_NORMAL调度算法,步骤S102之前还包括:4. The scheduling method of AOE network computing tasks in the Linux system according to claim 2 or 3, characterized in that the real-time scheduler adopts the FIFO real-time scheduling algorithm, and the completely fair scheduler adopts the SCHED_NORMAL scheduling algorithm, step S102 Also previously included:将所有关键节点的调度策略设置为FIFO实时调度算法,并设置所有关键节点的进程优先级为第一值;Set the scheduling strategy of all key nodes to the FIFO real-time scheduling algorithm, and set the process priority of all key nodes to the first value;将所有非关键节点的调度策略设置为SCHED_NORMAL调度算法,并设置所有非关键节点的进程优先级为第二值。Set the scheduling policy of all non-critical nodes to the SCHED_NORMAL scheduling algorithm, and set the process priority of all non-critical nodes to the second value.5.根据权利要求4所述的Linux系统中AOE网计算任务的调度方法,其特征在于,所述第一值为实时任务的进程优先级范围最大值,所述第二值为普通进程的优先级范围中间值。5. The scheduling method of AOE network computing tasks in the Linux system according to claim 4, characterized in that the first value is the maximum value of the process priority range of the real-time task, and the second value is the priority of the ordinary process. The middle value of the grade range.6.根据权利要求1所述的Linux系统中AOE网计算任务的调度方法,其特征在于,步骤S101中,根据节点的入度确定AOE网中节点的调度顺序时,包括:6. The scheduling method of AOE network computing tasks in the Linux system according to claim 1, characterized in that, in step S101, when determining the scheduling order of nodes in the AOE network according to the in-degree of the node, it includes:S201)统计AOE网中入度为0的节点,将所统计的节点加入当前批次待调度节点的依赖调度集合;S201) Count the nodes with indegree 0 in the AOE network, and add the counted nodes to the dependent scheduling set of the current batch of nodes to be scheduled;S202)在AOE网中删除当前批次待调度节点的依赖调度集合中的节点,将下一批次待调度节点的依赖调度集合作为当前批次待调度节点的依赖调度集合,跳转执行步骤S201,直到AOE网中的节点删除完毕。S202) Delete the nodes in the dependent scheduling set of the current batch of nodes to be scheduled in the AOE network, use the dependent scheduling set of the next batch of nodes to be scheduled as the dependent scheduling set of the current batch of nodes to be scheduled, and jump to step S201. , until the nodes in the AOE network are deleted.7.根据权利要求1所述的Linux系统中AOE网计算任务的调度方法,其特征在于,步骤S101中,对AOE网中节点划分关键节点和非关键节点时,包括:7. The scheduling method of AOE network computing tasks in the Linux system according to claim 1, characterized in that, in step S101, when dividing the nodes in the AOE network into critical nodes and non-critical nodes, it includes:S301)正序计算每个节点的最早发生时间,然后逆序计算每个节点的最晚发生时间;S301) Calculate the earliest occurrence time of each node in forward order, and then calculate the latest occurrence time of each node in reverse order;S302)将每条边的前驱节点的最早发生时间作为每条边的最早发生时间,计算每条边后继节点的最晚发生时间与每条边的权值的差,得到每条边的最晚发生时间;S302) Use the earliest occurrence time of the predecessor node of each edge as the earliest occurrence time of each edge, calculate the difference between the latest occurrence time of the successor node of each edge and the weight of each edge, and obtain the latest occurrence time of each edge. Time of occurrence;S303)将最早发生时间与最晚发生时间相同的边作为关键边,关键边的前驱节点与后继节点作为关键节点,且其余节点作为非关键节点。S303) Use the edge with the same earliest occurrence time and the same latest occurrence time as a critical edge, the predecessor node and successor node of the critical edge as critical nodes, and the remaining nodes as non-critical nodes.8.根据权利要求7所述的Linux系统中AOE网计算任务的调度方法,其特征在于,正序计算每个节点的最早发生时间时,包括:8. The scheduling method of AOE network computing tasks in the Linux system according to claim 7, characterized in that when calculating the earliest occurrence time of each node in forward sequence, it includes:将源点的节点的最早发生时间设置为0;Set the earliest occurrence time of the source node to 0;针对每个节点,分别计算所述节点的所有前驱节点的最早开始时间与对应边的权重的和,并将所有前驱节点的最早开始时间与对应边的权重的和的最大值作为所述节点的最早发生时间。For each node, calculate the sum of the earliest start time of all predecessor nodes and the weight of the corresponding edge of the node, and use the maximum value of the sum of the earliest start time of all predecessor nodes and the weight of the corresponding edge as the node's earliest occurrence time.9.根据权利要求8所述的Linux系统中AOE网计算任务的调度方法,其特征在于,逆序计算每个节点的最晚发生时间时,包括:9. The scheduling method of AOE network computing tasks in the Linux system according to claim 8, characterized in that when calculating the latest occurrence time of each node in reverse order, it includes:将终点的节点的最早发生时间作为最晚发生时间;Use the earliest occurrence time of the end point node as the latest occurrence time;针对每个节点,分别计算所述节点的所有后继节点的最晚开始时间与对应边的权重的差,并将所有后继节点的最晚开始时间与对应边的权重的差的最小值作为所述节点的最晚发生时间。For each node, calculate the difference between the latest start time of all successor nodes of the node and the weight of the corresponding edge, and use the minimum value of the difference between the latest start time of all successor nodes and the weight of the corresponding edge as the The latest occurrence time of the node.10.一种Linux系统中AOE网计算任务的调度系统,其特征在于,包括互相连接的微处理器和计算机可读存储介质,所述微处理器被编程或配置以执行权利要求1~9任一项所述的Linux系统中AOE网计算任务的调度方法。10. A scheduling system for AOE network computing tasks in a Linux system, characterized in that it includes a microprocessor and a computer-readable storage medium connected to each other, and the microprocessor is programmed or configured to execute any of claims 1 to 9. A method for scheduling AOE network computing tasks in a Linux system.
CN202311787825.8A2023-12-252023-12-25Scheduling method and system for AOE network computing tasks in Linux systemActiveCN117453379B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202311787825.8ACN117453379B (en)2023-12-252023-12-25Scheduling method and system for AOE network computing tasks in Linux system

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202311787825.8ACN117453379B (en)2023-12-252023-12-25Scheduling method and system for AOE network computing tasks in Linux system

Publications (2)

Publication NumberPublication Date
CN117453379Atrue CN117453379A (en)2024-01-26
CN117453379B CN117453379B (en)2024-04-05

Family

ID=89586001

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202311787825.8AActiveCN117453379B (en)2023-12-252023-12-25Scheduling method and system for AOE network computing tasks in Linux system

Country Status (1)

CountryLink
CN (1)CN117453379B (en)

Citations (15)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN104915251A (en)*2015-06-052015-09-16北京京东尚科信息技术有限公司Task scheduling method and device
CN106293003A (en)*2016-08-052017-01-04广东工业大学A kind of heterogeneous system dynamic power consumption optimization method based on AOV gateway key path query
CN106896895A (en)*2017-01-112017-06-27广东工业大学A kind of heterogeneous system dynamic power consumption optimization method based on AOV gateway key path queries
CN108459966A (en)*2018-03-212018-08-28东软集团股份有限公司Dispatching method, device, equipment and the computer readable storage medium of test suite
CN108958916A (en)*2018-06-292018-12-07杭州电子科技大学Workflow unloads optimization algorithm under a kind of mobile peripheral surroundings
CN109104304A (en)*2018-07-242018-12-28国网山东省电力公司电力科学研究院A kind of distribution real time fail processing method
CN110058932A (en)*2019-04-192019-07-26中国科学院深圳先进技术研究院A kind of storage method and storage system calculated for data flow driven
CN110134506A (en)*2019-05-242019-08-16哈尔滨理工大学 Real-time dynamic critical path multi-core scheduling method based on processor core dynamics
CN111984390A (en)*2020-08-312020-11-24平安医疗健康管理股份有限公司Task scheduling method, device, equipment and storage medium
CN112328380A (en)*2020-11-102021-02-05武汉理工大学 A task scheduling method and device based on heterogeneous computing
CN113708953A (en)*2021-07-102021-11-26西北工业大学Underwater acoustic sensor network anti-damage method based on node importance balance
CN115759605A (en)*2022-11-102023-03-07青岛民航凯亚系统集成有限公司Method for realizing dynamic adjustment of guarantee node based on key path algorithm
CN116670684A (en)*2021-05-142023-08-29支付宝(杭州)信息技术有限公司 Method and system for scheduling tasks
CN116737511A (en)*2023-08-102023-09-12山景智能(北京)科技有限公司Graph-based scheduling job monitoring method and device
US20230333884A1 (en)*2022-04-152023-10-19Dell Products L.P.Method and system for performing domain level scheduling of an application in a distributed multi-tiered computing environment using reinforcement learning

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN104915251A (en)*2015-06-052015-09-16北京京东尚科信息技术有限公司Task scheduling method and device
CN106293003A (en)*2016-08-052017-01-04广东工业大学A kind of heterogeneous system dynamic power consumption optimization method based on AOV gateway key path query
CN106896895A (en)*2017-01-112017-06-27广东工业大学A kind of heterogeneous system dynamic power consumption optimization method based on AOV gateway key path queries
CN108459966A (en)*2018-03-212018-08-28东软集团股份有限公司Dispatching method, device, equipment and the computer readable storage medium of test suite
CN108958916A (en)*2018-06-292018-12-07杭州电子科技大学Workflow unloads optimization algorithm under a kind of mobile peripheral surroundings
CN109104304A (en)*2018-07-242018-12-28国网山东省电力公司电力科学研究院A kind of distribution real time fail processing method
CN110058932A (en)*2019-04-192019-07-26中国科学院深圳先进技术研究院A kind of storage method and storage system calculated for data flow driven
CN110134506A (en)*2019-05-242019-08-16哈尔滨理工大学 Real-time dynamic critical path multi-core scheduling method based on processor core dynamics
CN111984390A (en)*2020-08-312020-11-24平安医疗健康管理股份有限公司Task scheduling method, device, equipment and storage medium
CN112328380A (en)*2020-11-102021-02-05武汉理工大学 A task scheduling method and device based on heterogeneous computing
CN116670684A (en)*2021-05-142023-08-29支付宝(杭州)信息技术有限公司 Method and system for scheduling tasks
CN113708953A (en)*2021-07-102021-11-26西北工业大学Underwater acoustic sensor network anti-damage method based on node importance balance
US20230333884A1 (en)*2022-04-152023-10-19Dell Products L.P.Method and system for performing domain level scheduling of an application in a distributed multi-tiered computing environment using reinforcement learning
CN115759605A (en)*2022-11-102023-03-07青岛民航凯亚系统集成有限公司Method for realizing dynamic adjustment of guarantee node based on key path algorithm
CN116737511A (en)*2023-08-102023-09-12山景智能(北京)科技有限公司Graph-based scheduling job monitoring method and device

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
KANG XINGWU: "Research on Modeling Technology of Virtual Maintenance Process Based on Petri Net and AOE Network", 2013 FOURTH INTERNATIONAL CONFERENCE ON DIGITAL MANUFACTURING AND AUTOMATION, 31 December 2013 (2013-12-31), pages 1090 - 1093*
张亚宁 等: "基于深度学习的 RCPSP 调度优先规则实时动态选择算法", 《系统工程理论与实践》, vol. 43, no. 7, 31 July 2023 (2023-07-31), pages 2142 - 2153*
谭一鸣: "异构重构计算系统应用任务调度的性能分析", 《小型微型计算机系统》, vol. 33, no. 2, 29 February 2012 (2012-02-29), pages 404 - 408*

Also Published As

Publication numberPublication date
CN117453379B (en)2024-04-05

Similar Documents

PublicationPublication DateTitle
CN111506413B (en)Intelligent task scheduling method and system based on business efficiency optimization
US7451447B1 (en)Method, computer program and apparatus for operating system dynamic event management and task scheduling using function calls
CN105005506B (en)Fault-tolerant resource provision method in one kind virtualization cloud
US20160034314A1 (en)Method of computing latest start times to allow real-time process overruns
CN103336714A (en)Operation scheduling method and device
CN104951367B (en)Fault-tolerant method for scheduling task in one kind virtualization cloud
Wang et al.Scheduling online mixed-parallel workflows of rigid tasks in heterogeneous multi-cluster environments
CN111026519A (en)Distributed task priority scheduling method and system and storage medium
CN109582436A (en)Fine granularity preemptive type resource scheduling system and method based on container cluster platform
CN114911591A (en) Task scheduling method and system
CN116755851A (en) Task scheduling method and system based on heterogeneous priorities and key task replication
CN103677959B (en)A kind of virtual machine cluster migration method and system based on multicast
CN107589993A (en)A kind of dynamic priority scheduling algorithm based on linux real time operating systems
CN112817731B (en)Heterogeneous multi-core system task scheduling method based on node replication
CN110321212A (en)Multi-level fusion real-time scheduling method based on earliest Deadline First
CN117453379A (en)Scheduling method and system for AOE network computing tasks in Linux system
CN115766612B (en) A scheduling method based on weight conversion probability and corresponding device
CN118733220A (en) A hybrid real-time task scheduling method, system, storage medium and terminal
Muthukrishnan et al.Online scheduling to minimize average stretch
CN112306653A (en) Workflow energy consumption and reliability scheduling method and device under deadline constraint
CN111736959A (en) Spark task scheduling method considering data affinity under heterogeneous cluster
CN113127205B (en) A workflow scheduling method that satisfies deadline constraints and optimizes costs in the cloud
JP2001022601A (en) Job execution control method and parallel computer system
Friebe et al.Nip it in the Bud: Job Acceptance Multi-Server
CN120123062B (en)Data processing mode based on SQL script

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp