Class CloudletTaskSchedulerSimple

java.lang.Object
org.cloudbus.cloudsim.schedulers.cloudlet.network.CloudletTaskSchedulerSimple
All Implemented Interfaces:
CloudletTaskScheduler

public class CloudletTaskSchedulerSimple extends Object implements CloudletTaskScheduler
A scheduling policy performed by a virtual machine to process CloudletTasks of a NetworkCloudlet.

It also schedules the network communication between cloudlets, managing the time a cloudlet stays blocked waiting the response of a network package sent to another cloudlet.

Since:
CloudSim Plus 1.0
Author:
Saurabh Kumar Garg, Manoel Campos da Silva Filho
  • Constructor Details

    • CloudletTaskSchedulerSimple

      public CloudletTaskSchedulerSimple()
      Creates a CloudletTaskSchedulerSimple.
  • Method Details

    • processCloudletTasks

      public void processCloudletTasks(Cloudlet cloudlet, long partialFinishedMI)
      Description copied from interface: CloudletTaskScheduler
      Process Cloudlet's tasks, such as tasks to send packets from or received by a Cloudlet inside a VM.
      Specified by:
      processCloudletTasks in interface CloudletTaskScheduler
      Parameters:
      cloudlet - the Cloudlet to process packets
      partialFinishedMI - the partial executed length of this Cloudlet (in MI)
    • isTimeToUpdateCloudletProcessing

      public boolean isTimeToUpdateCloudletProcessing(Cloudlet cloudlet)
      Description copied from interface: CloudletTaskScheduler
      Checks if it's time to update the execution of a given Cloudlet. If the Cloudlet is waiting for packets to be sent or received, then it isn't time to update its processing.
      Specified by:
      isTimeToUpdateCloudletProcessing in interface CloudletTaskScheduler
      Parameters:
      cloudlet - the Cloudlet to check if it is time to update its execution
      Returns:
      true if it's time to update Cloudlet execution, false otherwise.
    • getVm

      public Vm getVm()
      Description copied from interface: CloudletTaskScheduler
      Gets the Vm that the CloudletTaskScheduler will sent packets from or receive packets to.
      Specified by:
      getVm in interface CloudletTaskScheduler
      Returns:
    • setVm

      public void setVm(Vm vm)
      Description copied from interface: CloudletTaskScheduler
      Sets the Vm that the CloudletTaskScheduler will send packets from or receive packets to. It is not required to manually set a Vm for the CloudletTaskScheduler, since the NetworkHost does it when it creates a Vm.
      Specified by:
      setVm in interface CloudletTaskScheduler
      Parameters:
      vm - the Vm to set
    • clearVmPacketsToSend

      public void clearVmPacketsToSend()
      Description copied from interface: CloudletTaskScheduler
      Clears the list of VmPacket's to send from the Vm of this scheduler to other VMs.
      Specified by:
      clearVmPacketsToSend in interface CloudletTaskScheduler
    • getVmPacketsToSend

      public List<VmPacket> getVmPacketsToSend()
      Description copied from interface: CloudletTaskScheduler
      Gets a read-only list of VmPacket's to send from the Vm of this scheduler to other VMs.
      Specified by:
      getVmPacketsToSend in interface CloudletTaskScheduler
      Returns:
      a read-only VmPacket list
    • addPacketToListOfPacketsSentFromVm

      public boolean addPacketToListOfPacketsSentFromVm(VmPacket pkt)
      Description copied from interface: CloudletTaskScheduler
      Adds a packet to the list of packets sent by a given VM, targeting the VM of this scheduler. The source VM is got from the packet.
      Specified by:
      addPacketToListOfPacketsSentFromVm in interface CloudletTaskScheduler
      Parameters:
      pkt - packet to be added to the list
      Returns:
      true if the packet was added, false otherwise