CS FundamentalsHardIBM · Deloitte pattern

In the first readers–writers problem (readers get priority: a reader never waits if the resource is already being read), which problem can occur?

  1. A. Two writers may write simultaneously
  2. B. Readers can starve
  3. C. A reader and a writer may access the data together
  4. D. Writers can starve

Correct answer: D. Writers can starve

As long as readers keep arriving, readcount never drops to 0 and the writer's wait on the resource semaphore never succeeds. Mutual exclusion is still preserved; only fairness suffers.

More Operating Systems questions

Exams that ask this topic