April 2012
Intermediate to advanced
352 pages
8h
English
Reader/writer locks (rw locks) are basically mutexes with sx lock semantics. Like sx locks, threads can hold rw locks as a reader, which is identical to a shared hold, or as a writer, which is identical to an exclusive hold. Like mutexes, rw locks support priority propagation and threads cannot hold them while sleeping (or the kernel will panic).
rw locks are used when you need to protect an object that is mostly going to be read from instead of written to.
Read now
Unlock full access