CN107704319A - Improve the CMP method for scheduling task of fireworks algorithm - Google Patents
Improve the CMP method for scheduling task of fireworks algorithm Download PDFInfo
- Publication number
- CN107704319A CN107704319A CN201710972593.1A CN201710972593A CN107704319A CN 107704319 A CN107704319 A CN 107704319A CN 201710972593 A CN201710972593 A CN 201710972593A CN 107704319 A CN107704319 A CN 107704319A
- Authority
- CN
- China
- Prior art keywords
- fireworks
- sparks
- value
- algorithm
- task scheduling
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 28
- 238000004880 explosion Methods 0.000 claims abstract description 23
- 239000013598 vector Substances 0.000 claims abstract description 18
- 230000007717 exclusion Effects 0.000 claims description 10
- 238000013507 mapping Methods 0.000 claims description 4
- 230000007423 decrease Effects 0.000 claims description 2
- 238000005457 optimization Methods 0.000 abstract description 9
- 230000035772 mutation Effects 0.000 abstract description 3
- 230000001846 repelling effect Effects 0.000 description 9
- 238000004891 communication Methods 0.000 description 5
- 238000004364 calculation method Methods 0.000 description 4
- 239000011159 matrix material Substances 0.000 description 4
- 238000010586 diagram Methods 0.000 description 3
- 239000002699 waste material Substances 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000002411 adverse Effects 0.000 description 1
- 125000004122 cyclic group Chemical group 0.000 description 1
- 230000003247 decreasing effect Effects 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 238000006073 displacement reaction Methods 0.000 description 1
- 230000002068 genetic effect Effects 0.000 description 1
- 230000002028 premature Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/004—Artificial life, i.e. computing arrangements simulating life
- G06N3/006—Artificial life, i.e. computing arrangements simulating life based on simulated virtual individual or collective life forms, e.g. social simulations or particle swarm optimisation [PSO]
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Software Systems (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Computational Linguistics (AREA)
- Biophysics (AREA)
- Evolutionary Computation (AREA)
- General Health & Medical Sciences (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- Biomedical Technology (AREA)
- Artificial Intelligence (AREA)
- Mathematical Physics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Health & Medical Sciences (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
本发明公开了改进烟花算法的CMP任务调度方法,属于计算机体系结构领域。具体步骤包括:设定初始参数;随机生成N个烟花的位置向量;计算烟花的爆炸火花数量、爆炸幅度和适应度值;进行爆炸操作和高斯变异操作;反复迭代后输出最优任务调度序列。本发明在烟花算法中引入排斥算子;同时,在排斥操作的维数上应用非线性惯性权重因子;采用的编码方案保留烟花位置是多维向量的特点,只重新定义每一维表示的含义和取值范围。本发明保证烟花产生的火花有效,有利于算法迭代后期在最优值附近进行细致性的寻优,编码方便、高效,能在更短时间内找到精度更高的解,有效提高了CMP架构下任务的执行效率。
The invention discloses a CMP task scheduling method for an improved fireworks algorithm, belonging to the field of computer architecture. The specific steps include: setting initial parameters; randomly generating position vectors of N fireworks; calculating the number of explosion sparks, explosion amplitude and fitness value of fireworks; performing explosion operation and Gaussian mutation operation; outputting the optimal task scheduling sequence after repeated iterations. The present invention introduces the repulsion operator in the fireworks algorithm; at the same time, applies the nonlinear inertia weight factor on the dimension of the repulsion operation; the coding scheme adopted retains the characteristics that the position of the fireworks is a multi-dimensional vector, and only redefines the meaning and expression of each dimension Ranges. The invention ensures that the sparks generated by fireworks are effective, which is conducive to the meticulous optimization near the optimal value in the later stage of the algorithm iteration, the coding is convenient and efficient, and the solution with higher precision can be found in a shorter time, effectively improving the efficiency of the CMP framework. task execution efficiency.
Description
技术领域technical field
本发明属于计算机体系结构领域,具体涉及一种改进烟花算法的CMP任务调度方法。The invention belongs to the field of computer architecture, and in particular relates to a CMP task scheduling method for improving the fireworks algorithm.
背景技术Background technique
受内核间的硬件资源共享和任务间的依赖关系影响,有依赖的CMP任务调度容易产生资源争用,使得多核处理器吞吐率下降,并行性、高效性得不到有效发挥。Affected by the sharing of hardware resources between cores and the dependencies between tasks, CMP task scheduling with dependencies is prone to resource contention, which reduces the throughput of multi-core processors and prevents effective parallelism and efficiency.
CMP任务调度问题是一类NP完全的组合优化问题。目前,在任务调度问题上应用较多的组合优化算法是遗传算法(Genetic Algorithm,GA),但遗传算法容易“早熟”,并且由于其复杂的交叉变异操作,算法的时间复杂度和执行效率容易受到任务数量影响,导致任务调度结果不能满足实际需求。CMP task scheduling problem is a kind of NP-complete combinatorial optimization problem. At present, Genetic Algorithm (GA) is a combinatorial optimization algorithm widely used in task scheduling problems, but GA is prone to "premature", and due to its complex cross-mutation operation, the time complexity and execution efficiency of the algorithm are easy. Affected by the number of tasks, the task scheduling results cannot meet the actual needs.
烟花算法(Fireworks Algorithm,FWA)是在2010年由谭营提出的一种新型群体智能优化算法。烟花算法在求解复杂问题全局最优解上展现出良好的性能特点,且对求解的问题限定较低,适用于组合优化问题。Fireworks Algorithm (FWA) is a new swarm intelligence optimization algorithm proposed by Tan Ying in 2010. The fireworks algorithm shows good performance characteristics in solving the global optimal solution of complex problems, and has a low limit on the problem to be solved, so it is suitable for combinatorial optimization problems.
由于烟花算法在产生爆炸火花时会受到爆炸数量和爆炸幅度的限制,并且适应度值最好烟花的爆炸火花数量多但幅度过小,产生的火花与烟花距离过近甚至重叠,导致火花失效,浪费了计算资源,使算法的运行效率受限。Because the firework algorithm is limited by the number of explosions and the explosion range when generating explosion sparks, and the number of explosion sparks of the fireworks with the best fitness value is large but the amplitude is too small, the distance between the generated sparks and the fireworks is too close or even overlaps, resulting in the failure of the sparks. Computational resources are wasted, and the operating efficiency of the algorithm is limited.
发明内容Contents of the invention
本发明的目的在于提供提高CMP架构下任务调度的高效性,保证该烟花产生的火花的有效性的改进烟花算法的CMP任务调度方法。The object of the present invention is to provide a CMP task scheduling method for improving the fireworks algorithm which improves the efficiency of task scheduling under the CMP framework and ensures the effectiveness of the sparks produced by the fireworks.
本发明的目的通过以下技术方案来实现:The purpose of the present invention is achieved through the following technical solutions:
改进烟花算法的CMP任务调度方法,包括如下步骤:The CMP task scheduling method for improving the fireworks algorithm includes the following steps:
(1)设定烟花个数N、基本爆炸火花数、基本爆炸半径、排斥操作界定距离、排斥操作作用维数的初始值、最大迭代次数、初始DAG图;(1) Set the number N of fireworks, the number of basic explosion sparks, the basic explosion radius, the distance defined by the repulsion operation, the initial value of the dimension of the repulsion operation, the maximum number of iterations, and the initial DAG graph;
(2)根据本发明所述的编码方案随机生成N个烟花的位置向量;(2) randomly generate the position vectors of N fireworks according to the encoding scheme of the present invention;
(3)计算烟花的爆炸火花数量、爆炸幅度和适应度值;(3) Calculate the number of explosion sparks, explosion amplitude and fitness value of fireworks;
(4)进行爆炸操作和高斯变异操作,产生爆炸火花和高斯变异火花,并将超出可行域范围的火花映射回可行域内;(4) Perform explosion operation and Gaussian mutation operation to generate explosion sparks and Gaussian mutation sparks, and map sparks beyond the scope of the feasible region back into the feasible region;
(5)判断适应度值最优的烟花产生的火花是否需要进行排斥操作,若需要,转至步骤⑥,若不需要,转至步骤(7);(5) Determine whether the spark produced by the fireworks with the best fitness value needs to be repelled, if necessary, go to step ⑥, if not, go to step (7);
(6)随机选择火花的维进行排斥操作,若排斥后有火花超出可行域范围则将其映射回可行域内;(6) Randomly select the dimension of the spark to perform the repelling operation, and if there is a spark beyond the range of the feasible domain after repulsion, map it back into the feasible domain;
(7)计算爆炸火花和高斯变异火花的适应度值;(7) calculate the fitness value of explosion spark and Gaussian variation spark;
(8)将适应度值最好的烟花或火花保留到下一代,根据基于欧式距离的轮盘赌规则选择其余N-1个烟花;(8) Keep the fireworks or sparks with the best fitness value to the next generation, and select the remaining N-1 fireworks according to the roulette rules based on Euclidean distance;
(9)是否满足算法终止条件,达到最大迭代次数,若满足,输出最优任务调度序列,算法停止;若不满足,转至步骤(3)。(9) Whether the algorithm termination condition is satisfied and the maximum number of iterations is reached, if it is satisfied, the optimal task scheduling sequence is output, and the algorithm stops; if not, go to step (3).
特别地,Particularly,
所述的编码方式为:编码保留每个烟花的位置是多维向量的特点,只对每一维表示的含义重新定义。用Xi表示烟花i的位置向量,即:Xi=[x1,x2,…,xj,…,xm],其中xj=rand(1,n),n表示处理器核的数量,rand(1,n)表示在1到n之间随机取整数值;m表示任务的数量,xj表示第j个任务被分配到xj处理器核上执行。这种编码方式保证一个任务只能被分配到一个处理器核上执行,每个处理器核可以处理多个任务。The encoding method is as follows: the encoding retains the position of each firework, which is a characteristic of a multi-dimensional vector, and only redefines the meaning of each dimension. Use X i to represent the position vector of fireworks i, namely: X i =[x 1 ,x 2 ,...,x j ,...,x m ], where x j =rand(1,n), n represents the processor core Quantity, rand(1,n) means randomly taking an integer value between 1 and n; m means the number of tasks, and x j means that the jth task is assigned to the x j processor core for execution. This encoding method ensures that a task can only be assigned to one processor core for execution, and each processor core can handle multiple tasks.
所述的排斥操作方法为:当适应度值最好的烟花与其产生的火花之间距离小于可接受范围时进行排斥操作:其中表示烟花i产生火花的位置向量第k维取值,是经过排斥作用后的火花位置向量第k维取值,Δs是排斥算子,考虑到CMP任务调度的特点,应用在CMP任务调度上的排斥算子取值为:Δs=rand(0,n-1),其中n表示处理器内核的数量,rand(0,n-1)是在0到n-1之间随机取整数的函数。The repelling operation method is as follows: when the distance between the firework with the best fitness value and the spark it produces is less than the acceptable range, the repelling operation is performed: in Indicates the value of the k-th dimension of the position vector of the spark produced by fireworks i, is the value of the k-th dimension of the spark position vector after repulsion, and Δs is the repulsion operator. Considering the characteristics of CMP task scheduling, the value of repulsion operator applied to CMP task scheduling is: Δs=rand(0,n -1), where n represents the number of processor cores, and rand(0,n-1) is a function that randomly selects an integer between 0 and n-1.
所述的排斥操作作用维数z的迭代方法为:z(t)=w*z(t-1),其中z(t)表示第t次迭代排斥操作作用维数的取值,z(t-1)表示第t-1次迭代排斥操作作用维数的取值,w是一个随迭代次数t增加而递减的非线性惯性权重值,满足:w(t)=(1/2)t,其中w(t)是第t次迭代w的取值。The iterative method of the dimension z of the repelling operation is: z(t)=w*z(t-1), wherein z(t) represents the value of the tth iterative repelling operation dimension, z(t -1) represents the value of the action dimension of the t-1th iteration repulsion operation, w is a nonlinear inertia weight value that decreases with the increase of the number of iterations t, and satisfies: w(t)=(1/2) t , where w(t) is the value of w in the tth iteration.
本发明的有益效果在于:The beneficial effects of the present invention are:
充分利用了基本烟花算法收敛速度快、求解精度高的特点,并在基本烟花算法中引入排斥算子,对适应度值最好的烟花进行排斥操作,避免由于产生的火花与烟花距离过近或重叠而无实际意义造成的计算资源浪费;并在排斥算子作用的维数上添加非线性惯性权重因子,增强算法在迭代初期的全局性探索能力,同时加强算法迭代后期的细致性寻优能力。Make full use of the characteristics of fast convergence speed and high solution accuracy of the basic fireworks algorithm, and introduce a repelling operator in the basic fireworks algorithm to perform repelling operations on the fireworks with the best fitness value, so as to avoid sparks that are too close to the fireworks or The waste of computing resources caused by overlapping without practical significance; and adding a nonlinear inertia weight factor to the dimension of the repulsion operator to enhance the global exploration ability of the algorithm in the early stage of iteration, and at the same time strengthen the detailed optimization ability of the algorithm in the later stage of iteration .
附图说明Description of drawings
图1是所述的实例一的DAG图;Fig. 1 is the DAG figure of described example one;
图2是所述的实例一的调度过程示意图;Fig. 2 is a schematic diagram of the scheduling process of the first example;
图3是所述的实例一经过优化后的调度过程示意图;Fig. 3 is a schematic diagram of the optimized scheduling process of the first example;
图4是本发明的流程图;Fig. 4 is a flowchart of the present invention;
具体实施方式detailed description
下面结合附图对本发明的具体实施方式作进一步说明:The specific embodiment of the present invention will be further described below in conjunction with accompanying drawing:
本发明将烟花算法进行改进,并将改进后的烟花算法应用于CMP架构下的任务调度问题上。本发明首先对烟花算法中每代适应度值最优的烟花进行排斥操作,保证其产生的火花有效,避免由于火花失效造成计算资源浪费;同时,在排斥操作的维数上应用非线性惯性权重因子,使算法在迭代初期有更强的全局探索能力,在迭代后期能进行细致性的寻优。The invention improves the fireworks algorithm, and applies the improved fireworks algorithm to the task scheduling problem under the CMP framework. The present invention first performs repelling operation on the fireworks with the best fitness value of each generation in the fireworks algorithm to ensure that the sparks generated by them are effective and avoid waste of computing resources due to spark failure; at the same time, nonlinear inertia weight is applied to the dimension of the repelling operation factor, so that the algorithm has a stronger global exploration ability in the early stage of iteration, and can carry out detailed optimization in the later stage of iteration.
下面结合附图1-图4对本发明进行详细的说明。The present invention will be described in detail below in conjunction with accompanying drawings 1-4.
1、CMP任务调度定义1. Definition of CMP task scheduling
CMP任务调度问题是根据某一算法将任务调度到不同的内核上,并使得执行完全部任务所用时间最短。The CMP task scheduling problem is to schedule tasks to different cores according to a certain algorithm, and make the execution time of all tasks the shortest.
CMP任务调度问题可以用三元组Π=(P,G,PT)表示。其中,P是处理器核构成的集合。G是图论中的有向无环图(Direct Acyclic Graph,DAG),表示任务及任务间的依赖关系。PT是一个矩阵,表示不同的任务在不同的处理器核上的计算开销,PTip即为任务Ti在处理器核p上计算开销。The CMP task scheduling problem can be represented by the triple Π=(P, G, PT). Wherein, P is a set of processor cores. G is a directed acyclic graph (Direct Acyclic Graph, DAG) in graph theory, which represents tasks and dependencies between tasks. PT is a matrix that represents the computing overhead of different tasks on different processor cores, and PT ip is the computing overhead of task T i on processor core p.
表示任务及任务间依赖关系的DAG图可用一个三元组G=(V,S,W)表示,其中每个变量的含义为:The DAG diagram representing tasks and inter-task dependencies can be represented by a triple G=(V,S,W), where the meaning of each variable is:
(1)V代表DAG图的顶点集合,由该处理器需要处理完的全部任务组成。第i个任务Ti对应DAG图中的顶点Vi;(1) V represents the vertex set of the DAG graph, which consists of all the tasks that the processor needs to process. The i-th task T i corresponds to the vertex V i in the DAG graph;
(2)S代表DAG图的边集合,由任务间的通信关系组成,若任务Ti与Tj间存在通信关系,并且Ti为Tj的前驱任务,则对应的DAG图中存在边Sij,边上箭头的方向由Vi指向Vj;(2) S represents the edge set of the DAG graph, which is composed of communication relationships between tasks. If there is a communication relationship between tasks T i and T j , and T i is the predecessor task of T j , then there is an edge S in the corresponding DAG graph ij , the direction of the arrow on the side is from V i to V j ;
(3)W是DAG图的边上的权重值组成的集合,W={Wi1,Wi2,…,Wij,…,Win},其中m表示带调度的任务数量,Wij表示任务Ti与其前驱任务Tj之间的通信开销。当任务i与任务j被分配到同一个核上执行时,通信开销为0。(3) W is a set of weight values on the edges of the DAG graph, W={W i1 ,W i2 ,...,W ij ,...,W in }, where m represents the number of tasks with scheduling, and W ij represents the task The communication overhead between T i and its predecessor task T j . When task i and task j are assigned to execute on the same core, the communication overhead is 0.
本发明适用的CMP任务调度问题要求采用标准DAG图表示任务及任务间依赖关系,即要求所述的DAG图有唯一的入口节点和唯一的出口节点。附图1是本发明的一个任务调度模型实例,T1为唯一的入口节点,T9为唯一的出口节点,该实例中的4个任务在3个处理器核上的计算开销矩阵PT为:The CMP task scheduling problem applicable to the present invention requires the use of a standard DAG graph to represent tasks and inter-task dependencies, that is, the DAG graph is required to have a unique entry node and a unique exit node. Accompanying drawing 1 is an example of a task scheduling model of the present invention, T 1 is the only entry node, T 9 is the only exit node, and the calculation overhead matrix PT of 4 tasks in this example on 3 processor cores is:
有依赖的任务调度问题要求任务Ti的全部前驱任务执行完成后才能开始执行Ti,则在一组任务调度中,任务Ti执行完所需时间为exe[Ti],计算方法为:The task scheduling problem with dependencies requires that the execution of T i can only be started after all the predecessor tasks of task T i are executed. In a group of task scheduling, the time required for the execution of task T i is exe[T i ], and the calculation method is:
exe[Ti]=Wij+PTip+max{exe[Tj]}exe[T i ]=W ij +PT ip +max{exe[T j ]}
Tj∈pre(Ti)T j ∈ pre(T i )
其中pre(Ti)表示任务Ti的前驱任务集合,Wij表示任务Ti与任务Tj的通信开销,PTip为任务Ti在处理器核p上的计算开销,max{exe[Tj]}是任务Ti的前驱任务全部执行完所用时间。Among them, pre(T i ) represents the set of predecessor tasks of task T i , W ij represents the communication overhead between task T i and task T j , PT ip represents the computational overhead of task T i on processor core p, max{exe[T j ]} is the time taken for all the predecessor tasks of task T i to be executed.
则有依赖的CMP任务调度问题的数学定义为:TS=min{exe[Tlast]}Then the mathematical definition of the dependent CMP task scheduling problem is: TS=min{exe[T last ]}
其中exe[Tlast]是最后一个任务执行完所用时间,TS为任务调度长度,即全部任务执行完所用时间。Among them, exe[T last ] is the time taken for the last task to be executed, and TS is the task scheduling length, that is, the time taken for all tasks to be executed.
2、适应度值2. Fitness value
本发明所述的任务调度方法保留烟花算法通过适应度值的大小评价烟花或火花优劣的特点。质量好的烟花适应度值小;质量差的烟花适应度值大。The task scheduling method of the present invention retains the characteristics of the firework algorithm to evaluate the quality of fireworks or sparks by the size of the fitness value. The fitness value of fireworks with good quality is small; the fitness value of fireworks with poor quality is large.
定义任务调度长度TS的大小为适应度值的大小。当TS越大、全部任务执行完成的时间越长时,烟花的质量越差;反之,当TS越小、全部任务执行完的时间越短时,烟花的质量越优。Define the size of the task scheduling length TS as the size of the fitness value. When the TS is larger and the time to complete all tasks is longer, the quality of fireworks is worse; on the contrary, when the TS is smaller and the time to complete all tasks is shorter, the quality of fireworks is better.
适应度值函数为:The fitness value function is:
f(Xi)=TS(Xi)f(X i )=TS(X i )
其中 in
3、引入排斥算子的位置更新方案3. Introduce the location update scheme of the repulsion operator
基本烟花算法在各类组合优化问题中表现出良好的寻优能力,但适应度值最好的烟花的爆炸半径很小,甚至为0,导致产生的火花失去实际价值,浪费算法的计算资源,也容易使算法陷入局部最优解。The basic firework algorithm shows good optimization ability in various combinatorial optimization problems, but the explosion radius of the firework with the best fitness value is very small, even 0, resulting in the loss of actual value of the generated sparks and a waste of computing resources of the algorithm. It is also easy to make the algorithm fall into a local optimal solution.
为了避免烟花算法这一特点产生的不良影响,本发明引入排斥算子,对火花位置进行修正,当烟花i与它产生的火花之间的距离达不到可接受范围时,排斥作用生效。In order to avoid the adverse effects caused by the characteristic of the fireworks algorithm, the present invention introduces a repulsion operator to correct the position of the spark, and when the distance between the fireworks i and the spark it generates is not within an acceptable range, the repulsion takes effect.
烟花与其产生的火花的间距以欧氏距离来衡量,进行排斥操作的条件为: The distance between the fireworks and the sparks they produce is measured by the Euclidean distance, and the conditions for the repulsion operation are:
其中Xi表示烟花i的位置向量,Xh表示烟花i产生的火花h的位置向量,Δr表示烟花i与其产生的火花h的最小可接受距离。Where X i represents the position vector of fireworks i, X h represents the position vector of spark h produced by firework i, and Δr represents the minimum acceptable distance between fireworks i and spark h produced by firework i.
排斥操作方法为: The exclusion method is:
其中表示火花h的位置向量的第k维取值,是经过排斥操作后火花h的位置向量的第k维取值,Δs是排斥算子。in Indicates the k-th dimension value of the position vector of spark h, is the k-th dimension value of the position vector of the spark h after the repulsion operation, and Δs is the repulsion operator.
考虑到CMP任务调度的特点,排斥算子取值为:Δs=rand(0,n-1)Considering the characteristics of CMP task scheduling, the value of the exclusion operator is: Δs=rand(0,n-1)
其中n表示处理器内核的数量,rand(0,n-1)是在0到n-1之间随机取整数的函数。Where n represents the number of processor cores, and rand(0,n-1) is a function that randomly selects integers between 0 and n-1.
排斥算子不对烟花的所有维度进行排斥作用,只随机选择其中的z个维度进行排斥操作,z满足:z(t)=w*z(t-1)The repulsion operator does not repel all dimensions of fireworks, but only randomly selects z dimensions for repulsion operation, and z satisfies: z(t)=w*z(t-1)
其中z(t)表示第t次迭代排斥操作作用维数z的取值,z(t-1)表示第t-1次迭代排斥操作作用维数z的取值,w是一个随迭代次数t增加而递减的非线性惯性权重值,满足:w(t)=(1/2)t,其中w(t)是第t次迭代w的取值。Among them, z(t) represents the value of the dimension z of the repulsion operation of the tth iteration, z(t-1) represents the value of the dimension z of the repulsion operation of the t-1 iteration, and w is a value that varies with the number of iterations t The increasing and decreasing nonlinear inertia weight value satisfies: w(t)=(1/2) t , where w(t) is the value of w in the t-th iteration.
所述的非线性惯性权重值w在迭代初期的取值相对大,有利于烟花算法在较大的空间内进行全局性的搜索;在迭代后期的取值相对小,有利于算法在当前最优值附近进行更加细致的寻优。The nonlinear inertia weight value w is relatively large at the initial stage of iteration, which is conducive to the global search of the fireworks algorithm in a larger space; the relatively small value at the later stage of iteration is beneficial to the algorithm at the current optimal A more detailed search is performed around the value.
4、编码策略4. Coding strategy
为使具有连续解空间的烟花算法适用于离散的CMP任务调度问题,本发明对烟花进行编码。In order to make the fireworks algorithm with continuous solution space applicable to the discrete CMP task scheduling problem, the invention encodes the fireworks.
所述的编码方案使种群中每个烟花或火花代表一种可能的任务调度序列。The coding scheme described makes each firework or spark in the population represent a possible task scheduling sequence.
所述的编码方案对处理器核进行编号:1,2,...,n;并对要处理的任务进行编号1,2,...,m。In the coding scheme, processor cores are numbered: 1, 2, . . . , n; and tasks to be processed are numbered 1, 2, . . . , m.
则烟花或火花i的位置向量Xi可表示为:Then the position vector X i of fireworks or spark i can be expressed as:
Xi=[x1,x2,…,xj,…,xm]X i =[x 1 ,x 2 ,...,x j ,...,x m ]
xj=rand(1,n)x j = rand(1,n)
其中n表示处理器核的数量,rand(1,n)表示在1到n之间随机取整数值;m表示任务的数量,xj表示第j个任务被分配到xj处理器核上执行。Where n represents the number of processor cores, rand(1,n) represents a random integer value between 1 and n; m represents the number of tasks, x j represents the jth task is assigned to the x j processor core for execution .
本发明采用的编码方案具有四个特点:The coding scheme that the present invention adopts has four characteristics:
(1)编码方式简单清晰,易于理解与实现;(1) The coding method is simple and clear, easy to understand and implement;
(2)满足任务调度问题的要求;(2) Satisfy the requirements of the task scheduling problem;
(3)包含所有可能的任务调度方案;(3) Contains all possible task scheduling schemes;
(4)实现烟花或火花的位置向量与任务调度序列的唯一映射。(4) Realize the unique mapping between the position vector of fireworks or sparks and the task scheduling sequence.
则本发明实现的CMP任务调度方法的位移操作为:xj=xj+rand(0,Ri)Then the displacement operation of the CMP task scheduling method realized by the present invention is: x j = x j +rand(0, R i )
其中xj表示第j个线程被分配到xj处理器核上执行,rand(1,Ri)表示在1到Ri之间随机取整数值,Ri是烟花i的爆炸半径。Among them, x j indicates that the jth thread is assigned to the x j processor core for execution, rand(1,R i ) indicates a random integer value between 1 and R i , and R i is the explosion radius of fireworks i.
本发明实现的CMP任务调度方法的映射规则为:xj=1+xj%(n-1),其中xj表示第j个线程被分配到xj处理器核上执行,n表示处理器核数量。The mapping rule of the CMP task scheduling method realized by the present invention is: xj =1+ xj %(n-1), wherein xj represents that the jth thread is assigned to the xj processor core for execution, and n represents the processor number of cores.
本发明实现的CMP任务调度方法的排斥操作方法为:xj=xj+Δs,其中xj表示第j个线程被分配到xj处理器核上执行,Δs是排斥算子。The exclusion operation method of the CMP task scheduling method implemented in the present invention is: x j = x j +Δs, where x j indicates that the jth thread is assigned to the x j processor core for execution, and Δs is an exclusion operator.
实例一:Example one:
根据本发明所述的编码方式,实例一的一种可能的调度方案为:X=[1,2,3,1],如附图2所示,结合实例一的计算开销矩阵可计算出该调度序列的全部任务执行完成时间为33。According to the encoding method described in the present invention, a possible scheduling scheme of Example 1 is: X=[1, 2, 3, 1], as shown in Figure 2, the calculation overhead matrix of Example 1 can be used to calculate the The execution completion time of all tasks in the scheduling sequence is 33.
实例一经过本发明所述的CMP任务调度方法循环迭代后得到的唯一最优调度序列可能为X=[3,1,1,2],根据实例一的计算开销矩阵可得该调度序列的全部线程执行完成时间为10,比图2所示的调度序列执行完全部线程所用时间减少23个单位。Example 1 The only optimal scheduling sequence obtained after cyclic iteration of the CMP task scheduling method described in the present invention may be X=[3,1,1,2], according to the calculation overhead matrix of Example 1, all the scheduling sequences can be obtained The thread execution completion time is 10, which is 23 units less than the time required for the scheduling sequence shown in Figure 2 to execute all the threads.
以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and changes. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.
Claims (4)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710972593.1A CN107704319A (en) | 2017-10-18 | 2017-10-18 | Improve the CMP method for scheduling task of fireworks algorithm |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710972593.1A CN107704319A (en) | 2017-10-18 | 2017-10-18 | Improve the CMP method for scheduling task of fireworks algorithm |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107704319A true CN107704319A (en) | 2018-02-16 |
Family
ID=61181573
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710972593.1A Pending CN107704319A (en) | 2017-10-18 | 2017-10-18 | Improve the CMP method for scheduling task of fireworks algorithm |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107704319A (en) |
Cited By (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108415774A (en) * | 2018-02-27 | 2018-08-17 | 天津大学 | A kind of Method for HW/SW partitioning based on improvement fireworks algorithm |
CN109034560A (en) * | 2018-07-06 | 2018-12-18 | 昆明理工大学 | A kind of Optimization Scheduling of tobacco cutting process |
CN109858617A (en) * | 2019-02-20 | 2019-06-07 | 哈尔滨工程大学 | A kind of fireworks calculation method optimizing initialization mode |
CN110097267A (en) * | 2019-04-19 | 2019-08-06 | 天津大学 | A kind of multiple target multi-robot Task Allocation based on improvement fireworks algorithm |
CN110533152A (en) * | 2019-08-12 | 2019-12-03 | 哈尔滨工程大学 | A kind of method for scheduling task based on improvement fireworks algorithm under CMP architecture |
CN111124633A (en) * | 2019-12-06 | 2020-05-08 | 上海交通大学 | A Task Scheduling Method for Earth-Moon Relay Satellites Considering Detector Storage Constraints |
CN112257297A (en) * | 2020-11-27 | 2021-01-22 | 西南交通大学 | Welding shop comprehensive scheduling method based on improved firework algorithm |
CN113505975A (en) * | 2021-06-18 | 2021-10-15 | 宁波沙塔信息技术有限公司 | Order insertion and scheduling method based on genetic algorithm and firework algorithm |
CN113505974A (en) * | 2021-06-18 | 2021-10-15 | 宁波沙塔信息技术有限公司 | Multi-target scheduling method based on firework algorithm and genetic algorithm |
CN113690926A (en) * | 2021-07-09 | 2021-11-23 | 南昌大学 | Method for optimizing control parameter setting of single-phase inverter by improving firework algorithm |
US20210373946A1 (en) * | 2019-09-23 | 2021-12-02 | Soochow University | Method for scheduling of service processes in hybrid cloud |
CN115034633A (en) * | 2022-06-20 | 2022-09-09 | 石河子大学 | A Process Sequence Planning Method Based on Precursor Diagram and Intelligent Fireworks Algorithm |
CN115454568A (en) * | 2022-08-31 | 2022-12-09 | 山东财经大学 | A Cloud Computing Resource Scheduling Method Based on Improved Firework Algorithm |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102508708A (en) * | 2011-11-30 | 2012-06-20 | 湖南大学 | Heterogeneous multi-core energy-saving task schedule method based on improved genetic algorithm |
CN103984595A (en) * | 2014-05-16 | 2014-08-13 | 哈尔滨工程大学 | Isomerous CMP (Chip Multi-Processor) static state task scheduling method |
CN105487920A (en) * | 2015-10-12 | 2016-04-13 | 沈阳工业大学 | Ant colony algorithm based optimization method for real-time task scheduling of multi-core system |
CN107133088A (en) * | 2017-04-19 | 2017-09-05 | 武汉科技大学 | A kind of multiple nucleus system method for scheduling task based on particle cluster algorithm |
-
2017
- 2017-10-18 CN CN201710972593.1A patent/CN107704319A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102508708A (en) * | 2011-11-30 | 2012-06-20 | 湖南大学 | Heterogeneous multi-core energy-saving task schedule method based on improved genetic algorithm |
CN103984595A (en) * | 2014-05-16 | 2014-08-13 | 哈尔滨工程大学 | Isomerous CMP (Chip Multi-Processor) static state task scheduling method |
CN105487920A (en) * | 2015-10-12 | 2016-04-13 | 沈阳工业大学 | Ant colony algorithm based optimization method for real-time task scheduling of multi-core system |
CN107133088A (en) * | 2017-04-19 | 2017-09-05 | 武汉科技大学 | A kind of multiple nucleus system method for scheduling task based on particle cluster algorithm |
Non-Patent Citations (5)
Title |
---|
TAN Y,ET AL,.: "Fireworks Algorithm for Optimization", 《ADVANCES IN SWARM INTELLIGENCE》 * |
刘清华,等;: "基于遗传蚁群算法的CMP线程调度方法", 《计算机工程与设计》 * |
尚亚菲,等;: "引入惯性权重的烟花算法", 《内蒙古工业大学学报》 * |
曹磊,等;: "应用混沌烟花算法求解置换流水车间问题", 《计算机应用与软件》 * |
谭营,等;: "烟花算法研究进展", 《智能系统学报》 * |
Cited By (18)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108415774A (en) * | 2018-02-27 | 2018-08-17 | 天津大学 | A kind of Method for HW/SW partitioning based on improvement fireworks algorithm |
CN109034560A (en) * | 2018-07-06 | 2018-12-18 | 昆明理工大学 | A kind of Optimization Scheduling of tobacco cutting process |
CN109858617A (en) * | 2019-02-20 | 2019-06-07 | 哈尔滨工程大学 | A kind of fireworks calculation method optimizing initialization mode |
CN110097267A (en) * | 2019-04-19 | 2019-08-06 | 天津大学 | A kind of multiple target multi-robot Task Allocation based on improvement fireworks algorithm |
CN110533152A (en) * | 2019-08-12 | 2019-12-03 | 哈尔滨工程大学 | A kind of method for scheduling task based on improvement fireworks algorithm under CMP architecture |
US20210373946A1 (en) * | 2019-09-23 | 2021-12-02 | Soochow University | Method for scheduling of service processes in hybrid cloud |
CN111124633A (en) * | 2019-12-06 | 2020-05-08 | 上海交通大学 | A Task Scheduling Method for Earth-Moon Relay Satellites Considering Detector Storage Constraints |
CN111124633B (en) * | 2019-12-06 | 2023-05-30 | 上海交通大学 | Ground-month relay satellite task scheduling method considering detector storage limit |
CN112257297A (en) * | 2020-11-27 | 2021-01-22 | 西南交通大学 | Welding shop comprehensive scheduling method based on improved firework algorithm |
CN112257297B (en) * | 2020-11-27 | 2021-06-25 | 西南交通大学 | Welding shop comprehensive scheduling method based on improved firework algorithm |
CN113505975A (en) * | 2021-06-18 | 2021-10-15 | 宁波沙塔信息技术有限公司 | Order insertion and scheduling method based on genetic algorithm and firework algorithm |
CN113505974A (en) * | 2021-06-18 | 2021-10-15 | 宁波沙塔信息技术有限公司 | Multi-target scheduling method based on firework algorithm and genetic algorithm |
CN113505975B (en) * | 2021-06-18 | 2024-04-09 | 宁波沙塔信息技术有限公司 | Plug sheet scheduling method based on genetic algorithm and firework algorithm |
CN113505974B (en) * | 2021-06-18 | 2024-04-09 | 宁波沙塔信息技术有限公司 | Multi-target scheduling method based on firework algorithm and genetic algorithm |
CN113690926A (en) * | 2021-07-09 | 2021-11-23 | 南昌大学 | Method for optimizing control parameter setting of single-phase inverter by improving firework algorithm |
CN113690926B (en) * | 2021-07-09 | 2023-08-29 | 南昌大学 | An improved firework algorithm to optimize single-phase inverter control parameter tuning method |
CN115034633A (en) * | 2022-06-20 | 2022-09-09 | 石河子大学 | A Process Sequence Planning Method Based on Precursor Diagram and Intelligent Fireworks Algorithm |
CN115454568A (en) * | 2022-08-31 | 2022-12-09 | 山东财经大学 | A Cloud Computing Resource Scheduling Method Based on Improved Firework Algorithm |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107704319A (en) | Improve the CMP method for scheduling task of fireworks algorithm | |
Chen et al. | A WOA-based optimization approach for task scheduling in cloud computing systems | |
US10482380B2 (en) | Conditional parallel processing in fully-connected neural networks | |
Caruana et al. | A MapReduce based parallel SVM for large scale spam filtering | |
JP2020091858A (en) | Scheduling task graph operations | |
Rodzin | Smart dispatching and metaheuristic swarm flow algorithm | |
CA3135137A1 (en) | Information processing device, information processing system, information processing method, storage medium and program | |
CN110533152A (en) | A kind of method for scheduling task based on improvement fireworks algorithm under CMP architecture | |
Zhang et al. | Dvfo: Learning-based dvfs for energy-efficient edge-cloud collaborative inference | |
Sudharsan et al. | Imbal-ol: Online machine learning from imbalanced data streams in real-world iot | |
CN111027665A (en) | Cloud manufacturing scheduling method based on improved chaotic bat swarm algorithm | |
Li et al. | MCMC: Multi-constrained model compression via one-stage envelope reinforcement learning | |
Wang et al. | A modified cuckoo search algorithm for flow shop scheduling problem with blocking | |
CN115001978B (en) | An intelligent mapping method for cloud tenant virtual networks based on reinforcement learning model | |
CN111260036B (en) | Neural network acceleration method and device | |
CN108415774A (en) | A kind of Method for HW/SW partitioning based on improvement fireworks algorithm | |
CN103440540A (en) | Parallelization method of artificial immune optimization model for spatial layout of land utilization | |
Kalra et al. | Application of intelligent water drops algorithm to workflow scheduling in cloud environment | |
Jingmei et al. | A CMP thread scheduling strategy based on improved firework algorithm | |
Zhang et al. | Cloud computing resources scheduling optimisation based on improved bat algorithm via wavelet perturbations | |
Yang et al. | Research on cloud computing task scheduling based on evolutionary algorithm | |
Liu et al. | Study of binary artificial bee colony algorithm based on particle swarm optimization | |
CN112070223A (en) | Model parallel method based on Tensorflow framework | |
Wang et al. | Reinforcement Learning Based Quantization Strategy Optimal Assignment Algorithm for Mixed Precision. | |
Yoginath et al. | SpecSims: A Scalable Speculative Tree-based Simulation Cloning Framework For Finite Memory Machines |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20180216 |
|
RJ01 | Rejection of invention patent application after publication |