716 views

1 Answer

2 2 votes

Since nothing is given about the number of available free frames , so we take number of free frames = 1 which is the default assumption.

Now it is interesting to see in the question that the storage is done in row major order but accessing and initialisation of array elements is done in column major order.

So the organisation of pages will be like this :

Page 0 will store the 0th row elements.

Page 1 will store the 1st row elements

and so on till page no 127.

But we are accessing columnwise and hence in every iteration of inner loop we are accessing different row elements.Hence page fault is incurred in every iteration.

Hence no of page faults  =  no of times inner loop is executed

                                    =  128 * 128

                                    =   16384

Thus B) should be the correct option.

Position:
Show:

Related questions

0 0 votes
1 1 answer
519
519 views
KISHALAY DAS asked Nov 4, 2016
519 views
Will it be 4Gb or 4GB?
1 1 vote
0 0 answers
319
319 views
KISHALAY DAS asked Nov 2, 2016
319 views
2 2 votes
1 answers 1 answer
481
481 views
KISHALAY DAS asked Nov 2, 2016
481 views
2 2 votes
1 1 answer
456
456 views
KISHALAY DAS asked Nov 2, 2016
456 views