Previous | Next --- Slide 38 of 64
Back to Lecture Thumbnails
haiyuem

There are two benefits for running child first. 1) For common recursive workloads like quick-sort, "child first" will ensure that the new thread picks the largest workload, which parallelizes the work distribution process. 2) The new thread will not interfere with the current working thread in terms of register files, memory, etc.

weimin

It depends, for example if we spawn many children in a loop then for child stealing we need more space in the queue to keep all our spawned children but for continuation stealing we can prevent the queue from overflowing.

However if we have a recursive workload, using child stealing we can minimize the amount of stealing that occurs since a larger workload is stolen from the victim thread so the thief thread will have more work. This minimizes communication.

Please log in to leave a comment.