Previous | Next --- Slide 17 of 63
Back to Lecture Thumbnails
Nesuna

So to my understanding, this is happy medium between static assignment and dynamic assignment in that the queues originally have some sort of static assignment based on some educated estimate for how long we expect the assignments to take. But then, we allow for threads to access other queues so that they can continue helping out other queues when they finish early. As such, you decrease the number of idle threads as you have as you attempt to complete all the tasks. Additionally, assigning each thread its own queue decreases synchronization costs because they only have to be synced after they finish their own tasks. So this is good when you know what all your work is going into the program as opposed to divide and conquer algorithms where you generate your work on each step.