1 / 11

Project 3 Page Replacement in Linux

Project 3 Page Replacement in Linux. CS-502, Operating Systems Fall 2007 Due, Monday, November 12, 2007. 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

Télécharger la présentation

Project 3 Page Replacement in Linux

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. Project 3Page Replacement in Linux CS-502, Operating SystemsFall 2007 Due, Monday, November 12, 2007 Project 3 -- Page Replacement

  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? Project 3 -- Page Replacement

  3. 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 Project 3 -- Page Replacement

  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 • … Project 3 -- Page Replacement

  5. Page Replacement Algorithms (continued) • … • Working Set • WS Clock • Combines Working Set and Clock • (not discussed) – Page buffering algorithms • Silbershatz, §9.4.7 Project 3 -- Page Replacement

  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 Project 3 -- Page Replacement

  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! Project 3 -- Page Replacement

  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 Project 3 -- Page Replacement

  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 Project 3 -- Page Replacement

  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.edu:8088/servlets/turnin.ss • This is Project 3 Project 3 -- Page Replacement

  11. Questions? Project 3 -- Page Replacement

More Related