Amazing technological breakthrough possible @S-Logix pro@slogix.in

Office Address

  • #5, First Floor, 4th Street Dr. Subbarayan Nagar Kodambakkam, Chennai-600 024 Landmark : Samiyar Madam
  • pro@slogix.in
  • +91- 81240 01111

Social List

How to cancel the execution of a particular cloudlet on VM?

  • To cancel the cloudlets running in a VM, in Cloudlet scheduler class in “updateVmsProcessing()” method, the cloudlet chosen to cancel its execution is first removed from the execution list and added in the canceled list.
  • public double updateVmProcessing(double currentTime, List<Double> mipsShare) {
    …..;
    …….;
    for (ResCloudlet rcl : getCloudletExecList()) { //Cloudlet Execution list;
    ** Let the ID of the cloudlet chosen to cancel is
    int cloudletId=/any id of the cloudlet to cancel;
    if ( (getCloudletExecList().get(i).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.CANCELED);
    }
    }