VmSchedulerTimeShared (cloudsim 3.1-SNAPSHOT API)

org.cloudbus.cloudsim

## Class VmSchedulerTimeShared

- java.lang.Object
- - org.cloudbus.cloudsim.VmScheduler
  - - org.cloudbus.cloudsim.VmSchedulerTimeShared

- Direct Known Subclasses:
    VmSchedulerTimeSharedOverSubscription

      public class VmSchedulerTimeShared
      extends VmScheduler

  VmSchedulerTimeShared is a VMM allocation policy that allocates one or more Pe to a VM, and allows sharing of PEs by multiple VMs. This class also implements 10% performance degration due to VM migration. This scheduler does not support over-subscription.
  Since:
    CloudSim Toolkit 1.0
  Author:
    Rodrigo N. Calheiros, Anton Beloglazov

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `VmSchedulerTimeShared(List<? extends Pe> pelist)` Instantiates a new vm scheduler time shared.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected boolean` | `allocatePesForVm(String vmUid, List<Double> mipsShareRequested)` Allocate pes for vm.
    `boolean` | `allocatePesForVm(Vm vm, List<Double> mipsShareRequested)` Allocates PEs for a VM.
    `void` | `deallocatePesForAllVms()` Releases PEs allocated to all the VMs.
    `void` | `deallocatePesForVm(Vm vm)` Releases PEs allocated to a VM.
    `double` | `getMaxAvailableMips()` Returns maximum available MIPS among all the PEs.
    `protected Map<String,List<Double>>` | `getMipsMapRequested()` Gets the mips map requested.
    `protected int` | `getPesInUse()` Gets the pes in use.
    `protected void` | `setMipsMapRequested(Map<String,List<Double>> mipsMapRequested)` Sets the mips map requested.
    `protected void` | `setPesInUse(int pesInUse)` Sets the pes in use.
    `protected void` | `updatePeProvisioning()` Update allocation of VMs on PEs.

    - ### Methods inherited from class org.cloudbus.cloudsim.VmScheduler

      `getAllocatedMipsForVm, getAvailableMips, getMaxPeCapacity, getMipsMap, getPeCapacity, getPeList, getPeMap, getPesAllocatedForVM, getTotalAllocatedMipsForVm, getVmsMigratingIn, getVmsMigratingOut, setAvailableMips, setMipsMap, setPeList, setPeMap, setVmsMigratingIn, setVmsMigratingOut`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### VmSchedulerTimeShared

          public VmSchedulerTimeShared(List<? extends Pe> pelist)

      Instantiates a new vm scheduler time shared.
      Parameters:
        `pelist` - the pelist

  - ### Method Detail

    - #### allocatePesForVm

          public boolean allocatePesForVm(Vm vm,
                                 List<Double> mipsShareRequested)

      Description copied from class: `VmScheduler`
      Allocates PEs for a VM.
      Specified by:
        `allocatePesForVm` in class `VmScheduler`
      Parameters:
        `vm` - the vm
        `mipsShareRequested` - the mips share
      Returns:
        $true if this policy allows a new VM in the host, $false otherwise

    - #### allocatePesForVm

          protected boolean allocatePesForVm(String vmUid,
                                 List<Double> mipsShareRequested)

      Allocate pes for vm.
      Parameters:
        `vmUid` - the vm uid
        `mipsShareRequested` - the mips share requested
      Returns:
        true, if successful

    - #### updatePeProvisioning

          protected void updatePeProvisioning()

      Update allocation of VMs on PEs.

    - #### deallocatePesForVm

          public void deallocatePesForVm(Vm vm)

      Description copied from class: `VmScheduler`
      Releases PEs allocated to a VM.
      Specified by:
        `deallocatePesForVm` in class `VmScheduler`
      Parameters:
        `vm` - the vm

    - #### deallocatePesForAllVms

          public void deallocatePesForAllVms()

      Releases PEs allocated to all the VMs.
      Overrides:
        `deallocatePesForAllVms` in class `VmScheduler`

    - #### getMaxAvailableMips

          public double getMaxAvailableMips()

      Returns maximum available MIPS among all the PEs. For the time shared policy it is just all the avaiable MIPS.
      Overrides:
        `getMaxAvailableMips` in class `VmScheduler`
      Returns:
        max mips

    - #### setPesInUse

          protected void setPesInUse(int pesInUse)

      Sets the pes in use.
      Parameters:
        `pesInUse` - the new pes in use

    - #### getPesInUse

          protected int getPesInUse()

      Gets the pes in use.
      Returns:
        the pes in use

    - #### getMipsMapRequested

          protected Map<String,List<Double>> getMipsMapRequested()

      Gets the mips map requested.
      Returns:
        the mips map requested

    - #### setMipsMapRequested

          protected void setMipsMapRequested(Map<String,List<Double>> mipsMapRequested)

      Sets the mips map requested.
      Parameters:
        `mipsMapRequested` - the mips map requested

Copyright © 2013 The Cloud Computing and Distributed Systems (CLOUDS) Laboratory, The University of Melbourne. All Rights Reserved.