CS 537 Notes, Section #19: Page Selection and Replacement


OSTEP Chapter 22

Once the hardware has provided basic capabilities for virtual memory, the OS must make two kinds of scheduling decisions:

Page selection Algorithms:

Page Replacement Algorithms:

Example: Try the reference string A B C A B D A D B C B, assume there are three page frames of physical memory. Show the memory allocation state after each memory reference.


Paging Work Sheet

Note that MIN is optimal (cannot be beaten), but that the principle of locality states that past behavior predicts future behavior, thus LRU should do just about as well.

Implementing LRU: need some form of hardware support, in order to keep track of which pages have been used recently.



Copyright © 2013, 2018 Barton P. Miller
Non-University of Wisconsin students and teachers are welcome to print these notes their personal use. Further reproduction requires permission of the author.