Previous | Next --- Slide 62 of 74
Back to Lecture Thumbnails

I thought we could only sync threads between each block rather than between all blocks? How would there be deadlock in this case? Isn't each block and all the threads within being run in the same execution context?


I think the answer is in the comments of slide 67. syncThreads will block until all threads have reached it, so if all threads cannot fit in the execution contexts concurrently, there will be a deadlock. New threads (belonging to the same block thus the same syncThreads) cannot be loaded because the old threads are stuck waiting for all threads (including the blocked new ones) to reach syncThreads.

Please log in to leave a comment.