Are you people ready to take a look about the significance of cloudlet scheduler? Then, you people have to take a look at this article.
Mainly, the classes based on cloudlet schedulers in CloudSim are classified in to two significant types and they are deployed to implement a policy of scheduling which is performed through the virtual machine to run the cloudlets and the classes such as.
- CloudletSchedulerSpaceShared
- CloudletSchedulerTimeShared
For your reference, we have highlighted some sample code for the VM creation through the utilization of SpaceSharedVMScheduler.
@SuppressWarnings(“unchecked”)
private VirtualMachineList createVM(int userID, int vms) {
VirtualMachineList list = new VirtualMachineList();
long size = 10000; //image size (MB)
int memory = 512; //vm memory (MB)
long bw = 1000;
int vcpus = 1; //number of cpus
int priority = 1;
String vmm = “Xen”; //VMM name
//create VMs
VirtualMachine[] vm = new VirtualMachine[vms];
for (int i = 0; i < vms; i++) {
vm[i] = new VirtualMachine(new VMCharacteristics(i, userID, size,
memory, bw, vcpus, priority, vmm,
new TimeSharedVMScheduler()));
//for creating a VM with a space shared scheduling policy for cloudlets:
vm[i] = new VirtualMachine(new VMCharacteristics(i,userID,size,memory,bw,vcpus,vmm,new SpaceSharedVMScheduler()));
list.add(vm[i]);
}
return list;
}
Following that, we have described the process of implementing the cloudlet scheduler in CloudSim through right clicking the main file and selecting the Run file option.
At that moment, we acquire the result which is highlighted in the following about the cloudlet scheduler for the VM scheduling process.
Reach us and aid more!!!