Class VmSchedulerSpaceShared
java.lang.Object
org.cloudbus.cloudsim.schedulers.vm.VmSchedulerAbstract
org.cloudbus.cloudsim.schedulers.vm.VmSchedulerSpaceShared
- All Implemented Interfaces:
VmScheduler
public class VmSchedulerSpaceShared extends VmSchedulerAbstract
VmSchedulerSpaceShared is a VMM allocation policy that allocates one or more
PEs from a host to a Virtual Machine Monitor (VMM), and doesn't allow sharing
of PEs. The allocated PEs will be used until the VM finishes running. If
there is no enough free PEs as required by a VM, or whether the available PEs
doesn't have enough capacity, the allocation fails. In the case of fail, no
PE is allocated to the requesting VM.
- Since:
- CloudSim Toolkit 1.0
- Author:
- Rodrigo N. Calheiros, Anton Beloglazov, Manoel Campos da Silva Filho
-
Field Summary
Fields inherited from class org.cloudbus.cloudsim.schedulers.vm.VmSchedulerAbstract
DEFAULT_VM_MIGRATION_CPU_OVERHEAD
-
Constructor Summary
Constructors Constructor Description VmSchedulerSpaceShared()
Creates a space-shared VM scheduler.VmSchedulerSpaceShared(double vmMigrationCpuOverhead)
Creates a space-shared VM scheduler, defining a CPU overhead for VM migration. -
Method Summary
Modifier and Type Method Description boolean
allocatePesForVmInternal(Vm vm, java.util.List<java.lang.Double> requestedMips)
protected void
deallocatePesFromVmInternal(Vm vm, int pesToRemove)
protected boolean
isSuitableForVmInternal(Vm vm, java.util.List<java.lang.Double> requestedMips)
Methods inherited from class org.cloudbus.cloudsim.schedulers.vm.VmSchedulerAbstract
allocatePesForVm, allocatePesForVm, deallocatePesForAllVms, deallocatePesFromVm, deallocatePesFromVm, getAllocatedMips, getAllocatedMipsMap, getHost, getMaxCpuUsagePercentDuringOutMigration, getMipsShareRequestedReduced, getPeCapacity, getRequestedMips, getRequestedMipsMap, getTotalAllocatedMipsForVm, getTotalAvailableMips, getVmMigrationCpuOverhead, getWorkingPeList, isSuitableForVm, isSuitableForVm, percentOfMipsToRequest, removePesFromMap, setHost
-
Constructor Details
-
VmSchedulerSpaceShared
public VmSchedulerSpaceShared()Creates a space-shared VM scheduler. -
VmSchedulerSpaceShared
public VmSchedulerSpaceShared(double vmMigrationCpuOverhead)Creates a space-shared VM scheduler, defining a CPU overhead for VM migration.- Parameters:
vmMigrationCpuOverhead
- the percentage of Host's CPU usage increase when a VM is migrating in or out of the Host. The value is in scale from 0 to 1 (where 1 is 100%).
-
-
Method Details
-
isSuitableForVmInternal
- Specified by:
isSuitableForVmInternal
in classVmSchedulerAbstract
-
allocatePesForVmInternal
- Specified by:
allocatePesForVmInternal
in classVmSchedulerAbstract
-
deallocatePesFromVmInternal
- Specified by:
deallocatePesFromVmInternal
in classVmSchedulerAbstract
-