CS FundamentalsHardGATE CS
Which statement about Belady's anomaly is correct?
- A. It can occur with LRU when the number of frames is odd
- B. It occurs with every algorithm for some reference string
- C. It cannot occur with stack algorithms such as LRU and Optimal, because the pages held with n frames are always a subset of those held with n + 1
- D. It is caused by thrashing when too many frames are added
Correct answer: C. It cannot occur with stack algorithms such as LRU and Optimal, because the pages held with n frames are always a subset of those held with n + 1
For stack algorithms the set of resident pages with n frames is contained in the set with n + 1 frames, so adding frames can never add faults. FIFO is not a stack algorithm, which is why it can show the anomaly.
More Operating Systems questions
- A machine has 32 GB of physical memory, 4 KB frames and an inverted page table with 8-byte entries. How big is the table, and why is a…
- Which statements are correct? 1. A child that has exited but whose parent has not called wait() is a zombie. 2. A zombie still holds its…
- The reference string at times 1–12 is 3, 5, 3, 8, 2, 5, 5, 9, 3, 9, 2, 2. With a working-set window Δ = 5 references, what are the…
- A device delivers data at 2 MB/s. Per-byte interrupts would cost 5 µs each; instead DMA moves 4 KB blocks and raises one interrupt per…
- A TLB has 64 entries. A program randomly touches a 100 MB data set. What is the TLB reach with 4 KB pages and with 2 MB huge pages, and…
- A spin lock is built from an atomic test-and-set: while (TestAndSet(&lock)) ; / critical section / lock = false;. Which property does it…