All Exams Test series for 1 year @ ₹349 only
Question

Suppose for a process P, reference to pages in order are 1, 2, 4, 5, 2, 1, 2, 4. Assume that main memory can accommodate 3 pages and the main memory has already pages 1 and 2 in the order 1 - first, 2 - second. At this moment, assume FIFO Page Replacement Algorithm is used then the number of page faults that occur to complete the execution of process P is

The correct answer is

5

The initial FIFO queue is [1,2], oldest first. Hits do not change FIFO order.

ReferenceHit/faultQueue after reference
1Hit1,2
2Hit1,2
4Fault1,2,4
5Fault2,4,5
2Hit2,4,5
1Fault4,5,1
2Fault5,1,2
4Fault1,2,4

There are five page faults, at reference positions 3, 4, 6, 7 and 8.

Was this answer helpful?

Important Questions from Page Replacement Policy - Teaching

  1. Consider a virtual page reference string 7, 0, 1, 2, 0, 3, 0, 4, 2, 3, 0, 3, 2, 1, 2, 0,1, 7, 0,1 Suppose a demand paged virtual memory system running on a computer system such that the main memory has 3 page frames. Then_______ page replacement algorithm has minimum number of page faults.  

  2. For the following page reference string 4, 3, 2, 1, 4, 3, 5, 4, 3, 2, 1, 5. the number of page faults that occur in Least Recently Used (LRU) page replacement algorithm with frame size 3 is

Need Expert Advice?

Start Your Preparation with Prepp Mobile App

Download the app from Google Play & App Store
Download the app from Google Play & App Store
Prepp Mobile App