1,268 views
0 votes
0 votes
Suppose that your replacement policy (in a paged system) is to examine each page regularly and to discard that page if it has not been used since the last examination. What would you gain and what would you lose by using this policy rather than LRU or second-chance replacement ?

1 Answer

0 votes
0 votes

Such an algorithm could be implemented with the use of a reference bit. After every examination, the bit is set to zero; set back to one if the page is referenced. The algorithm would then select an arbitrary page for replacement from the set of unused pages since the last examination. The advantage of this algorithm is its simplicity—nothing other than a reference bit need be maintained. The disadvantage of this algorithm is that it ignores locality by using only a short time frame for determining whether to evict a page or not. For example, a page may be part of the working set of a process, but may be evicted because it was not referenced since the last examination (that is, not all pages in the working set may be referenced between examinations).

Ref: 

CHAPTER 9

 

Related questions

1 votes
1 votes
1 answer
2
akash.dinkar12 asked Mar 22, 2019
1,112 views
Is it possible for a process to have two working sets, one representing data and another representing code ? Explain.
0 votes
0 votes
1 answer
3
akash.dinkar12 asked Mar 22, 2019
5,058 views
What is the cause of thrashing ? How does the system detect thrashing ? Once it detects thrashing, what can the system do to eliminate this problem ?