cloudsim 学习笔记 实例5(6)

时间:2026-01-16

cloudsim 学习笔记 实例

SAN devices by now

DatacenterCharacteristics characteristics = new DatacenterCharacteristics(

arch, os, vmm, hostList, time_zone, cost, costPerMem, costPerStorage, costPerBw);

// 6. Finally, we need to create a PowerDatacenter object. 【创建数据中心对象】 Datacenter datacenter = null;

try {

datacenter = new Datacenter(name, characteristics, new VmAllocationPolicySimple(hostList), storageList, 0);

} catch (Exception e) {

e.printStackTrace();

}

return datacenter;

}

【创建代理,可以根据特定需求发展自己的代理协议来提交虚拟机和云任务】

//We strongly encourage users to develop their own broker policies, to submit vms and cloudlets according

//to the specific rules of the simulated scenario

private static DatacenterBroker createBroker(int id){ 【int id 相比例子四多出来的】

DatacenterBroker broker = null;

try {

broker = new DatacenterBroker("Broker"+id);

} catch (Exception e) {

e.printStackTrace();

return null;

}

return broker;

}

/**

* Prints the Cloudlet objects

* @param list list of Cloudlets

*/ 【打印云任务对象】

private static void printCloudletList(List<Cloudlet> list) {

int size = list.size();

Cloudlet cloudlet;

String indent = " ";

Log.printLine();

cloudsim 学习笔记 实例5(6).doc 将本文的Word文档下载到电脑

精彩图片

热门精选

大家正在看

× 游客快捷下载通道(下载后可以自由复制和排版)

限时特价:4.9 元/份 原价:20元

支付方式:

开通VIP包月会员 特价:19元/月

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:fanwen365 QQ:370150219