2,097 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

0 votes
0 votes
0 answers
1
Jyoti Kumari97 asked Jan 15, 2019
542 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
0 votes
0 votes
0 answers
2
Mayankprakash asked Dec 24, 2018
379 views
Do we need to cover page replacement implementations for gate?Please suggest
1 votes
1 votes
2 answers
3
muthu kumar asked Dec 15, 2018
506 views
How the value is 36? im getting 39.
0 votes
0 votes
1 answer
4
HeadShot asked Nov 6, 2018
385 views
Only "Second chance" is mentioned then how can I know whether it is "FIFO 2nd chance" or "LRU 2nd chance" algorithm ?