Zihan
Zihan

Reputation: 427

When is writer-preferred reader-writer lock used?

I know there are many reader-preferred rwlock, and there are even more aggressive design such as RCU, which are usually considered reader-preferred.

But what if the writers are not much less than the readers? I know a writer-only rwlock will fall back to an exclusive lock, but consider following patterns

I have two questions

  1. Do such cases really exist, especially the first 2 cases? I don't know any user-level applications that fit into those types. User-level examples are preferred.
  2. If there is indeed an application that fits into type 1/2/3, is there any existing way to improve the lock performance?

Upvotes: 3

Views: 285

Answers (0)

Related Questions