Previous | Next --- Slide 37 of 64
Back to Lecture Thumbnails
mziv

Is there a special designation of "stealable work" vs. "not stealable work" that each thread maintains? (I imagine there must be, as stealing non-parallelizable work wouldn't be correct). We had talked about this being implemented in relation to each thread's stack - how are those stacks edited, and how is that stealing synchronized?

swkonz

@mziv I've been having a similar question. It seems to me that having this level of synchronization between threads would add a lot of complexity without there being a lot of benefits since we could likely just run something like a dispatcher thread to distribute work to workers as they become available...

itoen

My impression is that each task in the call stack is independent so it doesn't matter which thread ends up performing a task (as long as the dependencies for that tasks are done as in assignment 2, which might be one way to determine which task to steal). It certainly does add a lot of complexity to allow for tasks to be stolen - maybe the stacks are in some unified place with appropriate locks/synchronization so threads can easily find a task to steal?

Please log in to leave a comment.