Cloudslab / cloudsim

CloudSim: A Framework For Modeling And Simulation Of Cloud Computing Infrastructures And Services
http://www.cloudbus.org/cloudsim/
810 stars 492 forks source link

VmSchedulerTimeShared's updatePeProvisioning() creates duplicates in the PE list of peMap #105

Open wildd0g opened 6 years ago

wildd0g commented 6 years ago

updatePeProvisioning(), a method in VmSchedulerTimeShared, uses updatePeProvisioning() to update the peMap, a map which links a key vm to a list of Host PE's that are assinged to that VM. However, this method has no logic to detect duplicates in the Host PE list that the peMap keys a vm to. As a result, the list that a VM is keyed to can contain duplicate Host PE's.

This is no problem when the VM cointains only one PE, and even itterating multiple VM's on the same host goes fine where a single Host PE is registered in the list of multiple VMs. However having a single VM with multiple PE's, each of which does the check, does result in duplicates in a single list due to the behaviour that is desired when assigning a single PE to multiple VMs when capacity allows it.