@Override public double getTotalUtilizationOfCpu(double time) { double totalUtilization = 0; for (ResCloudlet gl : getCloudletExecList()) { totalUtilization += gl.getCloudlet().getUtilizationOfCpu(time); } return totalUtilization; }
@Override public double getTotalUtilizationOfCpu(double time) { /* * @todo */ double totalUtilization = 0; for (ResCloudlet gl : getCloudletExecList()) { totalUtilization += gl.getCloudlet().getUtilizationOfCpu(time); } return totalUtilization; }
@Override public double getTotalUtilizationOfCpu(double time) { double totalUtilization = 0; for (ResCloudlet rcl : getCloudletExecList()) { totalUtilization += rcl.getCloudlet().getUtilizationOfCpu(time); } return totalUtilization; }
/** * 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)); }
/** * Gets the utilization percentage of cpu. * * @param time the time * @return the utilization of cpu */ public double getUtilizationOfCpu(final double time) { return getUtilizationModelCpu().getUtilization(time); }
/** * Gets the utilization percentage of bw. * * @param time the time * @return the utilization of bw */ public double getUtilizationOfBw(final double time) { return getUtilizationModelBw().getUtilization(time); }
@Override public double getTotalCurrentRequestedMipsForCloudlet(ResCloudlet rcl, double time) { return rcl.getCloudlet().getUtilizationOfCpu(time) * getTotalMips(); }
@Override public boolean contains(File file) { boolean result = false; if (!isFileValid(file, "contains()")) { return result; } result = contains(file.getName()); return result; }
/** * Gets the MIPS share of each Pe that is allocated to a given VM. * * @param vm the vm * @return an array containing the amount of MIPS of each pe that is available to the VM * @pre $none * @post $none */ public List<Double> getAllocatedMipsForVm(Vm vm) { return getVmScheduler().getAllocatedMipsForVm(vm); }
/** * Gets the total free MIPS available at the host. * * @return the free mips */ public double getAvailableMips() { return getVmScheduler().getAvailableMips(); }
/** * Gets total CPU utilization percentage of all clouddlets running on this VM at the given time * * @param time the time * @return total utilization percentage */ public double getTotalUtilizationOfCpu(double time) { return getCloudletScheduler().getTotalUtilizationOfCpu(time); }
/** * Gets the host list. * * @return the host list */ @SuppressWarnings("unchecked") public <T extends Host> List<T> getHostList() { return (List<T>) getCharacteristics().getHostList(); }
/** * Allocates PEs for a VM. * * @param vm the vm * @param mipsShare the list of MIPS share to be allocated to the VM * @return $true if this policy allows a new VM in the host, $false otherwise * @pre $none * @post $none */ public boolean allocatePesForVm(Vm vm, List<Double> mipsShare) { return getVmScheduler().allocatePesForVm(vm, mipsShare); }
@Override public double deleteFile(File file) { double time = super.deleteFile(file); time += networkLatency; time += file.getSize() * bandwidth; return time; }
/** * Releases PEs allocated to a VM. * * @param vm the vm * @pre $none * @post $none */ public void deallocatePesForVm(Vm vm) { getVmScheduler().deallocatePesForVm(vm); }
/** * Gets the total allocated MIPS for a VM along all its PEs. * * @param vm the vm * @return the allocated mips for vm */ public double getTotalAllocatedMipsForVm(Vm vm) { return getVmScheduler().getTotalAllocatedMipsForVm(vm); }
@Override public double addReservedFile(File file) { double time = super.addReservedFile(file); time += networkLatency; time += file.getSize() * bandwidth; return time; }
/** * Returns the maximum available MIPS among all the PEs of the host. * * @return max mips */ public double getMaxAvailableMips() { return getVmScheduler().getMaxAvailableMips(); }