CS FundamentalsHardGATE CS (PYQ pattern)
FIFO page replacement is run on the reference string 3, 4, 2, 6, 1, 3, 4, 6, 7, 1, 1, 5, 3, 4, 7, 2, 1, 7 with an initially empty memory. For which increase in the number of frames does the fault count go UP (Belady's anomaly)?
- A. From 4 frames to 5 frames only
- B. From 3 frames to 4 frames only
- C. From 2 frames to 3 frames only
- D. From 3 to 4 and from 4 to 5
Correct answer: A. From 4 frames to 5 frames only
FIFO fault counts for 1..6 frames are [17, 17, 16, 11, 12, 10]; the only rise is from 11 (4 frames) to 12 (5 frames).
More Operating Systems questions
- The clock (second-chance) algorithm manages 4 frames, initially empty and filled in order 0..3. A page's reference bit is set to 1 when it…
- Assume every fork() succeeds and each printf output is flushed immediately. int main(void) { for (int i = 0; i < 4; i++) { if (fork() ==…
- A Unix-style file system has 1 KB blocks, 4-byte block pointers and inodes with 12 direct, one single-indirect and one double-indirect…
- Holes in memory (in KB, in address order): 250, 240, 230, 180, 140. Processes arrive and stay resident in this order: 100, 190, 200, 150…
- A disk delivers 20 MB/s (1 MB = 10^6 bytes) to memory by DMA, 4 bytes per bus cycle. Each word transfer steals one 40 ns memory cycle from…
- Three threads each execute x = x + 1; twice on a shared int x that starts at 0 (so six increments in all). Each increment is a separate…