Heuristic algorithm for load balancing among threads
问题 I'm working on a multi-threaded program where I have a number of worker threads performing tasks of unequal length. I want to load-balance the tasks to ensure that they do roughly the same amount of work. For each task T i I have a number c i which provides a good approximation to the amount of work that is required for that task. I'm looking for an efficient (O(N) N = number of tasks or better) algorithm which will give me "roughly" a good load balance given the values of c i . It doesn't