How to resume the paused cloudlet in a VM

  • To resume the cloudlet, first check whether the cloudlets in the execution list are completed and check whether the cloudlet paused list has any cloudlets in its.
  • If any cloudlet found in paused list means, it will removed from the list and again added in the Execution list by setting the INEXEC tag to that cloudlet.
    public double updateVmProcessing(double currentTime, List <Double> mipsShare) {
    …..;
    …….;
    if(getCloudletExecList().size()==0&& getCloudletPausedList().size()>0 ){
    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);
    ……..;
    ………………..;
    }
    }
    }