问题描述
- 请问cloudsim怎么实现并行呢?
- 我实现的是2个分支的算法,在datacenterbroker里面写了两个调度的算法,在测试的java类里面要怎么写才能让这两个分支同时运行呢?
我就是给任务设classtype的值然后分别把一样的放到两个cloudletlist里面
求解~
解决方案
broker1.submitCloudletList(cloudletList1); broker2.submitCloudletList(cloudletList2); broker1.bindCloudletsToVmsNeed(); //测试优先级短作业优先算法 broker2.bindCloudletsToVmsGreedy(); //测试贪心算法 CloudSim.startSimulation(); List<Cloudlet> newList1=broker1.getCloudletReceivedList(); List<Cloudlet> newList2=broker2.getCloudletReceivedList(); CloudSim.stopSimulation(); printCloudletList(newList1); printCloudletList(newList2); datacenter0.printDebts(); Log.printLine(""TestAllovation finish""); 为啥这样子output输出都没了...
解决方案二:
[VmScheduler.vmCreate] Allocation of VM #2 to Host #0 failed by MIPS
[VmScheduler.vmCreate] Allocation of VM #5 to Host #0 failed by MIPS
[VmScheduler.vmCreate] Allocation of VM #1 to Host #0 failed by MIPS
[VmScheduler.vmCreate] Allocation of VM #4 to Host #0 failed by MIPS
[VmScheduler.vmCreate] Allocation of VM #0 to Host #0 failed by MIPS
[VmScheduler.vmCreate] Allocation of VM #3 to Host #0 failed by MIPS
[VmScheduler.vmCreate] Allocation of VM #2 to Host #0 failed by MIPS
[VmScheduler.vmCreate] Allocation of VM #5 to Host #0 failed by MIPS
[VmScheduler.vmCreate] Allocation of VM #1 to Host #0 failed by MIPS
[VmScheduler.vmCreate] Allocation of VM #4 to Host #0 failed by MIPS
[VmScheduler.vmCreate] Allocation of VM #0 to Host #0 failed by MIPS
[VmScheduler.vmCreate] Allocation of VM #3 to Host #0 failed by MIPS
报错这样要怎么解决呢