Class VmSchedulerTimeShared
- All Implemented Interfaces:
VmScheduler
A Virtual Machine Monitor (VMM), also called Hypervisor,
that defines a policy to allocate one or more Pes from a Host to a Vm,
and allows sharing of PEs by multiple VMs.
This class also implements 10% performance degradation due to VM migration.
It does not support resource over-subscription.
Each Host has to use its own instance of a VmScheduler that will so schedule the allocation of Host's PEs for VMs running on it.
It does not perform a preemption process to move running
VMs to the waiting list to make room for other VMs already waiting.
It just imposes there isn't waiting VMs,
oversimplifying the scheduling, considering that for a given simulation
second t, the total processing capacity (in MIPS) of the processor cores (Pes)
is equally divided by the VMs that are using them.
In CPUs enabled with Hyper-threading technology (HT), it is possible to run up to 2 processes at the same physical CPU core. However, this scheduler implementation oversimplifies a possible HT feature by allowing several VMs to use a fraction of the MIPS capacity from physical PEs, until that the total capacity of the virtual PE is allocated. Consider that a virtual PE is requiring 1000 MIPS but there is no physical PE with such a capacity. The scheduler will allocate these 1000 MIPS across several physical PEs, for instance, by allocating 500 MIPS from PE 0, 300 from PE 1 and 200 from PE 2, totaling the 1000 MIPS required by the virtual PE.
In a real hypervisor in a Host that has Hyper-threading CPU cores, one physical PE can be allocated to two virtual PEs (preemptively), but a single virtual PE can use just one physical PE at a time.
- Since:
- CloudSim Toolkit 1.0
- Author:
- Rodrigo N. Calheiros, Anton Beloglazov, Manoel Campos da Silva Filho
-
Field Summary
Fields inherited from interface org.cloudsimplus.schedulers.vm.VmScheduler
DEF_VM_MIGRATION_CPU_OVERHEAD, LOGGER, NULL -
Constructor Summary
ConstructorsConstructorDescriptionCreates a time-shared VM scheduler with a default CPU overhead for VM migrations.VmSchedulerTimeShared(double vmMigrationCpuOverhead) Creates a time-shared VM scheduler, defining a CPU overhead for VM migration. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidallocateMipsShareForVm(Vm vm, MipsShare requestedMipsReduced) Performs the allocation of a MIPS share to a given VM.booleanallocatePesForVmInternal(Vm vm, MipsShare requestedMips) protected longdeallocatePesFromVmInternal(Vm vm, int pesToRemove) protected MipsSharegetMipsShareToAllocate(MipsShare requestedMips, double scalingFactor) Gets the actual MIPS share that will be allocated to VM's PEs, considering the VM migration status.protected MipsSharegetMipsShareToAllocate(Vm vm, MipsShare requestedMips) Gets the actual MIPS share that will be allocated to VM's PEs, considering the VM migration status.protected booleanisSuitableForVmInternal(Vm vm, MipsShare requestedMips) The non-emptiness of the list is ensured by theVmScheduler.isSuitableForVm(Vm, MipsShare)method.Methods inherited from class org.cloudsimplus.schedulers.vm.VmSchedulerAbstract
allocatePesForVm, allocatePesForVm, deallocatePesFromVm, deallocatePesFromVm, getAllocatedMips, getMaxCpuUsagePercentDuringOutMigration, getMipsShareRequestedReduced, getPeCapacity, getRequestedMips, getTotalAllocatedMipsForVm, getTotalAvailableMips, getWorkingPeList, isSuitableForVm, isSuitableForVm, mipsPercentToRequest, removePesFromVm, setHostMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.cloudsimplus.schedulers.vm.VmScheduler
getHost, getVmMigrationCpuOverhead
-
Constructor Details
-
VmSchedulerTimeShared
public VmSchedulerTimeShared()Creates a time-shared VM scheduler with a default CPU overhead for VM migrations. -
VmSchedulerTimeShared
public VmSchedulerTimeShared(double vmMigrationCpuOverhead) Creates a time-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
-
deallocatePesFromVmInternal
- Specified by:
deallocatePesFromVmInternalin classVmSchedulerAbstract