CHAPTER 9:VIRTUAL MEMORY
CHAPTER 9: VIRTUAL MEMORY
REVIEW o Virtual Memory o Demand Paging o Page fault o Page replacement
REVIEW Virtual Memory Demand Paging Page fault Page replacement
o Page Replacement o Copy-on-Write o Allocation of Frames o Thrashing o Memory-Mapped Files o Allocating Kernel Memory o Other Considerations o Operating-System Examples
Page Replacement Copy-on-Write Allocation of Frames Thrashing Memory-Mapped Files Allocating Kernel Memory Other Considerations Operating-System Examples
WHAT HAPPENS IF THERE IS NO FREE FRAME? o Page replacement-find some page in memory,but not really in use,swap it out 。algorithm performance-want an algorithm which will result in minimum number of page faults o Same page may be brought into memory several times
WHAT HAPPENS IF THERE IS NO FREE FRAME? Page replacement – find some page in memory, but not really in use, swap it out algorithm performance – want an algorithm which will result in minimum number of page faults Same page may be brought into memory several times
PAGE REPLACEMENT o Prevent over-allocation of memory by modifying page-fault service routine to include page replacement o Use modify (dirty)bit to reduce overhead of page transfers-only modified pages are written to disk o Page replacement completes separation between logical memory and physical memory-large virtual memory can be provided on a smaller physical memory
PAGE REPLACEMENT Prevent over-allocation of memory by modifying page-fault service routine to include page replacement Use modify (dirty) bit to reduce overhead of page transfers – only modified pages are written to disk Page replacement completes separation between logical memory and physical memory – large virtual memory can be provided on a smaller physical memory