✅作者简介:热爱科研的Matlab仿真开发者,修心和技术同步精进,matlab项目合作可私信。

🍎个人主页:Matlab科研工作室

🍊个人信条:格物致知。

⛄ 内容介绍

Distributed systems such as Grid- and Cloud Computing provision web services to their users in all of the world. One of the most important concerns which service providers encounter is to handle total cost of ownership (TCO). The large part of TCO is related to power consumption due to inefficient resource management. Task scheduling module as a key component can has drastic impact on both user response time and underlying resource utilization. Such heterogeneous distributed systems have interconnected different processors with different speed and architecture. Also, the user application which is typically presented in the form of directed acyclic graph (DAG) must be executed on this type of parallel processing systems. Since task scheduling in such complicated systems belongs to NP-hard problems, existing  heuristic approaches are no longer efficient. Therefore, the trend is to apply hybrid metaheuristic approaches. In this paper, we extend a meta-heuristic shuffled genetic-based task  scheduling algorithm to minimize total execution time, makespan, of user application. In this regard, we take benefit of other heuristics such as Heterogeneous Earliest Finish Time (HEFT) approach to generate smart initial population by applying a new shuffle operator which makes a fortune to explore feasible and promising individuals in the search space. We also conduct other genetic operators in right way to produce final near to optimal solution. To reach concrete results we have conducted several scenarios. Our proposed algorithm outperforms in term of average makespan compared with other existing approaches such as HEFT versions and QGARAR.

基于混洗遗传算法求解分布式系统中的任务调度附matlab代码_ci

基于混洗遗传算法求解分布式系统中的任务调度附matlab代码_ci_02

基于混洗遗传算法求解分布式系统中的任务调度附matlab代码_Distributed_03

基于混洗遗传算法求解分布式系统中的任务调度附matlab代码_ci_04

⛄ 部分代码

%% Shuffled Genetic Algorithm for Task Scheduling based on:

% Hosseini, M. (2018). A new Shuffled Genetic-based Task 

%Scheduling Algorithm in Heterogeneous Distributed Systems.

% Journal of Advances in Computer Research, 9(4), 19-36.

clc

clear

close all

%%

global nVM nTask DAG extP0 extP1 extP2 c

nVM=3; % Number of Hetergenous Virtual Machines

c=ones(nVM)-eye(nVM);  % communication time between servers

nTask=11; % Number of Tasks

DAG=[0 12 14 0 0 0 0 0 0 0 0  % Directed Acyclic Graph

     0 0 0 8 15 11 0 0 0 0 0

     0 0 0 0 0 0 13 0 0 0 0

     0 0 0 0 0 0 0 11 0 0 0

     0 0 0 0 0 0 0 8 0 0 0

     0 0 0 0 0 0 0 0 7 12 0

     0 0 0 0 0 0 0 0 0 14 0

     0 0 0 0 0 0 0 0 0 0 15

     0 0 0 0 0 0 0 0 0 0 7

     0 0 0 0 0 0 0 0 0 0 10

     0 0 0 0 0 0 0 0 0 0 0];

extP0=[7 10 5 6 10 11 12 10 8 15 8]; %Execution Time on Processor1

extP1=[9 9 7 8 8 13 15 13 9 11 9];

extP2=[8 14 6 7 6 15 18 7 10 13 10];

Wbar=[8 11 6 7 8 13 15 10 9 13 9]; % Average Computation Cost

npop=20; % population size

maxIter= 100; % maximum number of generation

%% The first generation:

populatinotallow=INITp(npop);

%% Genetic optimization:

for iter=1:maxIter

    for i=1:npop

        cost(i)=MAPPER(population{i});

        fitness(i)=1/cost(i);

    end

    for i=1:npop

        probs(i)=fitness(i)/sum(fitness);

    end

    [val,idx]=sort(cost);

    best=population{idx(1)};

    min_cost=val(1);

    disp(['Generation ',num2str(iter),' ... min cost= ',num2str(min_cost)]);

    plot(iter,min_cost,'ko');

    hold on

    pause(0.000001)

    for i=1:npop

        if i<= 0.2 * npop

            newPopulation{i}=population{idx(i)};

        else

            id1=randsrc(1,1,[1:npop;probs]); % Roullete wheel

            id2=randsrc(1,1,[1:npop;probs]);

            parent1=population{id1};

            parent2=population{id2};

            newPopulation{i}=crossover_mutation(parent1,parent2);

        end

    end

    populatinotallow=newPopulation;

end

final_solutinotallow=best

makespan_genetic=val(1)

makespan_Level=MAPPER(1:11)

makespan_rankd=MAPPER([1 2 3 4 7 6 5 8 9 10 11])

makespan_ranku=MAPPER([1 3 2 7 6 4 5 8 10 9 11])

⛄ 运行结果

基于混洗遗传算法求解分布式系统中的任务调度附matlab代码_sed_05

⛄ 参考文献

Hosseini, M. (2018). A new Shuffled Genetic-based Task  Scheduling Algorithm in Heterogeneous Distributed Systems. Journal of Advances in Computer Research, 9(4), 19-36.

⛄ 完整代码

❤️部分理论引用网络文献,若有侵权联系博主删除
❤️ 关注我领取海量matlab电子书和数学建模资料