← BYTES
Unix IPC·Starter·Ref: 15.1.73

What is a reader-writer lock, at a basic level?

Have a question about this video? Mention reference 15.1.73 when you contact us.

   READERS:  R1  R2  R3   (many allowed in at the SAME time)

   WRITER:    W            (only ONE, and no readers at all)
a.A lock that allows multiple threads to hold it simultaneously for READING, but only one thread (and no concurrent readers) to hold it for WRITING
b.A lock that can only be used while physically connected to a printer
c.A lock that can be acquired by readers but never released by anyone
d.A type of lock used exclusively for encrypting files
A reader-writer lock relaxes plain mutual exclusion for the common case where many threads just want to read shared data safely at once (which doesn't conflict with other reads) while still guaranteeing a writer gets fully exclusive access, with no concurrent readers or other writers, whenever it needs to modify that data.

Find this on YouTube & Instagram

Every BYTES video is tagged with its reference number and topic — search any of these on YouTube or Instagram to find this one:

#BYTES#BYTES15173#UnixIPC