Class PeProvisionerSimple

All Implemented Interfaces:
PeProvisioner, ResourceProvisioner

public class PeProvisionerSimple extends ResourceProvisionerSimple implements PeProvisioner

A best-effort PeProvisioner policy used by a Host to provide its physical Pes as virtual PEs to Vms:

  • if there are MIPS available 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, you must ensure 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
  • Constructor Details

    • PeProvisionerSimple

      public PeProvisionerSimple()
      Instantiates a new PeProvisionerSimple. The Pe it will manage will be set just at the Pe instantiation.
    • PeProvisionerSimple

      public PeProvisionerSimple(Pe pe)
      Instantiates a new PeProvisionerSimple for a given Pe.
      Parameters:
      pe - the PE that will be managed by the provisioner
  • Method Details

    • setPe

      public void setPe(Pe pe)
      Description copied from interface: PeProvisioner
      Sets the Pe that this provisioner will manage.
      Specified by:
      setPe in interface PeProvisioner
      Parameters:
      pe - the Pe to set
    • getUtilization

      public double getUtilization()
      Specified by:
      getUtilization in interface PeProvisioner
      Returns:
      the utilization percentage of the PE (in scale from 0 to 1).