操作系统概念英文课件:Chapter 09-virtual memory.pptxVIP

  • 4
  • 0
  • 约2.61万字
  • 约 76页
  • 2020-12-30 发布于安徽
  • 举报

操作系统概念英文课件:Chapter 09-virtual memory.pptx

Chapter 9 Virtual MemoryTeaching hours: 4hStrong point:Demand PagingPage ReplacementThrashingcontents9.1 Background9.2 Demand Paging9.3 Copy-on-write9.4 Page Replacement9.5 Allocation of Frames 9.6 Thrashing9.7 Memory-mapped file(*)9.8 Allocating Kernel Memory(*)9.9 Other considerations(*)9.10 Operating-System Examples(*)ObjectivesTo describe the benefits of a virtual memory systemTo explain the concepts of demand paging, replacement algorithms, and allocation of page framesTo discuss the principle of the working-set model9.1 BackgroundVirtual memory – separation of user logical memory from physical memory.Only part of the program needs to be in memory for execution.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 Demand segmentationVirtual Memory is Larger Than Physical MemoryShared Library Using Virtual Memory9.2 Demand PagingBring a page into memory only when it is needed.Benefits of demand pagingLess I/O neededLess memory needed Faster responseMore users/tasksPage is needed ? reference to itinvalid reference ? abortnot-in-memory ? bring it into memoryLazy swapper – never swaps a page into memory unless page will be neededSwapper that deals with pages is a pagerSwapper: Transfer of a Paged Memory to Contiguous Disk Spacevalid-invalidbitFrame#1012345671010100Page tableValid-Invalid BitWith each page table entry a valid–invalid bit is associated(1 ? in-memory, 0 ? not-in-memory)Initially valid–invalid bit is set to 0 on all entries.Example of a page table snapshot.During address translation, if valid–invalid bit in page table entry is 0 ? page fault(缺页)0 12valid-invalidbit3Frame#4A0A510B 9 1 0 0 6 1 4 1 0 0 06C12C7283D39F4E4105F51166G127713Hpage table14logicalmemory15physical memoryPager: lazy swapperPage Table When Some Pages Are Not in Main Memory

文档评论(0)

1亿VIP精品文档

相关文档