Class MipsShare

java.lang.Object
org.cloudbus.cloudsim.schedulers.MipsShare

public class MipsShare extends Object
Represents the requested or allocated MIPS capacity for a given number of Pes from a VM.
Since:
CloudSim Plus 6.2.0
Author:
Manoel Campos da Silva Filho
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final MipsShare
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an empty MIPS share, with no PEs.
    MipsShare(double mips)
    Creates a MIPS share with 1 PE having a given MIPS capacity.
    MipsShare(long pes, double mips)
    Creates a MIPS share with a defined number of PEs and MIPS capacity for each PE.
    MipsShare(Processor processor)
    Creates a MIPS share according to a given Processor capacity.
    A clone constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Checks if there isn't MIPS capacity allocated to any PE.
    double
     
    long
    pes()
    Gets the number of allocated/requested PEs, which indicates the size of the MIPS share.
    long
    remove(long count)
    Removes a given number of PEs from the MIPS share.
    final void
    setMips(double mips)
     
     
    double
    Gets the total MIPS capacity sum across all PEs.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

  • Constructor Details

    • MipsShare

      public MipsShare()
      Creates an empty MIPS share, with no PEs.
    • MipsShare

      public MipsShare(double mips)
      Creates a MIPS share with 1 PE having a given MIPS capacity.
      Parameters:
      mips - the allocated or requested MIPS capacity for every Pe
    • MipsShare

      public MipsShare(Processor processor)
      Creates a MIPS share according to a given Processor capacity.
      Parameters:
      processor - the processor to get its capacity to create the MipsShare
    • MipsShare

      public MipsShare(long pes, double mips)
      Creates a MIPS share with a defined number of PEs and MIPS capacity for each PE.
      Parameters:
      pes - the number of PEs shared.
      mips - the allocated or requested MIPS capacity for every Pe
    • MipsShare

      public MipsShare(MipsShare share)
      A clone constructor.
      Parameters:
      share - the MIPS share to clone
  • Method Details

    • mips

      public double mips()
    • setMips

      public final void setMips(double mips)
    • pes

      public long pes()
      Gets the number of allocated/requested PEs, which indicates the size of the MIPS share.
      Returns:
    • isEmpty

      public boolean isEmpty()
      Checks if there isn't MIPS capacity allocated to any PE.
      Returns:
    • totalMips

      public double totalMips()
      Gets the total MIPS capacity sum across all PEs.
      Returns:
    • remove

      public long remove(long count)
      Removes a given number of PEs from the MIPS share. It won't remove more PEs than there is available.
      Parameters:
      count - number of PEs to remove
      Returns:
      the number of actual removed PEs
    • toString

      public String toString()
      Overrides:
      toString in class Object