Class PeProvisionerSimple
java.lang.Object
org.cloudbus.cloudsim.provisioners.ResourceProvisionerAbstract
org.cloudbus.cloudsim.provisioners.ResourceProvisionerSimple
org.cloudbus.cloudsim.provisioners.PeProvisionerSimple
- All Implemented Interfaces:
PeProvisioner
,ResourceProvisioner
A best-effort
PeProvisioner
policy used by a Host
to provide virtual PEs to VMs from its physical PEs:
- if there is available MIPS on the physical PE, it allocates to a virtual PE;
- otherwise, it fails.
Each host's PE must have its own instance of a PeProvisioner. When extending this class, care must be taken to guarantee that the field availableMips will always contain the amount of free MIPS available for future allocations.
- Since:
- CloudSim Toolkit 2.0
- Author:
- Anton Beloglazov, Manoel Campos da Silva Filho
-
Field Summary
Fields inherited from interface org.cloudbus.cloudsim.provisioners.PeProvisioner
NULL
Fields inherited from interface org.cloudbus.cloudsim.provisioners.ResourceProvisioner
NULL
-
Constructor Summary
ConstructorDescriptionInstantiates a new PeProvisionerSimple.Instantiates a new PeProvisionerSimple for a givenPe
. -
Method Summary
Modifier and TypeMethodDescriptiondouble
Gets the utilization percentage of the Pe in scale from 0 to 1.void
Sets thePe
that this provisioner will manage.Methods inherited from class org.cloudbus.cloudsim.provisioners.ResourceProvisionerSimple
allocateResourceForVm, allocateResourceForVm, deallocateResourceForVm, isSuitableForVm, isSuitableForVm
Methods inherited from class org.cloudbus.cloudsim.provisioners.ResourceProvisionerAbstract
getAllocatedResourceForVm, getAvailableResource, getCapacity, getPmResource, getTotalAllocatedResource, getVmResourceFunction, setResources
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.cloudbus.cloudsim.provisioners.PeProvisioner
allocateResourceForVm, deallocateResourceForVm, getAllocatedResourceForVm, getTotalAllocatedResource
Methods inherited from interface org.cloudbus.cloudsim.provisioners.ResourceProvisioner
allocateResourceForVm, getAvailableResource, getCapacity, getPmResource, isSuitableForVm, isSuitableForVm, setResources
-
Constructor Details
-
Method Details
-
setPe
Description copied from interface:PeProvisioner
Sets thePe
that this provisioner will manage.- Specified by:
setPe
in interfacePeProvisioner
- Parameters:
pe
- the Pe to set
-
getUtilization
public double getUtilization()Description copied from interface:PeProvisioner
Gets the utilization percentage of the Pe in scale from 0 to 1.- Specified by:
getUtilization
in interfacePeProvisioner
- Returns:
- the utilization percentage from 0 to 1
-