CS FundamentalsVery hardGATE CS
A process references pages in a loop over 5 distinct pages: 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, ... with 4 frames. Which policy performs best in the steady state, and roughly what fraction of references fault?
- A. LRU, with no faults after warm-up
- B. FIFO, faulting on half the references
- C. All three fault on every reference
- D. MRU (evict the most recently used page) faults on only about 1 in 4 references; LRU and FIFO fault on every reference
Correct answer: D. MRU (evict the most recently used page) faults on only about 1 in 4 references; LRU and FIFO fault on every reference
A cyclic pattern one page larger than memory is LRU's worst case: the evicted page is always the next one needed. MRU keeps most of the loop resident; each fault displaces the page just used, which is needed furthest in the future.
More Operating Systems questions
- A system uses 4 KB pages. A process's code segment is 10,000 bytes, data 7,000 bytes and stack 3,000 bytes, each segment starting on a…
- Compaction is used to remove external fragmentation. Which condition is required for compaction to be possible?
- The 50-percent rule for first-fit allocation states that, statistically, given N allocated blocks, about 0.5N blocks are lost to…
- Which allocation strategy tends to leave the LARGEST leftover holes, and which tends to produce the most tiny unusable fragments?
- A slab allocator is used inside many kernels. Which statement explains its main advantage?
- Buddy allocation of a 33 KB request from a 1 MB pool gives a block of what size, and how much is internal fragmentation?