Project 3 Page Replacement in Linux - PowerPoint PPT Presentation

1 / 11
About This Presentation
Title:

Project 3 Page Replacement in Linux

Description:

If there are no unused frames available, select a victim (according to policy) and ... Load in new page from disk (or create new page) Update the PTE and TLB entry! ... – PowerPoint PPT presentation

Number of Views:85
Avg rating:3.0/5.0
Slides: 12
Provided by: hughc7
Category:

less

Transcript and Presenter's Notes

Title: Project 3 Page Replacement in Linux


1
Project 3Page Replacement in Linux
  • CS-502, Operating SystemsFall 2007
  • Due, Monday, November 12, 2007

2
Review VM Page Replacement
  • If there is an unused frame, use it.
  • If there are no unused frames available, select a
    victim (according to policy) and
  • If it contains a dirty page (M 1)
  • write it to disk
  • Invalidate its PTE and TLB entry
  • Load in new page from disk (or create new page)
  • Update the PTE and TLB entry!
  • Restart the faulting instruction
  • What is cost of replacing a page?
  • How does the OS select the page to be evicted?

3
Review The Best Page to Replace
  • The best page to replace is the one that will
    never be accessed again
  • Optimal Algorithm Beladys Rule
  • Lowest fault rate for any reference string
  • Basically, replace the page that will not be used
    for the longest time in the future.
  • Beladys Rule is a yardstick
  • We want to find close approximations

4
Page Replacement Strategies and Algorithms
  • NRU Not recently used
  • FIFO First-in, First-out
  • Second chance
  • Page must migrate to top of queue twice
  • Clock Second chance in a circular list
  • Two-handed clock
  • LRU Least Recently Used
  • Unimplementable, but many approximations

5
Page Replacement Algorithms (continued)
  • Working Set
  • WS Clock
  • Combines Working Set and Clock
  • (not discussed) Page buffering algorithms
  • Silbershatz, 9.4.7

6
Project 3
  • Discover what your version of Linux kernel does
    about page replacement
  • Identify
  • Code modules and data structures
  • Daemons
  • Algorithms
  • Watch it in action
  • E.g., printk(), /proc entries, etc.
  • Write a report
  • 3-5 pages, explain and document

7
Project 3 Resources
  • Silbershatz, 9.4.7, 21.6.2.3
  • Love, Chapter 15
  • With recognition of Chapter 14
  • Source code of Linux kernel 2.6.18.8-0.5
  • Anything else you can find
  • Each other
  • And any friends you can con into helping!

8
Project 3 Report
  • How does page replacement really work
  • Beyond what Love and Silbershatz say in the books
  • What daemons run, who starts them, how often do
    they run, what triggers them, etc.
  • pdflush. Any others?
  • Identify code modules, functions, and data
    structures in kernel
  • Describe any experiments you did to watch page
    replacement in action
  • E.g., when running a big program such as kernel
    build

9
Collaboration
  • You may collaborate with each other in
  • Research on-line
  • Experimenting with kernel
  • Studying kernel code
  • Etc.
  • You must write your own report in your own words
  • 3-5 pages plus any data output from experiments

10
Project Submission
  • Due date Monday, November 12
  • I.e., two weeks from today
  • Submit report and data output via web-based
    Turnin system
  • http//turnin.cs.wpi.edu8088/servlets/turnin.ss
  • This is Project 3

11
Questions?
Write a Comment
User Comments (0)
About PowerShow.com