CN104021040A - Cloud computing associated task scheduling method and device based on time constraint - Google Patents
Cloud computing associated task scheduling method and device based on time constraint Download PDFInfo
- Publication number
- CN104021040A CN104021040A CN201410245649.XA CN201410245649A CN104021040A CN 104021040 A CN104021040 A CN 104021040A CN 201410245649 A CN201410245649 A CN 201410245649A CN 104021040 A CN104021040 A CN 104021040A
- Authority
- CN
- China
- Prior art keywords
- task
- tasks
- time
- virtual machine
- unit
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 38
- 238000010276 construction Methods 0.000 claims description 13
- 238000004891 communication Methods 0.000 claims description 12
- 238000012544 monitoring process Methods 0.000 claims description 6
- 230000000052 comparative effect Effects 0.000 claims 1
- 239000012141 concentrate Substances 0.000 claims 1
- 230000001934 delay Effects 0.000 abstract description 2
- 238000010586 diagram Methods 0.000 description 11
- 230000005540 biological transmission Effects 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 3
- 230000003111 delayed effect Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000008030 elimination Effects 0.000 description 1
- 238000003379 elimination reaction Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
Landscapes
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
本发明公开了一种基于时间约束条件下的云计算关联任务调度方法和装置,所述方法包括以下步骤,首先,使用构建DAG图的方法来表示关联任务组中任务之间的关联关系;然后,采用将DAG图分层的思想,将处于同一层中的非关联任务划分进同一任务集合;接着,将硬件资源虚拟化,建立虚拟机集群以提供任务执行的场所;最后,采用基于时间约束的分层调度方法,将每一层任务集合中的任务调度至最合适的虚拟机中执行,以保证任务按时完成。本发明采用的技术方案有效解决了现有技术中云计算关联任务在调度过程中出现执行延迟的问题,能够最大化的减少任务的延迟情况发生,保证任务在用户期望的时间内完成,同时实现了虚拟机资源的有效利用。
The present invention discloses a cloud computing associated task scheduling method and device based on time constraints. The method includes the following steps. First, the method of constructing a DAG graph is used to represent the associated relationship between tasks in the associated task group; and then , using the idea of layering the DAG graph, dividing non-associated tasks in the same layer into the same task set; then, virtualizing hardware resources, establishing a virtual machine cluster to provide a place for task execution; finally, using time constraints The hierarchical scheduling method schedules the tasks in the task set of each layer to the most suitable virtual machine for execution to ensure that the tasks are completed on time. The technical solution adopted by the present invention effectively solves the problem of execution delay in the scheduling process of cloud computing-related tasks in the prior art, can minimize the occurrence of task delays, and ensure that tasks are completed within the time expected by the user. Effective utilization of virtual machine resources.
Description
技术领域technical field
本发明涉及一种云计算关联任务调度方法和装置,具体涉及一种基于时间约束条件下的云计算关联任务调度方法和装置。The present invention relates to a method and device for scheduling associated tasks of cloud computing, in particular to a method and device for scheduling associated tasks of cloud computing based on time constraints.
背景技术Background technique
云计算技术是当前国内外计算机技术研究的重点和前沿领域,云计算将动态可伸缩的虚拟化资源以服务的方式提供给用户,能够有效地降低用户硬件开销,并以较低的成本获取高质量的服务。Cloud computing technology is the focus and frontier field of computer technology research at home and abroad. Cloud computing provides dynamically scalable virtual resources to users in the form of services, which can effectively reduce user hardware expenses and obtain high-quality resources at a low cost. quality of service.
虚拟化技术的发展为云计算提供了很好的解决方案,通过将硬件资源虚拟化,形成多个独立的虚拟机集群,用户通过申请的方式使用虚拟机,能有效的节省硬件资源的开销,提高资源的有效利用并且节省了管理的成本。云计算任务调度的主要作用就是将用户提交的任务申请通过一定的方法分配给虚拟机,由虚拟机完成用户提交的任务。The development of virtualization technology provides a good solution for cloud computing. By virtualizing hardware resources, multiple independent virtual machine clusters are formed. Users can use virtual machines by applying, which can effectively save the cost of hardware resources. Improve the effective utilization of resources and save management costs. The main function of cloud computing task scheduling is to assign the task application submitted by the user to the virtual machine through a certain method, and the virtual machine completes the task submitted by the user.
在用户提交的任务中,有些任务并非是单个的独立任务,而是具有执行次序先后关系的关联任务,这些关联任务在进行任务调度的过程中不能同时被分配至虚拟机,需要等待自己的前驱任务完成后才能被调度,在这种关联任务调度的过程中,一旦某个任务的执行出现延迟,就会影响后继任务的执行,从而影响整个关联任务组的完成时间。目前现有的关联任务调度方法大多只是从减少任务之间的通信成本考虑问题,而对于出现任务延迟的情况并没有太多的解决方案。Among the tasks submitted by the user, some tasks are not single independent tasks, but associated tasks with a sequence of execution. These associated tasks cannot be assigned to the virtual machine at the same time during the task scheduling process, and need to wait for their predecessors. Tasks can only be scheduled after they are completed. In the process of scheduling associated tasks, once the execution of a certain task is delayed, it will affect the execution of subsequent tasks, thereby affecting the completion time of the entire associated task group. At present, most of the existing associated task scheduling methods only consider the problem of reducing the communication cost between tasks, but there are not many solutions for the situation of task delay.
当用户提交了一组关联任务时,如何最大化的减少任务的延迟情况发生保证任务能够在用户期望的时间内完成,寻找更多的并行任务调度至合适的虚拟机以达到资源的有效利用成为本发明所要解决的首要问题。When the user submits a group of related tasks, how to minimize the delay of the task and ensure that the task can be completed within the time expected by the user, and find more parallel tasks to be scheduled to the appropriate virtual machine to achieve the effective use of resources becomes The primary problem to be solved by the present invention.
发明内容Contents of the invention
发明目的:本发明的目的是为了解决关联任务在调度过程中出现任务延迟的情况下,在任务调度过程中,由于各个任务是在执行次序上相互关联的,即所有的任务都有前驱或者后继任务,当某个任务在执行过程中出现延迟时,后继任务的执行必定受到影响。如何最大化消除这种影响并使虚拟机资源得到有效利用是本发明所要解决的重要问题。Purpose of the invention: The purpose of the present invention is to solve the problem of task delay in the scheduling process of related tasks. In the task scheduling process, since each task is related to each other in the order of execution, that is, all tasks have predecessors or successors. Tasks, when a task is delayed during execution, the execution of subsequent tasks must be affected. How to maximize the elimination of this impact and make effective use of virtual machine resources is an important problem to be solved by the present invention.
技术方案:一种基于时间约束条件下的云计算关联任务调度方法,包括以下步骤:Technical solution: a method for scheduling associated tasks in cloud computing based on time constraints, including the following steps:
(1)将关联任务组中的所有任务按照其执行的先后次序建立DAG图(无回路有向图);(1) Establish a DAG graph (directed graph without loops) for all tasks in the associated task group according to the order in which they are executed;
(2)根据所述步骤(1)中构建完成的DAG图将所有任务按层次划分为不同的任务集,为每层任务集限定时间约束;(2) divide all tasks into different task sets according to the DAG diagram constructed in the step (1), and limit the time constraints for each layer of task sets;
(3)将硬件资源虚拟化,构建虚拟机集群;(3) Virtualize hardware resources and build virtual machine clusters;
(4)根据每层任务集的时间约束情况将任务调度至虚拟机集群中相应的虚拟机。(4) Scheduling tasks to corresponding virtual machines in the virtual machine cluster according to the time constraints of each layer of task sets.
在本发明所述的关联任务中,任务之间的关联性体现在任务的执行次序上,即各个任务都有其前驱或者后继任务,只有当每个任务的直接前驱任务完成时,其后继任务才能开始执行。所述步骤(1)中建立DAG图的具体过程为:In the associated tasks described in the present invention, the relevance between tasks is reflected in the execution order of the tasks, that is, each task has its predecessor or successor task, and only when the direct predecessor task of each task is completed, its successor task to start executing. The specific process of establishing DAG graph in described step (1) is:
(1.1)定义G={T,Λ,C}为描述关联任务组的三元组,其中,T为关联任务图中所有的任务集合,Λ为任务之间的执行次序的集合,C为任务之间通信开销的集合(每个任务在执行之前所需的数据是已知的,通信开销指任务之间的数据传输量与系统网络带宽的比值),当两个具有直接关联关系的任务被分配至同一虚拟机上执行时,任务之间不需要进行数据传输,因此其通信开销为0,当两个具有直接关联关系的任务被分配至不同的虚拟机执行时其通信开销可由下式计算:(1.1) Define G={T,Λ,C} as a triplet describing the associated task group, where T is the set of all tasks in the associated task graph, Λ is the set of execution order between tasks, and C is the task A collection of communication overheads between tasks (the data required for each task before execution is known, and the communication overhead refers to the ratio of the amount of data transmission between tasks to the system network bandwidth), when two tasks with a direct relationship are connected When assigned to execute on the same virtual machine, there is no need for data transmission between tasks, so the communication overhead is 0. When two directly related tasks are assigned to different virtual machines for execution, the communication overhead can be calculated by the following formula :
其中data_transmission表示任务之间的数据传输量,BW指系统网络带宽。Among them, data_transmission indicates the amount of data transmission between tasks, and BW refers to the system network bandwidth.
(1.2)根据集合Λ中任务之间的执行次序得出关联任务组的DAG图。(1.2) Obtain the DAG diagram of the associated task group according to the execution order of the tasks in the set Λ.
所述步骤(2)中关联任务组按层次划分主要是采用将DAG图分层的思想,将处在同一层的任务划分至不同的任务集,同一层次的不同任务集被认为是非关联的,可以被同时调度至虚拟机中执行。任务集划分的具体过程为:The hierarchical division of associated task groups in the step (2) mainly adopts the idea of layering the DAG graph, and divides the tasks at the same layer into different task sets. Different task sets at the same level are considered non-associated. It can be scheduled to be executed in the virtual machine at the same time. The specific process of task set division is as follows:
(2.1)按照从入口任务至出口任务的顺序将所述DAG图分层;(2.1) layering the DAG graph according to the order from the entry task to the exit task;
(2.2)将所述DAG图中的任务按照其对应的层次划分至相应层的任务集合中;(2.2) Divide tasks in the DAG diagram into task sets of corresponding layers according to their corresponding levels;
(2.3)将用户期望的关联任务组完成时间作为关联任务调度的总的时间约束,根据每层任务集中任务数占总任务数的比例计算出每层任务集合的时间约束。(2.3) Take the completion time of the associated task group expected by the user as the total time constraint of associated task scheduling, and calculate the time constraint of each layer task set according to the ratio of the number of tasks in each layer task set to the total number of tasks.
所述步骤(3)中虚拟机集群的构建主要是在多台物理服务器上部署多个虚拟机构成虚拟机集群。虚拟机中集成了完成任务所需的操作系统,应用软件和数据,采用硬件虚拟化方法能够有效地提高物理资源利用率,虚拟机集群构建的具体步骤如下:The construction of the virtual machine cluster in the step (3) is mainly to deploy multiple virtual machines on multiple physical servers to form a virtual machine cluster. The virtual machine integrates the operating system, application software and data required to complete the task, and the hardware virtualization method can effectively improve the utilization of physical resources. The specific steps of virtual machine cluster construction are as follows:
(3.1)将物理资源(内存资源,网络资源,存储资源,CPU资源)虚拟化并构建多台虚拟机;(3.1) Virtualize physical resources (memory resources, network resources, storage resources, CPU resources) and build multiple virtual machines;
(3.2)在虚拟机中部署用户任务执行所需要的操作系统、应用程序以及任务执行所需的数据;(3.2) Deploy the operating system, applications and data required for user task execution in the virtual machine;
(3.3)将构建好的虚拟机加入虚拟机集群中等待任务被调度执行。(3.3) Add the constructed virtual machine to the virtual machine cluster and wait for the task to be scheduled for execution.
所述步骤(4)中的任务调度是基于时间约束条件下的,即用户对一组关联任务的完成有时间约束,所有的任务必须尽可能保证被调度至合适的虚拟机上执行并且任务能够按时完成。任务调度的具体流程为:The task scheduling in the step (4) is based on time constraints, that is, the user has time constraints on the completion of a group of associated tasks, and all tasks must be scheduled to be executed on a suitable virtual machine as much as possible and the tasks can Finished on time. The specific process of task scheduling is as follows:
(4.1)根据所述步骤(2)中已划分好任务集的关联任务组按层次接收一层任务集,将任务集中的任务分配至虚拟机集群中不同的空闲虚拟机,转至步骤(4.2);(4.1) According to the associated task group that has divided the task set in the step (2), receive a layer of task sets hierarchically, assign the tasks in the task set to different idle virtual machines in the virtual machine cluster, and go to step (4.2 );
(4.2)判断所接收任务集中的任务是否全部执行完毕,若没有完成则继续等待任务执行完毕,否则转至步骤(4.3);(4.2) Judging whether all the tasks in the received task set have been executed, if not, continue to wait for the tasks to be executed, otherwise go to step (4.3);
(4.3)计算所接收任务集中的所有任务的总完成时间,判断是否小于该层任务的约束时间,若实际的完成时间小于约束时间,则转至步骤(4.1),否则转至步骤(4.4);(4.3) Calculate the total completion time of all tasks in the received task set, and judge whether it is less than the constraint time of the task at this layer. If the actual completion time is less than the constraint time, go to step (4.1), otherwise go to step (4.4) ;
(4.4)将下一层任务集中的任务分配至与其前驱任务相同的虚拟机中,转至步骤(4.2)。(4.4) Assign the tasks in the task set of the next layer to the same virtual machine as its predecessor tasks, and go to step (4.2).
在任务调度的过程中,处在每一层任务集的任务能够被同时调度到虚拟机,每个任务尽可能被分配至不同的虚拟机执行,虽然以牺牲任务的通信开销为代价,但可以有效的避免多个任务被分配至相同的虚拟机造成任务等待的效果。在每一层的任务完成以后如果该层任务完成的总时间大于任务的约束时间,则在调度下一层任务时,将该层任务集合中的任务分配至与其直接前驱任务相同虚拟机中,这样做能有效的避免由于前驱与后继任务因分配至不同的虚拟机而产生的任务之间的通信时间。通过该种方法以弥补前一层任务产生的延迟。In the process of task scheduling, the tasks in the task set of each layer can be scheduled to the virtual machine at the same time, and each task is assigned to a different virtual machine for execution as much as possible. Although at the expense of the communication overhead of the task, it can Effectively avoid the effect of task waiting caused by multiple tasks being assigned to the same virtual machine. After the task of each layer is completed, if the total time of the task of this layer is greater than the constraint time of the task, when scheduling the task of the next layer, assign the tasks in the task set of this layer to the same virtual machine as its direct predecessor task, This can effectively avoid the communication time between tasks caused by the assignment of the predecessor and successor tasks to different virtual machines. This method is used to make up for the delay caused by the previous layer of tasks.
一种基于时间约束条件下的云计算关联任务调度装置,包括:任务图构建单元、任务分层单元、虚拟机管理单元和任务调度单元;A cloud computing associated task scheduling device based on time constraints, comprising: a task graph construction unit, a task layering unit, a virtual machine management unit and a task scheduling unit;
其中任务图构建单元用于接收关联任务组,并将所有任务按照任务执行的先后次序建立DAG图;The task graph construction unit is used to receive associated task groups, and build a DAG graph for all tasks according to the sequence of task execution;
任务分层单元与任务图构建单元相连,包括任务集划分单元和时间约束计算单元,所述任务集划分单元用于根据任务构建单元构建完成的DAG图将任务按照层次划分为不同的任务集,所述时间约束计算单元将关联任务组的时间约束分配到具体各层的时间约束;The task layering unit is connected to the task graph construction unit, including a task set division unit and a time constraint calculation unit, and the task set division unit is used to divide tasks into different task sets according to the hierarchy according to the DAG diagram constructed by the task construction unit, The time constraint calculation unit allocates the time constraints of the associated task group to the time constraints of each specific layer;
虚拟机管理单元用于管理虚拟机集群,能够监控虚拟机上任务的执行情况;The virtual machine management unit is used to manage the virtual machine cluster, and can monitor the execution of tasks on the virtual machine;
任务调度单元分别与任务分层单元和虚拟机管理单元相连,用于将任务分层单元中的按层分好的任务集按照时间约束情况分配至虚拟机管理单元管理的合适的虚拟机。The task scheduling unit is respectively connected with the task layering unit and the virtual machine management unit, and is used to allocate the layered task sets in the task layering unit to appropriate virtual machines managed by the virtual machine management unit according to time constraints.
所述任务调度单元包括任务集接收单元、任务集分配单元、任务集执行监控单元和任务集时间计算单元;The task scheduling unit includes a task set receiving unit, a task set allocation unit, a task set execution monitoring unit and a task set time calculation unit;
所述任务集接收单元从所述任务分层单元接收待执行任务集和任务集的时间约束;所述任务集分配单元将任务集中的任务分配至虚拟机,任务集执行监控单元监控任务执行情况,任务集时间计算单元计算任务集中所有任务完成的时间并与任务集的约束时间进行比较,任务集分配单元根据比较结果确定下一层任务集的分配情况。The task set receiving unit receives the task set to be executed and the time constraints of the task set from the task layering unit; the task set allocation unit allocates the tasks in the task set to virtual machines, and the task set execution monitoring unit monitors the execution of tasks , the task set time calculation unit calculates the completion time of all tasks in the task set and compares it with the constraint time of the task set, and the task set allocation unit determines the allocation of the task set in the next layer according to the comparison result.
本发明采用上述技术方案,具有以下有益效果:本发明通过使用构建DAG图的方法来表示关联任务组中任务之间的关联关系,同时采用将DAG图分层的思想,将处于同一层中的非关联任务划分进同一任务集合,建立了虚拟机集群以提供任务执行的场所,在任务调度的过程中采用基于时间约束的分层调度方法,将每一层中的任务调度至最合适的虚拟机中执行,有效解决了现有技术中云计算关联任务在调度过程中出现执行延迟的问题,最大化的减少任务的延迟情况发生,保证任务能够在用户期望的时间内完成,并且实现了虚拟机资源的有效利用。The present invention adopts the above-mentioned technical scheme, and has the following beneficial effects: the present invention uses the method of constructing a DAG graph to represent the association relationship between tasks in the associated task group, and adopts the idea of layering the DAG graph, and the tasks in the same layer Non-related tasks are divided into the same task set, and a virtual machine cluster is established to provide a place for task execution. In the process of task scheduling, a hierarchical scheduling method based on time constraints is used to schedule tasks in each layer to the most suitable virtual environment. Execution in the computer effectively solves the problem of execution delay in the scheduling process of cloud computing-related tasks in the prior art, minimizes the occurrence of task delays, ensures that tasks can be completed within the time expected by users, and realizes virtual efficient use of machine resources.
附图说明Description of drawings
图1为本发明方法实施例的总体框架图;Fig. 1 is the overall frame diagram of the method embodiment of the present invention;
图2为本发明方法实施例中的关联任务组的DAG图;Fig. 2 is the DAG diagram of the associated task group in the method embodiment of the present invention;
图3为本发明方法实施例中的关联任务组分层调度的流程图;Fig. 3 is the flowchart of the hierarchical scheduling of associated task groups in the method embodiment of the present invention;
图4为本发明装置实施例的结构示意图。Fig. 4 is a schematic structural diagram of an embodiment of the device of the present invention.
具体实施方式Detailed ways
下面结合附图和具体实施例对本发明做进一步的阐述。The present invention will be further elaborated below in conjunction with the accompanying drawings and specific embodiments.
本发明提供一种基于时间约束条件下的云计算关联任务调度方法实施例,图1为本实施例的总体框架图,针对由n个云计算关联任务组成的一组关联任务组,其中每个任务都有其前驱或者后继任务,只有当前驱任务完成时后继任务才能开始被调度执行,用户期望的关联任务组完成时间为D,本发明实施例的主要步骤如下:The present invention provides an embodiment of a cloud computing associated task scheduling method based on time constraints. FIG. 1 is an overall framework diagram of this embodiment, aiming at a set of associated task groups composed of n cloud computing associated tasks, each of which Tasks have their predecessors or successor tasks. Only when the predecessor task is completed, the successor task can start to be scheduled and executed. The user expects the completion time of the associated task group to be D. The main steps of the embodiment of the present invention are as follows:
(A)关联任务组进入DAG图构建模块,DAG图构建模块根据任务的执行次序构建DAG图;(A) the associated task group enters the DAG graph building module, and the DAG graph building module builds the DAG graph according to the execution order of the tasks;
(B)构建完成的DAG图进入关联任务分层模块,任务划分进不同层次的任务集合中;(B) The completed DAG graph enters the associated task layering module, and tasks are divided into task sets of different levels;
(C)抽取资源池中的CPU资源、内存资源、网络资源和存储资源生成多个虚拟机,组成虚拟机集群;(C) Extract CPU resources, memory resources, network resources and storage resources in the resource pool to generate multiple virtual machines to form a virtual machine cluster;
(D)任务调度模块按照一定的调度策略将处于相同层次的任务分配至集群中的虚拟机。(D) The task scheduling module assigns tasks at the same level to the virtual machines in the cluster according to a certain scheduling policy.
其中步骤(A)的具体步骤为:Wherein the concrete steps of step (A) are:
(A1)定义G={T,Λ,C}为描述关联任务组的三元组,其中,T为关联任务图中所有的任务集合T={t1,t2,...,tn},Λ为任务(ti,tj)之间的执行次序的集合,ti为tj的直接前驱任务,tj为ti的直接后继任务,C={c1,c2,...,cL}为任务之间通信开销的集合。任务之间通信开销越大,任务之间用于传输数据的时间越长。当两个具有直接关联关系的任务被分配至同一虚拟机上执行时,其通信开销为0,同时可以有效减少前驱任务向后继任务传输数据的时间。(A1) Define G={T,Λ,C} as a triplet describing the associated task group, where T is all task sets in the associated task graph T={t 1 ,t 2 ,...,t n }, Λ is the set of execution order among tasks (t i , t j ), t i is the direct predecessor task of t j , t j is the direct successor task of t i , C={c 1 ,c 2 ,. ..,c L } is the set of communication overhead between tasks. The greater the communication overhead between tasks, the longer the time for data transmission between tasks. When two tasks with a direct relationship are assigned to the same virtual machine for execution, the communication overhead is 0, and the time for transferring data from the predecessor task to the successor task can be effectively reduced.
(A2)根据集合Λ中任务之间的执行次序得出关联任务组的DAG图。(A2) Obtain the DAG graph of the associated task group according to the execution order of the tasks in the set Λ.
如图2所示,直观地展示了具有10个关联任务的DAG图,这组关联任务为t1-t10,任务之间的关联关系用箭头表示,箭头上的数字表示任务间的通信开销。任务t1为关联任务图的入口节点,任务t10为关联任务的出口节点,任务t2、t3、t4的直接前驱任务为t1,后继任务分别为t5、t6、t7,以此类推每个任务都有自己的前驱或者后继任务。As shown in Figure 2, it intuitively shows the DAG graph with 10 associated tasks. This group of associated tasks is t 1 -t 10 . The association relationship between tasks is represented by arrows, and the numbers on the arrows represent the communication overhead between tasks. . Task t 1 is the entry node of the associated task graph, task t 10 is the exit node of the associated task, the direct predecessor task of tasks t 2 , t 3 , and t 4 is t 1 , and the successor tasks are t 5 , t 6 , and t 7 respectively , and so on, each task has its own predecessor or successor task.
上述步骤(B)的具体步骤为:The concrete steps of above-mentioned steps (B) are:
(B1)按照从入口任务至出口任务的顺序将所述DAG图分为k层。(B1) Divide the DAG graph into k layers according to the sequence from the entry task to the exit task.
(B2)将所述DAG图中的任务按照其对应的层次划分至相应层的任务集合中,如图2所示,DAG图有t1-t1010个关联任务,按照从t1至t10遍历任务图的顺序,可将关联任务图分为5层:第一层为t1;第二层为t2、t3、t4;第三层为t5、t6、t7;第四层为t8、t9;第五层为t10。对于处在同一层的任务集,由于任务之间没有直接的执行次序关联性,所以当前驱任务完成时,同一层次的任务可以被同时调度。例如任务t2、t3、t4只需其前驱任务t1完成时,可以被同时调度。(B2) Divide the tasks in the DAG diagram into the task sets of the corresponding layers according to their corresponding levels, as shown in Figure 2, the DAG diagram has t 1 -t 10 10 associated tasks, according to from t 1 to t 10 By traversing the order of the task graph, the associated task graph can be divided into 5 layers: the first layer is t 1 ; the second layer is t 2 , t 3 , t 4 ; the third layer is t 5 , t 6 , t 7 ; The fourth layer is t 8 , t 9 ; the fifth layer is t 10 . For task sets at the same level, since there is no direct execution sequence correlation between tasks, tasks at the same level can be scheduled at the same time when the predecessor tasks are completed. For example, tasks t 2 , t 3 , and t 4 can be scheduled simultaneously only when their predecessor task t 1 is completed.
(B3)将用户期望的关联任务组完成时间D作为关联任务调度的总的时间约束,根据公式计算出每层任务集合的时间约束。(B3) Take the completion time D of the associated task group expected by the user as the total time constraint of the associated task scheduling, according to The formula calculates the time constraints for each layer of task sets.
其中,Di为第i层任务集合的约束时间,mi为第i层任务集合中的任务数,且有 Among them, D i is the constraint time of the i-th layer task set, m i is the number of tasks in the i-th layer task set, and
下面结合图3详细说明上述步骤(D)中的任务调度流程,包括如下步骤:The task scheduling process in the above-mentioned step (D) is described in detail below in conjunction with FIG. 3, including the following steps:
S401:从已划分好任务集的关联任务组接收一层任务集Si,其时间约束为Di,其中i为当前接收的任务集的层次,第一次调度时i=1;S401: Receive a layer of task set S i from the associated task group that has divided the task set, and its time constraint is D i , where i is the level of the currently received task set, and i=1 in the first scheduling;
S402:将任务集Si中的任务依次分配至虚拟机集群中不同的空闲虚拟机中执行;S402: Assign the tasks in the task set S i to different idle virtual machines in the virtual machine cluster for execution in sequence;
S403:判断任务集Si中的任务是否全部执行完毕,若没有完成则继续等待任务执行完毕,否则转至S404;S403: Determine whether all the tasks in the task set S i have been executed, if not, continue to wait for the tasks to be executed, otherwise go to S404;
S404:判断任务组中是否存在下一层待执行的任务集,若不存在则任务组全部执行完毕,否则转至S405;S404: Determine whether there is a task set to be executed at the next level in the task group, if not, all the task groups are executed, otherwise go to S405;
S405:计算任务集Si中的所有任务的总完成时间Ti。S405: Calculate the total completion time T i of all tasks in the task set S i .
S406:判断Ti<Di是否成立,若成立取下一层任务集转至步骤S402,否则取下一层任务集转至步骤S407;S406: Determine whether T i < D i is true, if it is true, take the next level of task set and go to step S402, otherwise take the next level of task set and go to step S407;
S407:将任务集Si中的任务分配至与其直接前驱任务相同的虚拟机中执行,转至步骤403;S407: Assign the tasks in the task set S i to the same virtual machine as its direct predecessor tasks for execution, and go to step 403;
本发明还提供一种基于时间约束条件下的云计算关联任务调度装置实施例,如图4所示,包括任务图构建单元101、任务分层单元102、虚拟机管理单元103和任务调度单元104;The present invention also provides an embodiment of a cloud computing-associated task scheduling device based on time constraints, as shown in FIG. ;
任务图构建单元101用于接收关联任务组,并将所有任务按照任务执行的先后次序建立DAG图;The task graph construction unit 101 is used to receive associated task groups, and build a DAG graph for all tasks according to the sequence of task execution;
任务分层单元102与任务图构建单元101相连,包括任务集划分单元1021和时间约束计算单元1022,任务集划分单元1021用于根据任务构建单元101构建完成的DAG图将任务按照层次划分为不同的任务集,时间约束计算单元1022将关联任务组的时间约束按照各层具体任务数的占比情况计算各层的时间约束;The task hierarchy unit 102 is connected to the task graph construction unit 101, including a task set division unit 1021 and a time constraint calculation unit 1022. The task set division unit 1021 is used to divide tasks into different levels according to the DAG diagram constructed by the task construction unit 101. task set, the time constraint calculation unit 1022 calculates the time constraints of the associated task groups according to the proportion of the specific number of tasks in each layer;
虚拟机管理单元103用于管理虚拟机集群,能够监控虚拟机上任务的执行情况;The virtual machine management unit 103 is used to manage the virtual machine cluster, and can monitor the execution of tasks on the virtual machine;
任务调度单元104与任务分层单元102和虚拟机管理单元103相连,包括任务集接收单元1041、任务集分配单元1042、任务集执行监控单元1043和任务集时间计算单元1044;The task scheduling unit 104 is connected to the task layering unit 102 and the virtual machine management unit 103, including a task set receiving unit 1041, a task set allocation unit 1042, a task set execution monitoring unit 1043 and a task set time calculation unit 1044;
任务集接收单元1041从任务分层单元102依次接收一层任务集和该层任务集的时间约束;任务集分配单元1042按照分配规则将任务集中的任务分配至虚拟机,任务集执行监控单元1043监控任务执行情况,任务集时间计算单元1044计算一个任务集中所有任务完成的时间并与约束时间进行比较,任务集分配单元1042根据比较结果确定下一层任务集的分配情况,若实际完成的时间小于约束时间,则下一层任务集中的任务依次分配至不同的空闲虚拟机,否则将下一层任务集中的任务分配至其直接前驱任务所在的虚拟机执行。The task set receiving unit 1041 sequentially receives a layer of task sets and the time constraints of this layer of task sets from the task layering unit 102; the task set allocation unit 1042 allocates the tasks in the task set to virtual machines according to the allocation rules, and the task set execution monitoring unit 1043 Monitor the execution of tasks, the task set time calculation unit 1044 calculates the completion time of all tasks in a task set and compares it with the constraint time, the task set allocation unit 1042 determines the allocation of the next layer of task sets according to the comparison result, if the actual completion time is less than the constraint time, the tasks in the next-level task set are assigned to different idle virtual machines in turn, otherwise, the tasks in the next-level task set are assigned to the virtual machines where their direct predecessor tasks are located.
本发明按照优选实施例进行了说明,应当理解,但上述实施例不以任何形式限定本发明,凡采用等同替换或等效变换的形式所获得的技术方案,均落在本发明的保护范围内。The present invention has been described according to the preferred embodiments, it should be understood that the above embodiments do not limit the present invention in any form, and all technical solutions obtained in the form of equivalent replacement or equivalent transformation all fall within the protection scope of the present invention .
Claims (8)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410245649.XA CN104021040B (en) | 2014-06-04 | 2014-06-04 | Based on the cloud computing associated task dispatching method and device under time constraint condition |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410245649.XA CN104021040B (en) | 2014-06-04 | 2014-06-04 | Based on the cloud computing associated task dispatching method and device under time constraint condition |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104021040A true CN104021040A (en) | 2014-09-03 |
CN104021040B CN104021040B (en) | 2017-09-26 |
Family
ID=51437808
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410245649.XA Active CN104021040B (en) | 2014-06-04 | 2014-06-04 | Based on the cloud computing associated task dispatching method and device under time constraint condition |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104021040B (en) |
Cited By (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104536804A (en) * | 2014-12-23 | 2015-04-22 | 西安电子科技大学 | Virtual resource dispatching system for related task requests and dispatching and distributing method for related task requests |
CN106095584A (en) * | 2016-06-20 | 2016-11-09 | 中国人民解放军国防科学技术大学 | The dispatching method of the security sensitive work stream that task based access control replicates in cloud computing |
CN106919449A (en) * | 2017-03-21 | 2017-07-04 | 联想(北京)有限公司 | The dispatch control method and electronic equipment of a kind of calculating task |
CN107291536A (en) * | 2017-05-23 | 2017-10-24 | 南京邮电大学 | Application task stream scheduling method under a kind of cloud computing environment |
CN107656730A (en) * | 2017-09-28 | 2018-02-02 | 链家网(北京)科技有限公司 | The adaptive visualization method and device of distributed software system topological structure |
CN108028804A (en) * | 2015-07-10 | 2018-05-11 | 国际商业机器公司 | The management of virtual machine in virtual computation environmental based on structure limitation |
CN104820616B (en) * | 2015-04-24 | 2018-10-30 | 中国联合网络通信集团有限公司 | A kind of method and device of task scheduling |
CN108737462A (en) * | 2017-04-17 | 2018-11-02 | 华东师范大学 | A kind of cloud computation data center method for scheduling task based on graph theory |
CN108958919A (en) * | 2018-07-13 | 2018-12-07 | 湘潭大学 | More DAG task schedule expense fairness assessment models of limited constraint in a kind of cloud computing |
CN109074284A (en) * | 2016-04-01 | 2018-12-21 | 阿尔卡特朗讯 | For increasing and decreasing the method and system and computer program product of resource in proportion |
CN109753337A (en) * | 2017-11-02 | 2019-05-14 | 阿里巴巴集团控股有限公司 | A kind of mirror image construction method, device and server |
CN110018817A (en) * | 2018-01-05 | 2019-07-16 | 中兴通讯股份有限公司 | The distributed operation method and device of data, storage medium and processor |
CN110968412A (en) * | 2019-12-13 | 2020-04-07 | 武汉慧联无限科技有限公司 | Task execution method, system and storage medium |
CN111082971A (en) * | 2019-11-25 | 2020-04-28 | 南京航空航天大学 | Shared resource allocation method for cloud load test |
CN111371856A (en) * | 2020-02-25 | 2020-07-03 | 程瑞萍 | Cloud computing task scheduling method and device, cloud computing system and server |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103605567A (en) * | 2013-10-29 | 2014-02-26 | 河海大学 | Cloud computing task scheduling method facing real-time demand change |
-
2014
- 2014-06-04 CN CN201410245649.XA patent/CN104021040B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103605567A (en) * | 2013-10-29 | 2014-02-26 | 河海大学 | Cloud computing task scheduling method facing real-time demand change |
Non-Patent Citations (1)
Title |
---|
谭文安,路广振,孙勇: "基于并行分层的工作流调度优化算法", 《计算机集成制造系统》 * |
Cited By (20)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104536804A (en) * | 2014-12-23 | 2015-04-22 | 西安电子科技大学 | Virtual resource dispatching system for related task requests and dispatching and distributing method for related task requests |
CN104820616B (en) * | 2015-04-24 | 2018-10-30 | 中国联合网络通信集团有限公司 | A kind of method and device of task scheduling |
CN108028804A (en) * | 2015-07-10 | 2018-05-11 | 国际商业机器公司 | The management of virtual machine in virtual computation environmental based on structure limitation |
CN109074284A (en) * | 2016-04-01 | 2018-12-21 | 阿尔卡特朗讯 | For increasing and decreasing the method and system and computer program product of resource in proportion |
CN106095584A (en) * | 2016-06-20 | 2016-11-09 | 中国人民解放军国防科学技术大学 | The dispatching method of the security sensitive work stream that task based access control replicates in cloud computing |
CN106919449A (en) * | 2017-03-21 | 2017-07-04 | 联想(北京)有限公司 | The dispatch control method and electronic equipment of a kind of calculating task |
CN106919449B (en) * | 2017-03-21 | 2020-11-20 | 联想(北京)有限公司 | Scheduling control method of computing task and electronic equipment |
CN108737462A (en) * | 2017-04-17 | 2018-11-02 | 华东师范大学 | A kind of cloud computation data center method for scheduling task based on graph theory |
CN107291536B (en) * | 2017-05-23 | 2020-06-30 | 南京邮电大学 | Application task flow scheduling method in cloud computing environment |
CN107291536A (en) * | 2017-05-23 | 2017-10-24 | 南京邮电大学 | Application task stream scheduling method under a kind of cloud computing environment |
CN107656730A (en) * | 2017-09-28 | 2018-02-02 | 链家网(北京)科技有限公司 | The adaptive visualization method and device of distributed software system topological structure |
CN107656730B (en) * | 2017-09-28 | 2020-10-16 | 贝壳找房(北京)科技有限公司 | Self-adaptive visualization method and device for topological structure of distributed software system |
CN109753337A (en) * | 2017-11-02 | 2019-05-14 | 阿里巴巴集团控股有限公司 | A kind of mirror image construction method, device and server |
CN109753337B (en) * | 2017-11-02 | 2023-03-28 | 阿里巴巴集团控股有限公司 | Mirror image construction method and device and server |
CN110018817A (en) * | 2018-01-05 | 2019-07-16 | 中兴通讯股份有限公司 | The distributed operation method and device of data, storage medium and processor |
CN108958919A (en) * | 2018-07-13 | 2018-12-07 | 湘潭大学 | More DAG task schedule expense fairness assessment models of limited constraint in a kind of cloud computing |
CN111082971A (en) * | 2019-11-25 | 2020-04-28 | 南京航空航天大学 | Shared resource allocation method for cloud load test |
CN111082971B (en) * | 2019-11-25 | 2021-07-20 | 南京航空航天大学 | A Shared Resource Allocation Method for Cloud Load Testing |
CN110968412A (en) * | 2019-12-13 | 2020-04-07 | 武汉慧联无限科技有限公司 | Task execution method, system and storage medium |
CN111371856A (en) * | 2020-02-25 | 2020-07-03 | 程瑞萍 | Cloud computing task scheduling method and device, cloud computing system and server |
Also Published As
Publication number | Publication date |
---|---|
CN104021040B (en) | 2017-09-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104021040B (en) | Based on the cloud computing associated task dispatching method and device under time constraint condition | |
CN102681889B (en) | Scheduling method of cloud computing open platform | |
CN111381950B (en) | A multi-replica-based task scheduling method and system for edge computing environment | |
CN109034396B (en) | Method and apparatus for processing deep learning jobs in a distributed cluster | |
CN103414761B (en) | Mobile terminal cloud resource scheduling method based on Hadoop framework | |
CN103605567B (en) | Cloud computing task scheduling method facing real-time demand change | |
CN104123182B (en) | Based on the MapReduce task of client/server across data center scheduling system and method | |
CN104951372B (en) | A kind of Map/Reduce data processing platform (DPP) memory source dynamic allocation methods based on prediction | |
CN102521055B (en) | Virtual machine resource allocating method and virtual machine resource allocating system | |
CN103838621B (en) | Method and system for scheduling routine work and scheduling nodes | |
CN107222531B (en) | Container cloud resource scheduling method | |
CN111861412B (en) | Scientific workflow scheduling method and system for completion time optimization | |
CN107122233B (en) | A Multi-VCPU Adaptive Real-time Scheduling Method for TSN Services | |
CN104243617B (en) | Towards the method for scheduling task and system of mixed load in a kind of isomeric group | |
CN102073546A (en) | Task-dynamic dispatching method under distributed computation mode in cloud computing environment | |
CN102063336A (en) | Distributed computing multiple application function asynchronous concurrent scheduling method | |
Lai et al. | Sol: Fast distributed computation over slow networks | |
CN109783225B (en) | A tenant priority management method and system for a multi-tenant big data platform | |
CN111913800B (en) | Resource allocation method for optimizing cost of micro-service in cloud based on L-ACO | |
CN107168770A (en) | A kind of cloud data center workflow schedule of low energy consumption and resource provision method | |
CN108108225A (en) | A kind of method for scheduling task towards cloud computing platform | |
CN110597639A (en) | CPU distribution control method, device, server and storage medium | |
CN102708003A (en) | Method for allocating resources under cloud platform | |
CN106713375A (en) | Method and device for allocating cloud resources | |
CN112306642A (en) | A Workflow Scheduling Method Based on Stable Matching Game Theory |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
EE01 | Entry into force of recordation of patent licensing contract | ||
EE01 | Entry into force of recordation of patent licensing contract |
Application publication date: 20140903 Assignee: HUANENG LANCANG RIVER HYDROPOWER Inc. Assignor: HOHAI University Contract record no.: 2019320000021 Denomination of invention: Cloud computing associated task scheduling method and device based on time constraint Granted publication date: 20170926 License type: Common License Record date: 20190228 |