ITFN 2601 Introduction to Operating Systems - PowerPoint PPT Presentation

1 / 12
About This Presentation
Title:

ITFN 2601 Introduction to Operating Systems

Description:

Least Recently Used. Listings. Move a page to the front/end of the list each ... Not Frequently Used. OS maintains counters. Clock tick = Counter Read bit ... – PowerPoint PPT presentation

Number of Views:20
Avg rating:3.0/5.0
Slides: 13
Provided by: daniels80
Category:

less

Transcript and Presenter's Notes

Title: ITFN 2601 Introduction to Operating Systems


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
More LRU
  • Table
  • N pages
  • NxN matrix of bits
  • Each time page k is used
  • Row k set to 1s
  • Column k set to 0s
  • Swap row with the most 0s

9
Software LRU
  • Not Frequently Used
  • OS maintains counters
  • Clock tick gt 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 doesnt all fit, back to normal paging
  • OS must track the pages in the working set

12
PRAs (Summary)
Write a Comment
User Comments (0)
About PowerShow.com