ECE344-Lecture18-PageReplacement

ECE344-Lecture18-PageReplacement - Lecture 18: Page...

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

View Full Document Right Arrow Icon
1 Lecture 18: Page Replacement Algorithms David Lie ECE344 University of Toronto
Background image of page 1

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

View Full DocumentRight Arrow Icon
2 ECE344: Operating Systems Overview Introduction Page replacement algorithms Local vs. global page replacement Page buffering Thrashing
Background image of page 2
3 ECE344: Operating Systems Introduction We have seen that OS allocates memory frames to programs on demand (i.e., page fault) If no frame is available, then OS needs to evict a page to free a frame Which page should be evicted? – A page “cache” miss is similar to a TLB miss or a memory cache miss – However, a miss may require accessing the disk • So miss handling can be very expensive • Disk access times are at least 1000-10000x memory access times
Background image of page 3

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

View Full DocumentRight Arrow Icon
4 ECE344: Operating Systems When does using swap work? Using swap only work if swap is used rarely – Otherwise, performance approaches that of disk Paging schemes depend on locality of reference – Spatial locality • Programs tend to use a small fraction of their memory, or • Memory accesses are near memory accessed recently – Temporal locality • Programs use same memory over short periods of time, or • Memory accessed recently will be accessed again Programs normally have both kinds of locality – Hence, overall cost of paging is not very high
Background image of page 4
5 ECE344: Operating Systems Page Replacement Algorithms It is important to reduce page misses Need to use “informed” page replacement algorithm – Page table, MMU, TLB handling are VM mechanisms
Background image of page 5

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

View Full DocumentRight Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 17

ECE344-Lecture18-PageReplacement - Lecture 18: Page...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online