CS FundamentalsModerateGATE CS

Same array int A[128][128], one row per 512-byte page, 2 frames (LRU), but the loop is `for i in 0..127: for j in 0..127: A[i][j] = 0;`. How many page faults occur?

  1. A. 16384
  2. B. 128
  3. C. 256
  4. D. 64

Correct answer: B. 128

Row-major traversal stays on one page for 128 consecutive accesses, so each of the 128 pages faults exactly once.

More Operating Systems questions

Exams that ask this topic