Previous | Next --- Slide 9 of 35
Back to Lecture Thumbnails

Why is the may underlined here? Doesn't it definitely limit parallel application performance? I cannot think of a case where the lock doesn't turn a portion of the execution sequential, because the lock ensures no 2 threads can operate on the data structure at the same time, so there is a sequential waiting time.


@ote, I guess it refers to some case that the inherent logic inside the operations on data structure is already fine-grained enough that there is no parallelism to be further exploited. So locking the entire data structure is a fine solution.


@ote the may refers to situations where we aren't heavily using the list. Or if the list has a very small number of users.


@ote IMO, the may refers to situations where the probability of collision is low. This could be a result of a very short instruction sequence within the mutual exclusion and a relatively longer sequence outside the mutual exclusion.


@ote, corse-grain lock could be the finest-grain lock we could have. Thus the May.