What is a scalable lock?
What is a scalable lock? And how is it different from a non-scalable lock? I first saw this term in the context of the TBB rw-lock, and couldn't decide which to use. In addition, is there any rw-lock that prioritizes readers over writers? There is no formal definition of the term "scalable lock" or "non-scalable lock". What it's meant to imply is that some locking algorithms, techniques or implementations perform reasonably well even when there is a lot of contention for the lock, and some do not. Sometimes the problem is algorithmic. A naive implementation of priority inheritance, for example