Lecture 9

21 October, 2011

This lecture is the second of a three-part series looking into memory management issues in OS.

Having a hardcopy of slides during lecture would be helpful. Be prepare to take notes during lecture.

Download Slides: PDF


  • Section 3.4
  • Section 3.5.1, 3.5.2
  • Section 3.6.1, 3.6.2, 3.6.4, 3.6.5

Related Wikipedia entries are listed below. These are for students who are keen to go beyond what is covered in CS2106. Read the articles with a critical mind since Wikipedia is editable by anyone.

7 thoughts on “Lecture 9

  1. Hi Prof

    I have a question to ask, as you have mentioned in the lecture, on LRU approximation with aging. It is a mere approximation hence it is faster than the previous non-approximation algorithm that we have talked about, but it is not accurate.

    I wonder by having a optimum number of bit as the page counter, are we able to reach a high level of accuracy that it will be able to match against the other Page replacement algorithm.

    • Hi Francis,

      I am not sure what you meant by “optimum” here, but yes, the more bits the better.

      Note that even if we have infinite number of bits, it is still an approximation to real LRU, since two pages accessed within the same time slot would have the both R bits set to 1 and we have no way of differentiating them. We need to have more frequent resets of R bits (i.e. shorter time slot) to make it closer to real LRU.

  2. on page 215 section 3.5.1 (local versus global allocation policies)

    it says it uses LRU to evict the page, but why did it pick the page with lowest age? shouldn’t it pick the one with highest age?

    age = current virtual time minus its time of last use

    so the lower the age, it means it was more recently used, so why is Least Recently Used alogrithm picking the lower age and not the highest age?

    • I can’t find the passage you are referring to on Page 215, but I think the author might be referring to “age”, as in the counter used in aging algorithm (Page 206).

  3. Shabnam jan!! Fek konam Faramosh kardi Emaile Mano.chand Rooze Montazeram.albate Hagh dari midoonam Saret shgolohe.Be Har Hal Nemikham Mozahemet besham .Good Liuck.

Comments are closed.