OS_ch09_F07 - I.-C. Lin, Assistant Professor. Textbook:...

Info iconThis preview shows pages 1–15. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: I.-C. Lin, Assistant Professor. Textbook: Operating System Principles 7edCHAPTER 9: VIRTUAL-MEMORY MANAGEMENThapter 9: Virtual MemoryChapter 9: Virtual Memoryackground¡Background¡Demand Pagingopynrite¡Copy-on-Write¡Page Replacementllocation of Frames ¡Allocation of Frames ¡Thrashingemory-apped Files¡Memory Mapped Files¡Allocation Kernel Memoryther Consideration¡Other Consideration¡Operating System ExamplesackgroundBackgroundirtual memoryparation of user logical memory from ¡Virtual memory–separation of user logical memory from physical memory.¡Only part of the program needs to be in memory for execution.y pp gy¡Logical address space can therefore be much larger than physical address space.¡Allows address spaces to be shared by several processes.¡Allows for more efficient process creation.¡Virtual memory can be implemented via:¡Demand paging p g g¡Demand segmentationVirtual Memory That is Larger Than Physical Memory⇒irtual- ddress SpaceVirtual address Spacehared Library Using Virtual MemoryShared Library Using Virtual Memoryemand PagingDemand Pagingring a page into memory only when it is needed¡Bring a page into memory only when it is needed¡Less I/O neededss memory needed ¡Less memory needed ¡Faster response¡More users¡Page is needed ⇒reference to it¡invalid reference ⇒abort¡not-in-memory ⇒bring to memoryTransfer of a Paged Memory to Contiguous Disk Spacege Table When Some Pages Are Not in Main Page Table When Some Pages Are Not in Main Memoryteps in Handling a Page FaultSteps in Handling a Page Faultrformance of Demand PagingPerformance of Demand Pagingge Fault Rate 0 ¡Page Fault Rate 0 ≤p≤1.0¡if p= 0 no page faults = 1, every reference is a fault¡if p1, every reference is a fault¡Effective Access Time (EAT)EAT = (1 –p) x memory access+ p(page fault overhead+ [swap page out ]+ swap page inswap page+ restart overhead)opy- n-riteCopy on Writeopynrite (COW) allows both parent and child processes to ¡Copy-on-Write (COW) allows both parent and child processes to initially sharethe same pages in memoryIf either process modifies a shared page, only then is the page copied¡COW allows more efficient process creation as only modified pages are copied¡Free pages are allocated from a poolof zeroed-out pagesge ReplacementPage Replacementrevent overllocation of memory by modifying pageult ¡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 memoryeed For Page ReplacementNeed For Page Replacementasic Page Replacement...
View Full Document

This note was uploaded on 12/29/2009 for the course INFO ENGI 9801 taught by Professor Wu during the Spring '09 term at 東京国際大学.

Page1 / 47

OS_ch09_F07 - I.-C. Lin, Assistant Professor. Textbook:...

This preview shows document pages 1 - 15. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online