Careful selection of data and programming structures can increase locality and lower page fault rate.
- Assume that each page is 4K bytes and we have about 64Mbytes of memory on the machine.
- Program 1
A: Array[1..10000, 1..10000] of integer;
for i = 1 to 10000
for j = 1 to 10000
A[i,j] = i*j;