Skip to content

Conversation

@Gurankio
Copy link

This update introduces a parallel API that removes the need to manually specify IDs when creating:
Container, ContainerVm, PowerContainer, PowerContainerVm, Cloudlet, Host, HostDynamicWorkload, Pe, and Vm.

Each class family now maintains an internal atomic counter that increments when new instances are created.
If an instance is created manually with a provided ID, the counter updates to the maximum of the previous value and the given ID.

The CloudSimExample* examples have been updated to demonstrate the new API.

- EventQueue running flag was not checked in all methods
- Event serial numbering did not behave as expected in all cases
- Incomplete simulation reset, not all global state was reset on an init call
- Unsynchronized access to CloudSim.paused
- added an atomic int in each class that needs IDs
- updated CloudSimExampleTest (where IDs were not intentionally duplicated) to use the new overloads
- fixed CloudSimExample5 that did not increment IDs between cloudlet instantiations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant