首页 > 试题广场 >

Suppose that your replacement

[问答题]
Suppose that your replacement policy (in a paged system) is to examine each page regularly and to discarding 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?

推荐
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 only using 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 notreferenced since the last examination (i.e. not all pages in the working set may be referenced between examinations.)
发表于 2018-03-23 21:57:49 回复(0)