GATE | Gate IT 2007 | Question 12

The address sequence generated by tracing a particular program executing in a pure demand paging system with 100 bytes per page is
0100, 0200, 0430, 0499, 0510, 0530, 0560, 0120, 0220, 0240, 0260, 0320, 0410.

Suppose that the memory can store only one page and if x is the address which causes a page fault then the bytes from addresses x to x + 99 are loaded on to the memory.
How many page faults will occur ?
(A) 0
(B) 4
(C) 7
(D) 8


Answer: (C)

Explanation:


Address	        Page faults	last byte in memory
0100 		page fault, 	 199 
0200 		page fault, 	 299
0430		page fault,      529 
0499 		no page fault
0510 		no page fault 
0530 		page fault,     629
0560            no page fault 
0120 		page fault,     219
0220	 	page fault,     319
0240            no page fault 
0260            no page fault 
0320		page fault,     419
0410            no page fault
So, 7 is the answer- (C)


Quiz of this Question

My Personal Notes arrow_drop_up
Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.