Consider the two-dimensional array D[128][128] in C, stored in row-major order. Each physical page frame holds 512 elements of D. There are 30 physical page frames. The following code executes:
for (int i = 0; i<128; i++)
for (int j = 0; j<128; j++)
D[j][i] *= 10;
The number of page faults generated during this execution is:
Show Hint
In C, arrays are row-major. Column-wise traversal causes poor locality, leading to excessive page faults. If the loops were swapped (row-wise), page faults would reduce drastically.