How to make a thread handle environment with very high machine count

25 views Asked by At

We have an array consisting of 1000 elements each of which signifies a machine count of 1000 environments and there are 5 threads that need to be given environments from this array such that each thread has an almost equal number of machines to work with.

•All machines of an environment need to go a single thread, they can't do be split among different threads.

•Each thread can have a different number of environments assigned to it.

However, one environment has an exceptionally high machine count in comparison to the other 999 environments due to which the thread that it is assigned to will take longer to execute in comparison to the other 4 threads.

How can the 5th thread with the environment having an exceptionally high machine count be made to work faster such that it also finishes its execution around the same time as that of the other 4 threads?

Tried using hybrid threading, and multi-threading but not sure how to go about it.

0

There are 0 answers