Commit d4f7bbbe authored by rodrigo.calheiros's avatar rodrigo.calheiros

Fix in Datacenter: one initial update step was been skipped, what caused

maufunctions in the schedulers.
parent 07dc14dd
...@@ -55,7 +55,7 @@ public class CloudSimExample6 { ...@@ -55,7 +55,7 @@ public class CloudSimExample6 {
//VM Parameters //VM Parameters
long size = 10000; //image size (MB) long size = 10000; //image size (MB)
int ram = 512; //vm memory (MB) int ram = 512; //vm memory (MB)
int mips = 250; int mips = 1000;
long bw = 1000; long bw = 1000;
int pesNumber = 1; //number of cpus int pesNumber = 1; //number of cpus
String vmm = "Xen"; //VMM name String vmm = "Xen"; //VMM name
...@@ -80,7 +80,7 @@ public class CloudSimExample6 { ...@@ -80,7 +80,7 @@ public class CloudSimExample6 {
LinkedList<Cloudlet> list = new LinkedList<Cloudlet>(); LinkedList<Cloudlet> list = new LinkedList<Cloudlet>();
//cloudlet parameters //cloudlet parameters
long length = 4000; long length = 1000;
long fileSize = 300; long fileSize = 300;
long outputSize = 300; long outputSize = 300;
int pesNumber = 1; int pesNumber = 1;
......
...@@ -911,7 +911,9 @@ public class Datacenter extends SimEntity { ...@@ -911,7 +911,9 @@ public class Datacenter extends SimEntity {
protected void updateCloudletProcessing() { protected void updateCloudletProcessing() {
//Log.printLine(CloudSim.clock()+": PowerDatacenter #: updating cloudlet processing......................................."); //Log.printLine(CloudSim.clock()+": PowerDatacenter #: updating cloudlet processing.......................................");
//if some time passed since last processing //if some time passed since last processing
if (CloudSim.clock() > this.getLastProcessTime()+0.1) { //R: for term is to allow loop at simulation start. Otherwise, one initial
// simulation step is skipped and schedulers are not properly initialized
if (CloudSim.clock() < 0.11 || CloudSim.clock() > this.getLastProcessTime()+0.1) {
List<? extends Host> list = getVmAllocationPolicy().getHostList(); List<? extends Host> list = getVmAllocationPolicy().getHostList();
double smallerTime = Double.MAX_VALUE; double smallerTime = Double.MAX_VALUE;
//for each host... //for each host...
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment