Previous | --- Slide 62 of 62
Back to Lecture Thumbnails
student1

I may miss it during the lectures, but why always run spawned child is a locality-aware work-stealing scheduler? In other words, in this case, why it takes benefits from locality?

mcu

Not sure how applicable this is, but by running the spawned child before the continuation, it maintains the original ordering that a sequential version of the program would have on a per-thread basis (so in a given thread, the work in the task queue would be a contiguous range of continuations in their 'proper' order), so it preserves the order of access which I think qualifies as locality-aware (in temporal terms) since it makes an effort to maintain the original program's behavior in terms of sequence of execution. Further, since the stealing is from-back-of-queue, it doesn't disturb the sequence at front-of-queue so each thread's work queue is always in proper order.

Please log in to leave a comment.