Table of contentsChapter 9: Virtual Memory Slide 2 Objectives Background Virtual Memory That is Larger Than Physical Memory Virtual-address Space Shared Library Using Virtual Memory Demand Paging Transfer of a Paged Memory to Contiguous Disk Space Valid-Invalid Bit Page Table When Some Pages Are Not in Main Memory Page Fault Page Fault (Cont.) Steps in Handling a Page Fault Performance of Demand Paging Demand Paging Example Process Creation Copy-on-Write Before Process 1 Modifies Page C After Process 1 Modifies Page C What happens if there is no free frame? Page Replacement Need For Page Replacement Basic Page Replacement Slide 25 Page Replacement Algorithms Graph of Page Faults Versus The Number of Frames First-In-First-Out (FIFO) Algorithm FIFO Page Replacement FIFO Illustrating Belady’s Anomaly Optimal Algorithm Optimal Page Replacement Least Recently Used (LRU) Algorithm LRU Page Replacement LRU Algorithm (Cont.) Use Of A Stack to Record The Most Recent Page References LRU Approximation Algorithms Second-Chance (clock) Page-Replacement Algorithm Counting Algorithms Allocation of Frames Fixed Allocation Priority Allocation Global vs. Local Allocation Thrashing Thrashing (Cont.) Demand Paging and Thrashing Locality In A Memory-Reference Pattern Working-Set Model Working-set model Keeping Track of the Working Set Page-Fault Frequency Scheme Memory-Mapped Files Memory Mapped Files Memory-Mapped Shared Memory in Windows Allocating Kernel Memory Buddy System Buddy System Allocator Slab Allocator Slab Allocation Other Issues -- Prepaging Other Issues – Page Size Other Issues – TLB Reach Other Issues – Program Structure Other Issues – I/O interlock Reason Why Frames Used For I/O Must Be In Memory Operating System Examples Windows XP Solaris Solaris 2 Page Scanner End of Chapter 9 |
Author: Silberschatz, galvin, and Gagne Homepage: http://www.cs.yale.edu/homes/avi/os-book/os7/index.html Further information: |