Class CloudletTaskSchedulerSimple
java.lang.Object
org.cloudbus.cloudsim.schedulers.cloudlet.network.CloudletTaskSchedulerSimple
- All Implemented Interfaces:
CloudletTaskScheduler
A scheduling policy performed by a
virtual machine to process
CloudletTask
s
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
-
Field Summary
Fields inherited from interface org.cloudbus.cloudsim.schedulers.cloudlet.network.CloudletTaskScheduler
NULL
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Adds a packet to the list of packets sent by a given VM, targeting the VM of this scheduler.void
Clears the list ofVmPacket
's to send from the Vm of this scheduler to other VMs.getVm()
Gets the Vm that the CloudletTaskScheduler will sent packets from or receive packets to.Gets a read-only list ofVmPacket
's to send from the Vm of this scheduler to other VMs.boolean
isTimeToUpdateCloudletProcessing
(Cloudlet cloudlet) Checks if it's time to update the execution of a given Cloudlet.void
processCloudletTasks
(Cloudlet cloudlet, long partialFinishedMI) Process Cloudlet's tasks, such as tasks to send packets from or received by a Cloudlet inside a VM.void
Sets the Vm that the CloudletTaskScheduler will send packets from or receive packets to.
-
Constructor Details
-
CloudletTaskSchedulerSimple
public CloudletTaskSchedulerSimple()Creates a CloudletTaskSchedulerSimple.
-
-
Method Details
-
processCloudletTasks
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 interfaceCloudletTaskScheduler
- Parameters:
cloudlet
- the Cloudlet to process packetspartialFinishedMI
- the partial executed length of this Cloudlet (in MI)
-
isTimeToUpdateCloudletProcessing
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 interfaceCloudletTaskScheduler
- 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
Description copied from interface:CloudletTaskScheduler
Gets the Vm that the CloudletTaskScheduler will sent packets from or receive packets to.- Specified by:
getVm
in interfaceCloudletTaskScheduler
- Returns:
-
setVm
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 theNetworkHost
does it when it creates a Vm.- Specified by:
setVm
in interfaceCloudletTaskScheduler
- Parameters:
vm
- the Vm to set
-
clearVmPacketsToSend
public void clearVmPacketsToSend()Description copied from interface:CloudletTaskScheduler
Clears the list ofVmPacket
's to send from the Vm of this scheduler to other VMs.- Specified by:
clearVmPacketsToSend
in interfaceCloudletTaskScheduler
-
getVmPacketsToSend
Description copied from interface:CloudletTaskScheduler
Gets a read-only list ofVmPacket
's to send from the Vm of this scheduler to other VMs.- Specified by:
getVmPacketsToSend
in interfaceCloudletTaskScheduler
- Returns:
- a read-only
VmPacket
list
-
addPacketToListOfPacketsSentFromVm
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 interfaceCloudletTaskScheduler
- Parameters:
pkt
- packet to be added to the list- Returns:
- true if the packet was added, false otherwise
-