Page Replacement (cont)
Factors for choosing best page to replace are heuristic
What happens if ...
- we replace a page which is soon used again
- this causes us to replace another page
- and the second page is soon used again ......
Thrashing = constantly swapping pages in and out of memory
The working set model plus LRU helps avoid thrashing
- recently used page is likely to be used again soon
- not recently used page is unlikely to be used again soon
|