Previous | Next --- Slide 37 of 66
Back to Lecture Thumbnails
jgrace

Locking once around a data structure is easy but does not give the maximal parallel speedup. The idea is that if two threads are trying to access and modify non-conflicting regions of the same data structure, they should be able to do so as they are non-conflicting. In the low probability case when they do conflict, only one thread should be able to make the update at a time to avoid deadlock and unexpected results. When there are more threads, there may be more frequent conflicts but this approach still gives much greater concurrency than only allowing one thread at a time to touch the data structure.

Please log in to leave a comment.