/** * Get the estimated completion time of a given cloudlet. * * @param rcl the cloudlet * @param time the time * @return the estimated finish time */ public double getEstimatedFinishTime(ResCloudlet rcl, double time) { return time + ((rcl.getRemainingCloudletLength()) / getTotalCurrentAllocatedMipsForCloudlet(rcl, time)); }
/** * Get estimated cloudlet completion time. * * @param rcl the rcl * @param time the time * @return the estimated finish time */ public double getEstimatedFinishTime(ResCloudlet rcl, double time) { return time + ((rcl.getRemainingCloudletLength()) / getTotalCurrentAllocatedMipsForCloudlet(rcl, time)); }
/** * Gets the estimated finish time of a cloudlet. * * @param rcl a cloudlet submitted to a cloud resource for processing. * @param time the current time. * @since 1.0 */ @Override public double getEstimatedFinishTime(ResCloudlet rcl, double time) { return time + ((rcl.getRemainingCloudletLength()) / getTotalMips()); }
@Override public boolean cloudletPause(int cloudletId) { boolean found = false; int position = 0; for (ResCloudlet rcl : getCloudletExecList()) { if (rcl.getCloudletId() == cloudletId) { found = true; break; } position++; } if (found) { // remove cloudlet from the exec list and put it in the paused list ResCloudlet rcl = getCloudletExecList().remove(position); if (rcl.getRemainingCloudletLength() == 0) { cloudletFinish(rcl); } else { rcl.setCloudletStatus(Cloudlet.PAUSED); getCloudletPausedList().add(rcl); } return true; } return false; }
if (rcl.getRemainingCloudletLength() == 0) { cloudletFinish(rcl); } else {
if (rgl.getRemainingCloudletLength() == 0) { cloudletFinish(rgl); } else { if (rgl.getRemainingCloudletLength() == 0) { cloudletFinish(rgl); } else {
if (rgl.getRemainingCloudletLength() == 0.0) { cloudletFinish(rgl); } else { if (rgl.getRemainingCloudletLength() == 0.0) { cloudletFinish(rgl); } else {
@Override public double cloudletResume(int cloudletId) { boolean found = false; int position = 0; // look for the cloudlet in the paused list for (ResCloudlet rcl : getCloudletPausedList()) { if (rcl.getCloudletId() == cloudletId) { found = true; break; } position++; } if (found) { ResCloudlet rgl = getCloudletPausedList().remove(position); rgl.setCloudletStatus(Cloudlet.INEXEC); getCloudletExecList().add(rgl); // calculate the expected time for cloudlet completion // first: how many PEs do we have? double remainingLength = rgl.getRemainingCloudletLength(); double estimatedFinishTime = CloudSim.clock() + (remainingLength / (getCapacity(getCurrentMipsShare()) * rgl.getNumberOfPes())); return estimatedFinishTime; } return 0.0; }
List<ResCloudlet> toRemove = new ArrayList<>(); for (ResCloudlet rcl : getCloudletExecList()) { long remainingLength = rcl.getRemainingCloudletLength(); if (remainingLength == 0) {// finished: remove from the list toRemove.add(rcl); + (rcl.getRemainingCloudletLength() / (getCapacity(mipsShare) * rcl.getNumberOfPes())); if (estimatedFinishTime - currentTime < CloudSim.getMinTimeBetweenEvents()) { estimatedFinishTime = currentTime + CloudSim.getMinTimeBetweenEvents();
if (rcl.getRemainingCloudletLength() == 0) { // finished: remove from the list cloudletsToFinish.add(rcl); } else { // not finish: estimate the finish time
if (rcl.getRemainingCloudletLength() == 0) { // finished: remove from the list cloudletsToFinish.add(rcl); continue;
List<ResCloudlet> toRemove = new ArrayList<ResCloudlet>(); for (ResCloudlet rcl : getCloudletExecList()) { long remainingLength = rcl.getRemainingCloudletLength(); if (remainingLength == 0) {// finished: remove from the list toRemove.add(rcl); + (rcl.getRemainingCloudletLength() / (getCapacity(mipsShare) * rcl.getNumberOfPes())); if (estimatedFinishTime - currentTime < CloudSim.getMinTimeBetweenEvents()) { estimatedFinishTime = currentTime + CloudSim.getMinTimeBetweenEvents();
double remainingLength = rgl.getRemainingCloudletLength(); double estimatedFinishTime = CloudSim.clock() + (remainingLength / (getCapacity(getCurrentMipsShare()) * rgl.getNumberOfPes()));
for (ResCloudlet rcl : getCloudletExecList()) { if (rcl.getRemainingCloudletLength() == 0) { toRemove.add(rcl); cloudletFinish(rcl); double remainingLength = rcl.getRemainingCloudletLength(); double estimatedFinishTime = currentTime + (remainingLength / (capacity * rcl.getNumberOfPes())); if (estimatedFinishTime - currentTime < CloudSim.getMinTimeBetweenEvents()) {
long size = rcl.getRemainingCloudletLength(); size *= rcl.getNumberOfPes(); rcl.getCloudlet().setCloudletLength(size); capacity /= cpus; long remainingLength = rcl.getRemainingCloudletLength(); double estimatedFinishTime = CloudSim.clock() + (remainingLength / (capacity * rcl.getNumberOfPes())); rcl.setCloudletStatus(Cloudlet.QUEUED); long size = rcl.getRemainingCloudletLength(); size *= rcl.getNumberOfPes(); rcl.getCloudlet().setCloudletLength(size);
long size = rcl.getRemainingCloudletLength(); size *= rcl.getNumberOfPes(); rcl.getCloudlet().setCloudletLength(size); capacity /= cpus; long remainingLength = rcl.getRemainingCloudletLength(); double estimatedFinishTime = CloudSim.clock() + (remainingLength / (capacity * rcl.getNumberOfPes())); rcl.setCloudletStatus(Cloudlet.QUEUED); long size = rcl.getRemainingCloudletLength(); size *= rcl.getNumberOfPes(); rcl.getCloudlet().setCloudletLength(size);
if (rcl.getCloudletId() == cloudletId) { getCloudletExecList().remove(rcl); if (rcl.getRemainingCloudletLength() == 0) { cloudletFinish(rcl); } else {
if (rcl.getCloudletId() == cloudletId) { getCloudletExecList().remove(rcl); if (rcl.getRemainingCloudletLength() == 0.0) { cloudletFinish(rcl); } else {
if (rcl.getRemainingCloudletLength() == 0) { cloudletFinish(rcl); } else {
if (rcl.getRemainingCloudletLength() == 0) { cloudletFinish(rcl); } else {