Lock striping vs Lock splitting

Lock stripping: Use different locks for different purposes on the whole data structure. For example, a read lock + a write lock

Lock splitting: Use multiple locks for different parts of a data structure. For example, 16 locks are used for a ConcurrentHashMap, each guards N/16 buckets (N = total number of buckets)

Leave a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.