|
From: ye h. <hua...@gm...> - 2009-02-14 09:26:15
|
Hi, Marcos:
Thanks! I am working on it.
Regards
ye
On 14 Feb, 2009, at 4:26 AM, Marcos Dias de Assuncao wrote:
>
> Dear Ye,
>
> First, please make sure that the number of users you provide in the
> initialisation of GridSim reflects the number of times you call
> the method shutdownUserEntity(). You may be shutting down the user
> entities prematurely.
>
> Second, if you put a gridlet in a cache and want to evaluate or do
> something with it later, you should schedule a future event,
> probably to the entity that implements the algorithm. Scheduling
> periodical events for time the gridlet has to be processed would
> prevent Sim_system.running() from returning false because there will
> always be an event in the future event queue.
>
> The pseudo-code of the idea is more or less:
>
> body() {
>
> if(event == 'evaluate gridles') {
> // check gridlets here
> }
>
> if(should still continue to do something with cached gridlets) {
> // schedule the next 'evaluate gridlets' event here
> }
> }
>
>
> Regards,
>
> Marcos
>
>
> On 12/02/2009, at 12:46 AM, ye huang wrote:
>
>> Hi, all:
>> I use while(Sim_system.running()) to submitting gridlet and receive
>> feedback. If a gridlet is no grid resource is currently available due
>> to my scheduling algorithm, i will put the gridlet into a locally
>> cached queue, the scheduling algorithm will poll the queue to process
>> unsubmitted gridlets.
>>
>> Now, I noticed my simulation exit without finishing all the cached
>> gridlets, which is led by exit of loop:
>> while(Sim_system.running()). I
>> m wondering the mechanism of Sim_system.running(), and when it goes
>> to
>> false? Any idea to prevent?
>>
>> Regards
>> ye
>>
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Create and Deploy Rich Internet Apps outside the browser with
>> Adobe(R)AIR(TM)
>> software. With Adobe AIR, Ajax developers can use existing skills
>> and code to
>> build responsive, highly engaging applications that combine the
>> power of local
>> resources and data with the reach of the web. Download the Adobe
>> AIR SDK and
>> Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
>> _______________________________________________
>> 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...
>
> -------------
> "It is well enough that people of the nation do not understand our
> banking and monetary system, for if they did, I believe there would
> be a revolution before tomorrow morning."
>
> Henry Ford
>
--
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
|