recall

← recall

reader-writer lock term

many readers OR one writer at a time

Lock that allows N concurrent readers OR one writer, but not both. Good for read-heavy structures with infrequent writes. Subtler than it sounds: writer starvation (readers keep arriving), priority inversion, and upgrade deadlocks (read → upgrade to write while another reader holds the read) all bite.

aliases: rwlock, shared-exclusive lock

topics: concurrency, locks

references: