1 / 12

ITFN 2601 Introduction to Operating Systems

ITFN 2601 Introduction to Operating Systems. Lecture 15 Page Replacement Algorithms. Agenda. Not Recently Used First In-First Out Second Chance Clocking LRU Hardware/Software Aging Working Sets. Page Replacement Algorithms. Optimal Swap unnecessary pages Look forward in time

Télécharger la présentation

ITFN 2601 Introduction to Operating Systems

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ITFN 2601Introduction to Operating Systems Lecture 15 Page Replacement Algorithms

  2. Agenda • Not Recently Used • First In-First Out • Second Chance • Clocking • LRU • Hardware/Software • Aging • Working Sets

  3. Page Replacement Algorithms • Optimal • Swap unnecessary pages • Look forward in time • Find page with longest wait until being used • Swap it out • Minimal damage/effect • Unimplementable

  4. Not Recently Used • Not Recently Used • 00 – Not Referenced, Not Modified • 01 – Not Referenced, Modified • 10 – Referenced, Not Modified • 11 – Referenced, Modified • First bit reset on clock-timer • Swap any page from lowest possible group

  5. First in Algorithms • FIFO • Swap the oldest page currently in memory • Could still be very active! • Second Chance • Reset “access” bit • Reset load time

  6. First in, Clocking • Clock • Move the clock hand to point to “oldest” page

  7. Least Recently Used • Listings • Move a page to the front/end of the list each time it is accessed • Very consuming • Counter • Each entry gets a “last used” time • Entry with oldest one goes *poof*

  8. Table N pages NxN matrix of bits Each time page k is used Row k set to 1’s Column k set to 0’s Swap row with the most 0’s More LRU

  9. Software LRU • Not Frequently Used • OS maintains counters • Clock tick => Counter + Read bit • Never forgets, old data remains important • Aging • Shift counter right • Append Read bit at beginning

  10. Aging example

  11. Working Set • Working set • Pages used by a process • Working set as a page • Before the process loads, load the pages • Load an entire working set at once • If it doesn’t all fit, back to normal paging • OS must track the pages in the working set

  12. PRA’s (Summary)

More Related