Class NetworkHost

All Implemented Interfaces:
Comparable<Host>, ChangeableId, ExecDelayable, Identifiable, Machine<FileStorage>, PhysicalMachine, ResourceStatsComputer<HostResourceStats>, Startable, Host, PowerAware<PowerModelHost>, Resourceful

public class NetworkHost extends HostSimple
A Host that support simulation of networked Datacenters. It executes actions related to the management of packets (sent and received) besides Vm management (e.g., creation and destruction). A Host has a defined policy for provisioning memory and bw, as well as an allocation policy for Pe's to virtual machines.

Please refer to the following publication for more details:

Since:
CloudSim Toolkit 3.0
Author:
Saurabh Kumar Garg
  • Field Details

  • Constructor Details

    • NetworkHost

      public NetworkHost(long ram, long bw, long storage, List<Pe> peList)
      Creates and starts up a NetworkHost using a VmSchedulerSpaceShared as default.
      Parameters:
      ram - the RAM capacity in Megabytes
      bw - the Bandwidth (BW) capacity in Megabits/s
      storage - the storage capacity in Megabytes
      peList - the host's Pe list
  • Method Details

    • updateProcessing

      public double updateProcessing(double currentTime)
      Description copied from interface: Host
      Updates the processing of VMs running on this Host, that makes the processing of Cloudlets inside such VMs to be updated.
      Specified by:
      updateProcessing in interface Host
      Overrides:
      updateProcessing in class HostAbstract
      Parameters:
      currentTime - the current time
      Returns:
      the predicted completion time of the earliest finishing cloudlet (which is a relative delay from the current simulation time), or Double.MAX_VALUE if there is no next Cloudlet to execute
    • createVm

      public HostSuitability createVm(Vm vm)
      Try to allocate resources to a new VM in the Host.

      It also creates and sets a CloudletTaskScheduler for each Vm that doesn't have one already.

      Specified by:
      createVm in interface Host
      Overrides:
      createVm in class HostAbstract
      Parameters:
      vm - Vm being started
      Returns:
      a HostSuitability to indicate if the Vm was placed into the host or not (if the Host doesn't have enough resources to allocate the Vm)
      See Also:
    • addReceivedNetworkPacket

      public void addReceivedNetworkPacket(HostPacket hostPacket)
      Adds a packet to the list of received packets to further submit them to the respective target VMs and Cloudlets.
      Parameters:
      hostPacket - received network packet