2,219 views
1 votes
1 votes

A page-replacement algorithm should minimize the number of page faults. We can achieve this minimization by distributing heavily used pages evenly over all of memory, rather than having them compete for a small number of page frames. We can associate with each page frame a counter of the number of pages associated with that frame. Then, to replace a page, we can search for the page frame with the smallest counter.
How many page faults occur for the above algorithm for the following reference string with four page frames? 
1, 2, 3, 4, 5, 3, 4, 1, 6, 7, 8, 7, 8, 9, 7, 8, 9, 5, 4, 5, 4, 2.

   
   
 

(A) 11

 

(B) 12

 

(C) 13

 

(D) 14

1 Answer

0 votes
0 votes
In some source, they have by default assumed FIFO policy for breaking ties. So if FIFO is considered for breaking ties then the number of page faults must be 13.

Related questions

134
views
0 answers
1 votes
Reetu Chaudhary asked May 6
134 views
For a certain page trace starting with no page in the memory, a demand-paged memory system operated under the LRU replacement policy results in 9 and 11 page faults when the primary memory ... a) 9 and 7(b) 7 and 9(c) 10 and 12(d) 6 and 7
566
views
0 answers
0 votes
Jyoti Kumari97 asked Jan 15, 2019
566 views
Assume there are 5 frames and consider the following reference string find the number of page faults using NRU page replacement algorithm.3,2,3, 0,8,4,2,5,0,9,8,3,2
393
views
0 answers
0 votes
Mayankprakash asked Dec 24, 2018
393 views
Do we need to cover page replacement implementations for gate?Please suggest
541
views
2 answers
1 votes
muthu kumar asked Dec 15, 2018
541 views
How the value is 36? im getting 39.