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.

Slides:



Advertisements
Similar presentations
9.4 Page Replacement What if there is no free frame?
Advertisements

CS 241 Spring 2007 System Programming 1 Memory Replacement Policies Lecture 32 Klara Nahrstedt.
4.4 Page replacement algorithms
Virtual Memory (Chapter 4.3)
Chapter 101 The LRU Policy Replaces the page that has not been referenced for the longest time in the past By the principle of locality, this would be.
Chapter 10: Virtual Memory
Background Virtual memory – separation of user logical memory from physical memory. Only part of the program needs to be in memory for execution. Logical.
Page Replacement Algorithms
Chapter 4 Memory Management Page Replacement 补充:什么叫页面抖动?
Virtual Memory Management G. Anuradha Ref:- Galvin.
1 Virtual Memory Management B.Ramamurthy. 2 Demand Paging Main memory LAS 0 LAS 1 LAS 2 (Physical Address Space -PAS) LAS - Logical Address.
9.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Virtual Memory OSC: Chapter 9. Demand Paging Copy-on-Write Page Replacement.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 10: Virtual Memory Background Demand Paging Process Creation Page Replacement.
Module 9: Virtual Memory
Module 10: Virtual Memory Background Demand Paging Performance of Demand Paging Page Replacement Page-Replacement Algorithms Allocation of Frames Thrashing.
Virtual Memory Background Demand Paging Performance of Demand Paging
Virtual Memory Introduction to Operating Systems: Module 9.
Computer Organization CS224 Fall 2012 Lesson 44. Virtual Memory  Use main memory as a “cache” for secondary (disk) storage l Managed jointly by CPU hardware.
Lecture 34: Chapter 5 Today’s topic –Virtual Memories 1.
The Memory Hierarchy (Lectures #24) ECE 445 – Computer Organization The slides included herein were taken from the materials accompanying Computer Organization.
Chapter 101 Virtual Memory Chapter 10 Sections and plus (Skip:10.3.2, 10.7, rest of 10.8)
CS 342 – Operating Systems Spring 2003 © Ibrahim Korpeoglu Bilkent University1 Memory Management – 4 Page Replacement Algorithms CS 342 – Operating Systems.
Paging Algorithms Vivek Pai / Kai Li Princeton University.
Chapter 9: Virtual Memory. 9.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Feb 22, 2005 Chapter 9: Virtual Memory Background.
CS 333 Introduction to Operating Systems Class 14 – Page Replacement Jonathan Walpole Computer Science Portland State University.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 9: Virtual Memory.
Virtual Memory Management B.Ramamurthy. Paging (2) The relation between virtual addresses and physical memory addres- ses given by page table.
1 Virtual Memory Management B.Ramamurthy Chapter 10.
CS 333 Introduction to Operating Systems Class 14 – Page Replacement
Page Replacement Algorithms
03/29/2004CSCI 315 Operating Systems Design1 Page Replacement Algorithms (Virtual Memory)
CS 333 Introduction to Operating Systems Class 14 – Page Replacement Jonathan Walpole Computer Science Portland State University.
Operating Systems ECE344 Ding Yuan Page Replacement Lecture 9: Page Replacement.
Virtual Memory.
Page Replacement Algorithms Memory Management. Optimal Page Replacement ▪The label for each page in memory is labeled with the number of instructions.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Virtual Memory.
Operating Systems CMPSC 473 Virtual Memory Management (3) November – Lecture 20 Instructor: Bhuvan Urgaonkar.
Operating Systems (CS 340 D) Princess Nora University Faculty of Computer & Information Systems Computer science Department.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts Essentials – 9 th Edition Chapter 9: Virtual-Memory Management.
Operating Systems (CS 340 D) Princess Nora University Faculty of Computer & Information Systems Computer science Department.
Lecture Topics: 11/24 Sharing Pages Demand Paging (and alternative) Page Replacement –optimal algorithm –implementable algorithms.
CSC 360, Instructor: Kui Wu Memory Management II: Virtual Memory.
Demand Paging Reference Reference on UNIX memory management
CS307 Operating Systems Virtual Memory Fan Wu Department of Computer Science and Engineering Shanghai Jiao Tong University Spring 2012.
Silberschatz, Galvin and Gagne  Operating System Concepts Virtual Memory Virtual memory – separation of user logical memory from physical memory.
CS2100 Computer Organisation Virtual Memory – Own reading only (AY2015/6) Semester 1.
Chapter 9: Virtual-Memory Management. 9.2 Silberschatz, Galvin and Gagne ©2005 Operating System Principles Chapter 9: Virtual-Memory Management 9.1 Background.
CSE 153 Design of Operating Systems Winter 2015 Lecture 12: Page Replacement.
1 Chapter 10: Virtual Memory Background Demand Paging Process Creation Page Replacement Allocation of Frames Thrashing Operating System Examples (not covered.
10.1 Chapter 10: Virtual Memory Background Demand Paging Process Creation Page Replacement Allocation of Frames Thrashing Operating System Examples.
Operating Systems ECE344 Ding Yuan Page Replacement Lecture 9: Page Replacement.
Silberschatz, Galvin and Gagne ©2011 Operating System Concepts Essentials – 8 th Edition Chapter 9: Virtual Memory.
Chapter 9: Virtual Memory. 9.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Background Virtual memory – separation of user logical memory.
COS 318: Operating Systems Virtual Memory Paging.
CS 333 Introduction to Operating Systems Class 14 – Page Replacement
Chapter 9: Virtual Memory – Part I
Demand Paging Reference Reference on UNIX memory management
CSE 120 Principles of Operating
Module 9: Virtual Memory
Demand Paging Reference Reference on UNIX memory management
Chapter 9: Virtual-Memory Management
5: Virtual Memory Background Demand Paging
Practical Session 8, Memory Management 2
Computer Architecture
Operating Systems CMPSC 473
Lecture 9: Caching and Demand-Paged Virtual Memory
Module 9: Virtual Memory
Chapter 9: Virtual Memory CSS503 Systems Programming
Practical Session 9, Memory Management continues
Virtual Memory.
Presentation transcript:

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

Project 3 -- Page Replacement CS-502 Fall 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 CS-502 Fall 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 CS-502 Fall 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 CS-502 Fall 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 CS-502 Fall 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 CS-502 Fall Project 3 Resources Silbershatz, §9.4.7, § Love, Chapter 15 With recognition of Chapter 14 Source code of Linux kernel Anything else you can find Each other And any friends you can con into helping!

Project 3 -- Page Replacement CS-502 Fall 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 CS-502 Fall 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 CS-502 Fall Project Submission Due date – Monday, November 12 I.e., two weeks from today Submit report and data output via web- based Turnin system This is Project 3

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