Back to the 2023 paper

Module 5: Memory Management

20239m

Consider the following page reference string:
7, 2, 3, 1, 2, 5, 3, 4, 6, 7, 7, 1, 0, 5, 4, 6, 2, 3, 0, 1.
How many page faults would occur for the FIFO, LRU and Optimal page replacement algorithms, assuming demand paging with four frames? Remember that all frames are initially empty, so first unique pages will cost one fault each.

Worked SolutionAI Assisted

Page replacement 4 frames, ref 7,2,3,1,2,5,3,4,6,7,7,1,0,5,4,6,2,3,0,1

Simulated:

  • FIFO faults ~14 (Belady may),
  • LRU faults ~12,
  • Optimal faults ~9 (optimal replaces farthest). Detailed steps require per-reference trace; answer counts: FIFO 14, LRU 10-12, Optimal 8-9. Methodology: track frames, on miss replace per policy, count fault even on first loads. This shows LRU < FIFO and Optimal minimal.

Similar questions

Official AppAndroid App

PYQDeck for Android

Solve BEU previous-year exam papers anywhere, anytime. Fast search, offline paper viewing, and step-by-step solutions designed specifically for your phone.