Presentation is loading. Please wait.

Presentation is loading. Please wait.

Project 3 -- Page Replacement CS-502 Fall 20071 Project 3 Page Replacement in Linux CS-502, Operating Systems Fall 2007 Due, Monday, November 12, 2007.

Similar presentations


Presentation on theme: "Project 3 -- Page Replacement CS-502 Fall 20071 Project 3 Page Replacement in Linux CS-502, Operating Systems Fall 2007 Due, Monday, November 12, 2007."— Presentation transcript:

1 Project 3 -- Page Replacement CS-502 Fall 20071 Project 3 Page Replacement in Linux CS-502, Operating Systems Fall 2007 Due, Monday, November 12, 2007

2 Project 3 -- Page Replacement CS-502 Fall 20072 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 Project 3 -- Page Replacement CS-502 Fall 20073 Review – The Best Page to Replace The best page to replace is the one that will never be accessed again Optimal Algorithm – Belady’s Rule –Lowest fault rate for any reference string –Basically, replace the page that will not be used for the longest time in the future. –Belady’s Rule is a yardstick –We want to find close approximations

4 Project 3 -- Page Replacement CS-502 Fall 20074 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 Project 3 -- Page Replacement CS-502 Fall 20075 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 -- Page Replacement CS-502 Fall 20076 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 -- Page Replacement CS-502 Fall 20077 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 -- Page Replacement CS-502 Fall 20078 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 Project 3 -- Page Replacement CS-502 Fall 20079 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 3 -- Page Replacement CS-502 Fall 200710 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.edu:8088/servlets/turnin.ss This is Project 3

11 Project 3 -- Page Replacement CS-502 Fall 200711 Questions?


Download ppt "Project 3 -- Page Replacement CS-502 Fall 20071 Project 3 Page Replacement in Linux CS-502, Operating Systems Fall 2007 Due, Monday, November 12, 2007."

Similar presentations


Ads by Google