Previous | Next --- Slide 57 of 64
Back to Lecture Thumbnails
stee

What are the benefits of using the last thread to reach the join point to execute after sync compared to using the thread that initiated the fork? Does doing so also decrease the overhead of handling the threads?

Araina

@stee, I think using the last thread to reach the join point to execute after sync does decrease the overhead. In this case, this thread does not need to notify the thread that initiated the fork, and just continues to execute the code after sync according to the greedy policy. What's more, the last thread to reach the join point can also be the first thread that initiated the fork.

efficiens

This also ensures that the main thread (or the thread doing the fork()) is never idle