CS FundamentalsVery hardGATE CS
Read-copy-update (RCU) is used for read-mostly kernel data. What is its key idea?
- A. Readers and writers share a single mutex
- B. Writers update data in place while readers spin
- C. Readers take no locks; writers publish a new copy with an atomic pointer update and free the old copy only after all pre-existing readers have finished (a grace period)
- D. Readers copy the whole structure before every read
Correct answer: C. Readers take no locks; writers publish a new copy with an atomic pointer update and free the old copy only after all pre-existing readers have finished (a grace period)
RCU makes reads almost free; the cost is shifted to writers, who must wait for a grace period before reclaiming old versions.
More Operating Systems questions
- A reader-writer lock is used where reads are 99% of operations and each read is very short. Why might it perform WORSE than a plain mutex…
- A seqlock lets readers proceed without blocking writers. A reader reads the sequence number, reads the data, then rereads the sequence…
- A condition-variable based bounded buffer uses a single condition variable cv for both 'not full' and 'not empty', and signals with…
- Which statement about deadlock in a system with only ONE resource type that has 10 instances is correct?
- What is the main drawback of deadlock prevention by requiring a process to request ALL its resources before starting (breaking…
- Deadlock recovery by process termination: which criteria are sensible for choosing a victim? 1. Lowest priority 2. Least CPU time consumed…