13.07.2015 Views

An Operating Systems Vade Mecum

An Operating Systems Vade Mecum

An Operating Systems Vade Mecum

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

108 Space Management Chapter 310000900080007000MethodMaxMRUMinArea540239295143603606000Cold faults500040003000200010000010 20 30 40 50 60page frames availableFigure 3.22 Faults for Max, MRU, and Min70807.5 Not used recently (NUR)The expensive hardware we contemplated for LRU can be reduced to a Boolean (1-bit)clock. True means ‘‘now,’’ and false means ‘‘significantly earlier.’’ A clock designedlike this does not even have to tick. Every time a page is referenced, the hardware marksit (for example, in the page table) with the current time, that is, by setting a Used field totrue. The storage manager may reset the field to false at any time. The Used field is likethe Dirty field discussed earlier. The difference is that the Dirty field is only set to truewhen an access writes in the page or segment, whereas the Used field is set for referencesof any kind.When a page frame is needed, pages with true Used field have been used morerecently than those with false Used field. The replacement algorithm therefore tries tofind a page with false Used field to discard:NURSelect any page frame whose Used field is false.To be fair and not victimize the same page excessively, the search for such a page shouldcirculate through the pages in the page table, each search starting where the previous

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!