CS FundamentalsVery hardGATE CS

Read-copy-update (RCU) is used for read-mostly kernel data. What is its key idea?

  1. A. Readers and writers share a single mutex
  2. B. Writers update data in place while readers spin
  3. 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)
  4. 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

Exams that ask this topic