Previous | Next --- Slide 45 of 64
Back to Lecture Thumbnails
locked

In this above example, if we don't divide work evenly, it's possible that thread 2 finishes first (because it has less work compare to thread 1) and it has to steal work dorm thread 1 again. So is it always true that this way of dividing work will cause less stealing compare to dividing work evenly among threads?

Qiaoyu

I have the same problem. Is stealing used for tasks that we do not know its workload before execution so we can only assign tasks to queues randomly? If we know the computation cost before running program, we can just divide work evenly to every thread's queue instead of spending more time stealing from others.

nemo

@Qiaoyu I think the motivation behind this exercise is - Given some knowledge about how scheduling/parallelism is implemented, coming up with the best work assignment scheme. So, this is more like understanding what a good assignment would be in a child first, continuation stealing scenario with a double ended queue. The learning we are taking from here is more along the lines of gauging the overheads and devising good work decomposition strategies.