本文整理汇总了Java中org.cloudbus.cloudsim.VmSchedulerTimeSharedOverSubscription类的典型用法代码示例。如果您正苦于以下问题:Java VmSchedulerTimeSharedOverSubscription类的具体用法?Java VmSchedulerTimeSharedOverSubscription怎么用?Java VmSchedulerTimeSharedOverSubscription使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
VmSchedulerTimeSharedOverSubscription类属于org.cloudbus.cloudsim包,在下文中一共展示了VmSchedulerTimeSharedOverSubscription类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createHostList
import org.cloudbus.cloudsim.VmSchedulerTimeSharedOverSubscription; //导入依赖的package包/类
/**
* Creates the host list.
*
* @param hostsNumber the hosts number
*
* @return the list< power host>
*/
public static List<PowerHost> createHostList(int hostsNumber) {
List<PowerHost> hostList = new ArrayList<PowerHost>();
for (int i = 0; i < hostsNumber; i++) {
int hostType = i % Constants.HOST_TYPES;
List<Pe> peList = new ArrayList<Pe>();
for (int j = 0; j < Constants.HOST_PES[hostType]; j++) {
peList.add(new Pe(j, new PeProvisionerSimple(Constants.HOST_MIPS[hostType])));
}
hostList.add(new PowerHostUtilizationHistory(
i,
new RamProvisionerSimple(Constants.HOST_RAM[hostType]),
new BwProvisionerSimple(Constants.HOST_BW),
Constants.HOST_STORAGE,
peList,
new VmSchedulerTimeSharedOverSubscription(peList),
Constants.HOST_POWER[hostType]));
}
return hostList;
}
示例2: createHostList
import org.cloudbus.cloudsim.VmSchedulerTimeSharedOverSubscription; //导入依赖的package包/类
/**
* Creates the host list.
*
* @param hostsNumber the hosts number
*
* @return the list< power host>
*/
public static List<PowerHost> createHostList(int hostsNumber) {
List<PowerHost> hostList = new ArrayList<PowerHost>();
for (int i = 0; i < hostsNumber; i++) {
int hostType = i % Constants.HOST_TYPES;
List<Pe> peList = new ArrayList<Pe>();
//HOST_PES 每台物理机中的处理单元个数
for (int j = 0; j < Constants.HOST_PES[hostType]; j++) {
peList.add(new Pe(j, new PeProvisionerSimple(Constants.HOST_MIPS[hostType])));
}
hostList.add(new PowerHostUtilizationHistory(
i,
new RamProvisionerSimple(Constants.HOST_RAM[hostType]),
new BwProvisionerSimple(Constants.HOST_BW),
Constants.HOST_STORAGE,
peList,
new VmSchedulerTimeSharedOverSubscription(peList),
// 设置能耗模型
Constants.HOST_POWER[hostType]));
}
return hostList;
}
示例3: createHostList
import org.cloudbus.cloudsim.VmSchedulerTimeSharedOverSubscription; //导入依赖的package包/类
/**
* Creates the host list.
*
* @param hostsNumber
* the hosts number
*/
public void createHostList(int hostsNumber) {
for (int i = 1; i <= hostsNumber; i++) {
hostList.add(new PowerHost(i, new RamProvisionerSimple(MyConstants.HOST_RAM), new BwProvisionerSimple(
MyConstants.HOST_BW), MyConstants.HOST_STORAGE, peList, new VmSchedulerTimeSharedOverSubscription(
peList), MyConstants.HOST_POWER_MODEL));
}
}