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?
- A. Two writers may write simultaneously
- B. Readers can starve
- C. A reader and a writer may access the data together
- 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
- When is a spinlock (busy-waiting lock) preferable to a blocking lock?
- Modern fork() implementations use copy-on-write. Which statement is correct?
- Segment table (base, limit): S0 (1400, 600), S1 (6300, 400), S2 (4300, 300), S3 (3200, 1100). What happens for logical addresses (2, 120)…
- Page size is 1 KB. The page table maps page 0 → frame 3, page 1 → frame 7, page 2 → frame 5, page 3 → frame 2. What physical address…
- Which statement about threads of the same process is FALSE?
- Processes: A (arrival 0, burst 5), B (arrival 1, burst 3), C (arrival 2, burst 8), D (arrival 3, burst 6). Round Robin, quantum 4. A…