1

I am working on CloudSim. I am misunderstanding resource provisioning (e.g.: VMs) and task scheduling in cloud. Below are scenarios to explain my questions.

If we have 3 different types of VMs (different mips 250,500,750), and we need to schedule 3 tasks:

Case 1:

We have limited resources (5 VMs) so how each vm map to the type?

vm1     type 1, type 2 , type 3 
vm2     type 1, type 2 , type 3 
vm3     type 1, type 2 , type 3 
vm4     type 1, type 2 , type 3 
vm5     type 1, type 2 , type 3 

After mapping (vm - type), we will have for example:

vm1     type 2 500
vm2     type 1 250
vm3     type 3 750
vm4     type 2 500
vm5     type 1 250

We need to schedule these tasks to minimise the makespan:

T1 length 1000 
T2 length 2000 
T3 length 3000

After scheduling based on minimising makespan will have:

T1 length 1000 to vm3
T2 length 2000 to vm3
T3 length 3000 to vm3

What is the maximum capacity of vm to run the task? In other words, when we can use another VM?

Case 2:

We have unlimited no. of VMs, how we map the VMs with its type? how we can create VMs on demand or dynamically?

I appreciate any help, thank you!

iamdanchiv
  • 4,052
  • 4
  • 37
  • 42
Rosy
  • 11
  • 2

1 Answers1

1

Which VM would have which type it's totally depends upon what mips you have passed to it during Vm creation.

For example:

mips=250
pesNumber=1
vm = new Vm(1, userId, mips, pesNumber, ram, bw, size, vmm, new CloudletSchedulerTimeShared());

This VM would have type1 and it can handle maximum 250 million Instructions of a task at a time because it has 1 PE.

If pesNumber=2 than it can handle total 500 (mips*pesNumber) million Instructions of a task.

For case 2 you can refer official example no: 7 of Cloudsim in which VMs are being created at run time.

Hope it will help you.

Chanda Korat
  • 2,453
  • 2
  • 19
  • 23