GATE / CS ARCHIVE

GATE CSE 1995 / QUESTION 2.7

Page faults with a single frame

Operating Systems · Virtual Memory & Paging · Full GATE CSE 1995 paper

GATE 1995, Q2.7 2 marks · MCQ
Report issue

Virtual Memory & Paging

Question 2.7, GATE 1995: With 100 records per page and one initially free frame, access 0100,0200,0430,0499,0510,0530,0560,0120,0220,0240,0260,0320,0370. How many faults?
Question 2.7, GATE 1995: With 100 records per page and one initially free frame, access 0100,0200,0430,0499,0510,0530,0560,0120,0220,0240,0260,0320,0370. How many faults?
Tap to enlarge
Your answer
Answer & solution

Answer: C: 7 (no official key was published)

Treating addresses as the stated decimal record numbers, integer division by 100 gives pages 1,2,4,4,5,5,5,1,2,2,2,3,3. With just one frame, a fault occurs on the first reference and each change of page. The seven consecutive runs are 1 | 2 | 4,4 | 5,5,5 | 1 | 2,2,2 | 3,3. Thus there are seven faults. Leading zeros are address formatting here, not C octal literals; interpreting them as octal would be incompatible with the printed digit 9.

Original paper, page 3