From: Anthony S. <an...@cs...> - 2008-08-19 02:02:34
|
I think it resume its execution from the point where it stopped. However, pls double check on this one for me. anthony On Mon, 18 Aug 2008, Vinicius Pinheiro wrote: > Hi Anthony, > > Thank you! It really worked for me now. But I have one more question: when > the gridlet is moved to another grid resource it resume its execution from > begining or from the point where it stopped? I did some tests because I'm > trying to simulate a checkpoint mechanism and I need to know this for sure. > > Thanks > > Vinicius > > > 2008/8/18 Anthony Sulistio <an...@cs...> > >> >> Hello, >> >> The resource scheduler i.e. SpaceShared or TimeShared >> will update the gridlet length or call >> Gridlet#setGridletFinishedSoFar() method, >> according the following conditions: >> - the gridlet is finished executing >> - the gridlet is cancelled >> - the gridlet is migrated to another resource >> >> The reason is GridSim is a discrete-event simulation, hence, the simulation >> time is not continuous, e.g. time = 1, 2, 3, 4, ... >> Instead, the time jumps based on the arrival of new events, >> e.g. simulation time = 0, 40, 100, 700, ... >> >> >> Thus, the best way to check the status of a gridlet is by using >> the GridSim#gridletStatus() method. >> This method returns the current Gridlet status or -1 if not found. >> The various Gridlet status can be found in Gridlet class. >> Note that you should only call this method at a certain interval, >> not in a loop, since it will slow down the simulation. >> In addition, the gridlet length will still be zero, until >> one of the 3 conditions is satisfied. >> >> >> >> anthony >> >> >> >> On Wed, 13 Aug 2008, Vinicius Pinheiro wrote: >> >> Hi, >>> >>> I'm having problems in getting the amount of computation executed so far. >>> The method Gridlet.getGridletFinishedSoFar() always return 0. Just when >>> the >>> Gridlet has finished is that it returns the size of the gridlet, what is >>> useless at this point. >>> My code something like: >>> >>> while(gridletNotFinished()) { >>> double amount = gridlet.getGridletFinishedSoFar(); >>> System.out.println("FinishedSofar: " + amount); >>> } >>> >>> Is there something there I have to do in order to get this method working >>> properly? >>> >>> Thanks in advance, >>> >>> Vinicius Pinheiro >>> >>> > |