From: Anthony S. <an...@cs...> - 2007-10-24 07:49:28
|
> 1. The "ResourceCharacteristics" class defines only the 'static' > information of a GridResource. correct > Except Resource Failure, there's currently no support for > dynamic loading, e.g. current CPU usage, current available memory, > current available disk space, current queue length at a GridResource this one should be the responsible of the resource scheduler since it has a better information about these stats. Or the resource scheduler should pass relevant info to another object for stats. > 2. A "GridInformationService" is not a GridResource. This means the > registration and maintenance of monitoring information is cost-free. correct, but you can create your own GIS that charge for registration free, etc > 3. Upon the creation of a GridResource, the GridResource registers > itself to a RegionalGIS or (the default) System GIS. This registration > is "once for all" - no further maintenance is needed, for example the > GIS ask the resource 'are you still there?'. correct, all registrations are done in the beginning, except for the resource failure case. However, this is all done internally by the GridResource class so users do not need to worry (in case of a failure). > 4. A GridSim simulation starts by calling GridSim.startGridSimulation(). > But how is the termination of a GridSim simulation defined and managed? > I guess by finishing all GridLet entities? no, check the example code carefully: // signal the end of a simulation for this user entity super.finishSimulation(); The above method is from the GridSimCore class. Once ALL users send this event, the GridSimShutdown class will notify all entities. That's why when you initialize GridSim, you need to provide the correct num of users. GridSim#init(int numUser, Calendar cal, boolean traceFlag) Once Gridlets are done, then of course you can set the user to do other things, not just exiting. > Can a simulation keep running for a user-defined period of time, say 10 > minutes, to observe what's going on even most of the entities are idle? yes, just send an internal event to itself. This is just a rough guide: See the res failure example in GridUserFailureEx01#body() // sends a reminder to itself super.send(super.get_id(), init_time, SUBMIT_GRIDLET); You can set init_time = 10*60; // in seconds Then have a while loop to wait for this event with the same tag name, i.e. "SUBMIT_GRIDLET": while (Sim_system.running()) { Sim_event ev = new Sim_event(); super.sim_get_next(ev); // get the next event in the queue switch (ev.get_tag()) { // submit a gridlet case SUBMIT_GRIDLET: ... // your code break; ... // other event name } } > 5. How to calculate the current bandwidth of a network link, and the > network throughput of a resource? just send a ping message to the resource: GridSimCore#pingBlockingCall(String entityName, int size) or GridSimCore#ping(String entityName, int size) The InfoPacket class stores the latest information about network condition. anthony |