This function is pretty tricky....
I'm using this to find expected completion time of a a particular cloudlet on a machine.
If there is not cloudlet assigned to it... it returns 0...
else it returns .2
huh...
everything traces back to cloudletScheduler... which seems to be an interface with no implementation.
Have to find out what class implements this....
oh... this is an abstract class... so if it is timeshared, then we have to look into that
public double updateVmProcessing(double currentTime,
List<Double> mipsShare)
Updates the processing of cloudlets running on this VM.
- Parameters:
currentTime- current simulation timemipsShare- array with MIPS share of each Pe available to the scheduler- Returns:
- time predicted completion time of the earliest finishing cloudlet, or 0 if there is no next events
I think I found out why it returns .2...Why would they code it like that :(Now I have to write my own implementation for this and override it...In https://github.com/marcbux/dynamiccloudsim/blob/master/src/org/cloudbus/cloudsim/CloudletSchedulerTimeShared.java
// estimate finish time of cloudlets for (ResCloudlet rcl : getCloudletExecList()) { double estimatedFinishTime = currentTime + (rcl.getRemainingCloudletLength() / (getCapacity(mipsShare) * rcl.getNumberOfPes())); if (estimatedFinishTime - currentTime < 0.1) { estimatedFinishTime = currentTime + 0.1; } if (estimatedFinishTime < nextEvent) { nextEvent = estimatedFinishTime; }
No comments:
Post a Comment