当前位置: 首页>>代码示例>>Java>>正文


Java VmSchedulerTimeSharedOverSubscription类代码示例

本文整理汇总了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;
}
 
开发者ID:Udacity2048,项目名称:CloudSimDisk,代码行数:29,代码来源:Helper.java

示例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;
}
 
开发者ID:demiaowu,项目名称:annotation-of-cloudsim3.0.3,代码行数:31,代码来源:Helper.java

示例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));
	}
}
 
开发者ID:Udacity2048,项目名称:CloudSimDisk,代码行数:14,代码来源:Helper.java


注:本文中的org.cloudbus.cloudsim.VmSchedulerTimeSharedOverSubscription类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。