trees



Hello

I want to implement the following but Im not sure what data structure
to use.

I have a list of jobs that need to be allocated to schedulers. The
number of schedulers in the
system depend upon the number of jobs. Each scheduler can handle
between n & m jobs. Each scheduler handles at the max m jobs.
The resulting tree structure should be "balanced" - in the sense there
shouldn't be any scheduler with too few jobs and none with too many. I
should be able to freely move around the jobs to different schedulers
without breaking the "balance" in the system.

What data structure will be best for this situation?

In my current implementation, I have fixed the number of jobs that can
be handled by the scheduler to m. The problem is suppose there are x
schedulers in the system, then x-1 schedulers have m children and the
xth scheduler can have any number from 1 to m.
I want to improve it with what I have written above, but dont know
what data structure/algorithm to use.

I request you all for some suggestions.

Thanks

PS: This is not part of any homework.
.



Relevant Pages

  • Re: trees
    ... I want to implement the following but Im not sure what data structure ... I have a list of jobs that need to be allocated to schedulers. ... without breaking the "balance" in the system. ...
    (comp.programming)
  • Re: trees
    ... I want to implement the following but Im not sure what data structure ... I have a list of jobs that need to be allocated to schedulers. ... There are many methods for scheduling CPU-bound threads. ...
    (comp.programming)
  • Re: trees
    ... I have a list of jobs that need to be allocated to schedulers. ... without breaking the "balance" in the system. ... You will be free to revise the ...
    (comp.programming)