From: João M. <jma...@gm...> - 2010-03-29 22:29:50
|
Hello Community, I'm trying to implement a dynamic scheduler in GridSim. My idea is that before submitting a new job, the scheduler queries every resource for discovering their loads and then decide which one is the more suitable for hosting new gridlets. By resource load I mean load of its machines, in a similar sense to the contents of /proc/loadavg in any Linux system, where the load means the average number of processes waiting to run. I've run through examples 1 to 10 in the Gridsim. It appears that the right way to do what it want is sending a message to the Resource with the tag GridSimTags.RESOURCE_DYNAMICS, and store the result in a accumulator. Here is the code that I'm running: int id = ((Integer) super.getGridResourceList().get(0)).intValue(); super.send(id, GridSimTags.SCHEDULE_NOW, GridSimTags.RESOURCE_DYNAMICS, ID); Accumulator accumulator = (Accumulator) super.receiveEventObject(); System.out.println("The System load after job submission: " + accumulator.getMean()); Am I really retrieving the resource load? How is this load calculated? Does it has any similar meaning with the values in /proc/loadavg? I'm planning to encapsulate such behavior in a GIS, but I want to be sure that it is what I want. -- __________________________________ João Marcelo Uchôa de Alencar Computer Science BSc. jmarcelo.alencar(at)gmail.com http://simetriade.blogspot.com Linux User 398939 __________________________________ |