From: Marcos D. de A. <ma...@cs...> - 2008-09-30 12:43:07
|
Hi Ye, You can get information from the allocation policy or you can extend the GridResource class in order to handle additional messages such as querying the number of jobs waiting in the queue from the policy and returning it to whoever requested it. Everything depends on what you intend to do. The method forecastFinishTime() just calculates how long a given gridlet will take to execute on a PE given the PE's capability in MIPS and the gridlet's length in number of MIs. That is, the method only divides length by the PE's rating. In the SpaceShared policy, the algorithm is FCFS (First Come First Served). If a job cannot start when it arrives because there are not enough PEs available, the job will be put in the waiting queue. The job's start time is not defined at that moment and will be defined once a gridlet completes and releases a PE to the waiting Gridlet. You can implement an aggressive backfilling policy (also known as EASY backfilling). In this case you will have information about the schedule of the first job waiting in the queue. If you want to define a schedule for every job when it arrives at the resource, then you might be interested in implementing a conservative backfilling policy. Please have a look at: Ahuva W. Mu'alem and Dror G. Feitelson, Utilization, Predictability, Workloads, and User Runtime Estimates in Scheduling the IBM SP2 with Backfilling. IEEE Transactions on Parallel and Distributed Systems, 12:(6), pp. 529-543, 2001. In addition, please not that the SpaceShare policy that comes with GridSim is rather simple. Each job can allocate a maximum of one PE. GridSim does not implement the policies described above. I have implemented the policies described above for a modified version of GridSim (http://gridsim.svn.sourceforge.net/viewvc/gridsim/branches/ gridsim4.0-branch3/). They will work only with that version of GridSim, which has not been incorporated in the main distribution. However, they may be used as an example. Thanks for using GridSim. Regards, Marcos On 29/09/2008, at 6:46 PM, ye huang wrote: > Hi, Marcos: > Thanks a lot for kindly help and useful information. > > I was messed up while searching for method inside GridResource class. > > In this context, Does it mean I am able to get information such as > queued jobs (e.g. gridletQueueList_), job in processing (e.g. > gridletInExecList_), total resource load (e.g. calculateTotalLoad) > by asking for AllocPolicy series, instead of GridResource itself? > > I have one more question as follows: > what is the result of "forecastFinishTime" if all the PEs of a > resource is currently busy with something else? For example, a > submitted job requests 2 PE for 1000 seconds, if the resource is > only able to provide two free PEs in future 500 seconds, will the > policy put the expected finish time "1500" to the job immediately, > or keep the job in queue for 500 seconds and calculate the expected > finish time "1000" later? Or I should implement it myself? > > regards > ye > > On Sep 29, 2008, at 1:36 AM, Marcos Dias de Assuncao wrote: > >> >> Hi Ye, >> >> The gridlet is not returned as soon as it arrives at the resource. >> The only thing that is returned as soon as the gridlet arrives is >> an ack., if the user requested it. The gridlet is returned to the >> user after its processing is complete. The processing time is >> calculated based on the gridlet's number of MIs and the resource's >> MIPS capability. The allocation policies schedule internal events >> (i.e. events sent to themselves) to know when a job completes. See >> for example the method allocatePEtoGridlet(ResGridlet rgl) of >> SpaceShared. After the execution time is calculated, the method >> sends an event to the policy itself, which will be handled at the >> event's time (i.e. this event is the job's completion): >> >> // Identify Completion Time and Set Interrupt >> int rating = machineRating_[ rgl.getMachineID() ]; >> double time = forecastFinishTime( rating , >> rgl.getRemainingGridletLength() ); >> >> int roundUpTime = (int) (time+1); // rounding up >> rgl.setFinishTime(roundUpTime); >> >> // then send this into itself >> super.sendInternalEvent(roundUpTime); >> return true; >> >> Regards, >> >> Marcos >> >> On 29/09/2008, at 2:41 AM, ye huang wrote: >> >>> Hi, all: >>> Is there anyone could help to explain the job executing process of a >>> GridResource? >>> If I understand right, once the GridResource receives submitted jobs >>> via "processGridletSubmit", it only calculates the cost for >>> processing >>> the gridlet, and send the gridlet back. That means, the GridResource >>> won't wait a while for "real job processing". >>> >>> If I am right, is it possible to trace the resource's workload? I >>> mean, once a resource received a lot of gridlets, since each gridlet >>> needs some time for its execution, is it possible to simulate the >>> "busy status" of a resource? For example, the resource will be wait >>> for while to process the next gridlet request? Further more, >>> could the >>> users be able to get the workload of a resource? >>> >>> regards >>> ye >>> >>> -- >>> >>> Ye Huang, Department of Informatics >>> University of Fribourg / Pérolles 2 - Bld de Pérolles 90 >>> 1700 Fribourg, Switzerland >>> >>> e-mail: ye....@he..., ye....@un... >>> http://diuf.unifr.ch/people/huangy/ >>> Office: +41 26 429 65 95 >>> >>> >>> >>> >>> -------------------------------------------------------------------- >>> ----- >>> This SF.Net email is sponsored by the Moblin Your Move >>> Developer's challenge >>> Build the coolest Linux based applications with Moblin SDK & win >>> great prizes >>> Grand prize is a trip for two to an Open Source event anywhere in >>> the world >>> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >>> _______________________________________________ >>> Gridsim-developers mailing list >>> Gri...@li... >>> https://lists.sourceforge.net/lists/listinfo/gridsim-developers >> >> 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... >> >> ------------- >> "No serious sociologist any longer believes that the voice of the >> people expresses any divine or specially wise idea. The voice of >> the people expresses the mind of the people, and that mind is made >> up for it by the group leaders in whom it believes and by those >> persons who understand the manipulation of the public opinion. It >> is composed of inherited prejudices and symbols and cliché's and >> verbal formulas supplied to them by the leaders." >> Edward L. Bernays >> > > > -- > > Ye Huang, Department of Informatics > University of Fribourg / Pérolles 2 - Bld de Pérolles 90 > 1700 Fribourg, Switzerland > > e-mail: ye....@he..., ye....@un... > http://diuf.unifr.ch/people/huangy/ > Office: +41 26 429 65 95 > > > > 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... ------------- "No serious sociologist any longer believes that the voice of the people expresses any divine or specially wise idea. The voice of the people expresses the mind of the people, and that mind is made up for it by the group leaders in whom it believes and by those persons who understand the manipulation of the public opinion. It is composed of inherited prejudices and symbols and cliché's and verbal formulas supplied to them by the leaders." Edward L. Bernays |