how the timeshared in cloudsim work in cloudsim?

放肆的年华 提交于 2019-12-02 08:20:22

In fact, the CloudletSchedulerTimeShared in CloudSim does not implement the concept of time slice/quantum. Consider we have a VM with 1 CPU (PE) of 1000 MIPS and 2 Cloudlets running inside it. CloudSim's CloudletSchedulerTimeShared provides an oversimplified implementation that allocates 500 MIPS for each Cloudlet, making them run at the same time on the same CPU.

If the VM had only one Cloudlet with a length of 5000 MI, then the Cloudlet would take 5 seconds to finish. Since there are 2 Cloudlets, in a time-shared scheduler for that single-core VM, each Cloudlet running interchangeably would take 10 seconds to finish. Allocating only half of the CPU capacity (500 MIPS) for each one of the 2 Cloudlets, making them run in parallel as if there were 2 CPU cores, will produce the exact same result: each Cloudlet finishing in 10 seconds.

The point is that there is no waiting time for any Cloudlet. These Cloudlets will run as if the VM had 2 CPUs with 500 MIPS each. If you are assessing Cloudlets' wait time in your simulations, such results are just wrong. If the wait time is not a concern, the results are fine.

If you really need to assess Cloudlets' pre-emption process, you can check CloudSim Plus, it's a full-featured, state-of-the-art, completely re-engineered and actively maintained CloudSim fork. It provides an implementation of the Completely Fair Linux Scheduler that performs actual preemption and considers a time slice to run Cloudlets. Check the CloudletSchedulerCompletelyFair and the LinuxCompletelyFairSchedulerExample.

[If we have 50 cloudlets,10 VMs. CloudChedular and VmSchedular( Time shared) class in cloudsim will distribute resources as per total number of jobs (cloudlets) to be executed. For instance when requested capacity is more than the current capacity, failures will occur and it will cause SLA violations.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!