{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

19_ Virtual_Memory_II

19_ Virtual_Memory_II - CSC 4103 Operating Systems Fall...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
CSC 4103 - Operating Systems Fall 2009 Tevfik Ko ! ar Louisiana State University November 3 rd , 2009 Lecture - XIX Virtual Memory - II Least Recently Used (LRU) Algorithm Reference string: 1, 2, 3, 4, 1, 2, 5, 1, 2, 3, 4, 5 1 2 3 5 4 4 3 5 How to implement?? LRU Algorithm (Cont.) Stack implementation – keep a stack of page numbers in a double link form: Page referenced: • move it to the top • requires 6 pointers to be changed No search for replacement Counter implementation ( Needs hardware assistance) Every page entry has a counter; every time page is referenced through this entry, copy the clock into the counter When a page needs to be changed, look at the counters to determine which are to change Use Of A Stack to Record The Most Recent Page References LRU Approximation Algorithms Reference bit With each page associate a bit, initially = 0 When page is referenced bit set to 1 Replace the one which is 0 (if one exists). We do not know the order, however.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}