|
From: Anthony S. <an...@cs...> - 2007-09-24 07:39:18
|
> It seems that at no point the Gridlet status is changed to CANCELED.
See SpaceShared.java line 754 or TimeShared.java line 770:
// if a Gridlet is finished upon cancelling, then set it to success
// instead.
if (rgl.getRemainingGridletLength() == 0.0) {
rgl.setGridletStatus(Gridlet.SUCCESS);
}
else {
rgl.setGridletStatus(Gridlet.CANCELED);
}
See the output from Example7 of Test Case 8.
It shows Gridlet #2 has been cancelled.
============= OUTPUT for User_1 ==========
Gridlet ID STATUS Resource ID Cost
2 Canceled 11 435.12199999999984
0 Success 7 405.0544
1 Success 11 1008.9780000000001
3 Success 7 1200.0
> why do we need time zones particularly in advance reservations?
> Therefore, why do we need to convert times
> between time zones?
the time used by the AR scheduler is the absolute time not relative.
See ARPolicy.java line 4995:
protected long getCurrentTime() {
return initTime_ + (int) (GridSim.clock() * MILLI_SEC);
}
where initTime_ = Calendar.getInstance().getTimeInMillis()
when you call GridSim.init() method +/- resource time zone.
See AllocPolicy#init() method line 359:
// looking at the init simulation time
Calendar calendar = GridSim.getSimulationCalendar();
long simTime = calendar.getTimeInMillis();
int simTimeZone = calendar.getTimeZone().getRawOffset() /
AdvanceReservation.HOUR;
// then convert into the local resource time
initTime_ = AdvanceReservation.convertTimeZone( simTime,
simTimeZone,
resource_.getResourceTimeZone() );
When you have entities (resources or users) with different time zones,
then the time will be different.
regards,
anthony
|