From: Marcos D. de A. <ma...@cs...> - 2007-09-24 08:57:59
|
Thanks for the prompt reply. I hadn't looked carefully the SpaceShared policy. Regarding the time zones, the providers having time zones is ok. However, I still do not understand why all those conversions are needed since in the end everything is related to the simulation clock. But never mind that, I will just discard these conversions in my work. Regards, Marcos On 24/09/2007, Anthony Sulistio <an...@cs...> wrote: > > > > 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 > -- Marcos Dias de Assuncao Grid Computing and Distributed Systems (GRIDS) Laboratory Department of Computer Science and Software Engineering The University of Melbourne, Australia Email: ma...@cs... |