Previous | Next --- Slide 36 of 64
Back to Lecture Thumbnails
ShadoWalkeR

If the threads can steal work from another threads' queues, why do we need a separate queue for each thread? Why don't we have just one queue and every thread draws work from that queue?

paramecinm

@ShadoWalkeR There are explanations about this question in previous slides. See slide 18.

paracon

@ShadoWalker, a single queue would mean using some kind of locking mechanism, which would lead to contention. Doing that frequently would result in more overheads than benefits.

crow

we know that after doing one unit of work, thread 1 will need to steal again. perhaps to reduce the amount of stealing needed, a thread would steal a "block" of work at a time, instead of just a single piece of work.