Hi all,
sorry in advance if my English isn't very good, not so skilled in writing.
I'm working on gridsim to simulate a scheduling algorithm. Is there
anyone could help me solve some questions arise during the toolkit use?
1. I'm extending the AllocPolicy class. I wonder if can be a race
condition between a call to gridletSubmit (made by the GridResource
thread) and an internal event scheduled for gridlet completion that is
caught by the body in the AllocPolicy thread or the two events are
synchronized in some way. In both cases subsequent call to the same
methods are made. Trying to answer this question i took a look on
simjava code. It seems that in the rare case of the two event with exact
same time in the future queue could be a race condition,am I mistaken
about this?
This leads me to another question. Two event with exact same time seem
very rare, this leads simjava to weak up one thread per clock tick, am I
mistaken again?
2. After the simulation end (calls to shutdownUserEntity &
terminateIOEntities) can I call init again and start another simulation
or I have to reset some data structures or restart jvm?
Thanks in advance
Regards
Giancarlo
|