Previous | Next --- Slide 77 of 82
Back to Lecture Thumbnails
Drew

The problems with the other two examples are that there are some instructions in certain threads that wait for other threads to do something, so if the thread being waited on can't execute for some reason, we have deadlock. Here, the threads won't increment the counter at the same time, but they are not waiting for state to be changed by other threads. Therefore, there is no possibility of deadlock here.

Please log in to leave a comment.