Class CloudletTaskSchedulerSimple

  • All Implemented Interfaces:
    CloudletTaskScheduler

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

    It also schedules the network communication among the 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 Detail

      • CloudletTaskSchedulerSimple

        public CloudletTaskSchedulerSimple()
        Creates a CloudletTaskSchedulerSimple object.
    • Method Detail

      • 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 its timie to update Cloudlet execution, false otherwise.
      • setVm

        public void setVm​(Vm vm)
        Description copied from interface: CloudletTaskScheduler
        Sets the Vm that the CloudletTaskScheduler will sent 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
      • 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