How many page faults are generated by the array


Consider the two-dimensional array A:

int A[ ][ ] = new int[100][100];

Where A[0][0] is at location 400, in a paged memory system with pages of size 400. A small process is in page 0 (locations 0 to 399) for manipulating the matrix; thus, every instruction fetch will be from page 0.

For three page frames, how many page faults are generated by the following array-initialization loops, using LRU replacement, and assuming page frame 1 has the process in it, and the other two are initially empty?

a)
for (int j = 0; j < 100; j++)
for (int i = 0; i < 100; i++)
A[i][j] = 0;

b) 
for (int i = 0; i < 100; i++)
for (int j = 0; j < 100; j++)
A[i][j] = 0;

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: How many page faults are generated by the array
Reference No:- TGS0126240

Expected delivery within 24 Hours