cloudsim-plus-master/cloudsim-plus-master/cloudsim-plus/src/main/java/org/cloudbus/cloudsim/schedulers/vm/VmSchedulerTimeShared.java
private boolean allocateAllVmPeRequestedMipsFromHostPe(Vm vm, Pe hostPe, final double requestedMipsForVmPe) {
        if (getAvailableMipsFromHostPe(hostPe) >= requestedMipsForVmPe) {
            allocateMipsFromHostPeForVm(vm, hostPe, requestedMipsForVmPe);
            return true;
        }

        return false;
    }
/**
     * Try to allocate all the MIPS requested by a Virtual PE from a given Physical PE.
     *
     * @param vm the VM to allocate MIPS from one of its vPEs.
     * @param hostPe the Physical PE to allocated MIPS from
     * @param requestedMipsForVmPe the MIPS requested by the vPE
     * @return true if all requested MIPS of the vPE is available at the physical PE
     * and was allocated, false otherwise
     *
     * @todo If the selected Host PE has enough available MIPS that is requested by the
     * current VM PE (Virtual PE, vPE or vCore), allocate that MIPS from that Host PE for that vPE.
     * For each next vPE, in case the same previous selected Host PE yet
     * has available MIPS to allocate to it, that Host PE will be allocated
     * to that next vPE. However, for the best of my knowledge,
     * in real scheduling, it is not possible to allocate
     * more than one VM to the same CPU core,
     * even in CPUs with Hyper-Threading technology.
     * The last picture in the following article makes it clear:
     * https://support.rackspace.com/how-to/numa-vnuma-and-cpu-scheduling/
     */
Try to allocate all the MIPS requested by a Virtual PE from a given Physical PE.
@param vm the VM to allocate MIPS from one of its vPEs.
@param hostPe the Physical PE to allocated MIPS from
@param requestedMipsForVmPe the MIPS requested by the vPE
@return true if all requested MIPS of the vPE is available at the physical PE
and was allocated, false otherwise

@todo If the selected Host PE has enough available MIPS that is requested by the
current VM PE (Virtual PE, vPE or vCore), allocate that MIPS from that Host PE for that vPE.
For each next vPE, in case the same previous selected Host PE yet
has available MIPS to allocate to it, that Host PE will be allocated
to that next vPE. However, for the best of my knowledge,
in real scheduling, it is not possible to allocate
more than one VM to the same CPU core,
even in CPUs with Hyper-Threading technology.
Try to allocate all the MIPS requested by a Virtual PE from a given Physical PE . @param vm the VM to allocate MIPS from one of its vPEs . @param hostPe the Physical PE to allocated MIPS from @param requestedMipsForVmPe the MIPS requested by the vPE @return true if all requested MIPS of the vPE is available at the physical PE and was allocated false otherwise @todo If the selected Host PE has enough available MIPS that is requested by the current VM PE ( Virtual PE vPE or vCore ) allocate that MIPS from that Host PE for that vPE . For each next vPE in case the same previous selected Host PE yet has available MIPS to allocate to it that Host PE will be allocated to that next vPE . However for the best of my knowledge in real scheduling it is not possible to allocate more than one VM to the same CPU core even in CPUs with Hyper - Threading technology .
private boolean allocateAllVmPeRequestedMipsFromHostPe(Vm vm, Pe hostPe, final double requestedMipsForVmPe) {
        if (getAvailableMipsFromHostPe(hostPe) >= requestedMipsForVmPe) {
            allocateMipsFromHostPeForVm(vm, hostPe, requestedMipsForVmPe);
            return true;
        }
        return false;
    }
private boolean allocateAllVmPeRequestedMipsFromHostPe ( Vm vm , Pe hostPe , final double requestedMipsForVmPe ) { if ( getAvailableMipsFromHostPe ( hostPe ) >= requestedMipsForVmPe ) { allocateMipsFromHostPeForVm ( vm , hostPe , requestedMipsForVmPe ) ; return true ; } return false ; }
Try to allocate all the MIPS requested by a Virtual PE from a given Physical PE.
Try to allocate all the MIPS requested by a Virtual PE from a given Physical PE .