This chapter deals with virtual memory implementation using paging in detail. It discusses how the kernel keeps the code and data of a process on a disk and loads parts of it into memory when required, and how the performance of a process is determined by the rate at which parts of a process have to be loaded from the disk,. | Chapter 12 Virtual Memory Copyright © 2008 Operating Systems, by Dhananjay Dhamdhere Introduction Virtual Memory Basics Demand Paging The Virtual Memory Manager Page Replacement Policies Controlling Memory Allocation to a Process Shared Pages Memory-Mapped Files Case Studies of Virtual Memory Using Paging Virtual Memory Using Segmentation 12. Operating Systems, by Dhananjay Dhamdhere Copyright © 2008 MMU translates logical address into physical one Virtual memory manager is a software component Uses demand loading Exploits locality of reference to improve performance Operating Systems, by Dhananjay Dhamdhere Virtual Memory Basics 12. Operating Systems, by Dhananjay Dhamdhere Copyright © 2008 Operating Systems, by Dhananjay Dhamdhere Virtual Memory Basics (continued) 12. Operating Systems, by Dhananjay Dhamdhere Copyright © 2008 Operating Systems, by Dhananjay Dhamdhere Virtual Memory Using Paging MMU performs address translation using page table Effective . | Chapter 12 Virtual Memory Copyright © 2008 Operating Systems, by Dhananjay Dhamdhere Introduction Virtual Memory Basics Demand Paging The Virtual Memory Manager Page Replacement Policies Controlling Memory Allocation to a Process Shared Pages Memory-Mapped Files Case Studies of Virtual Memory Using Paging Virtual Memory Using Segmentation 12. Operating Systems, by Dhananjay Dhamdhere Copyright © 2008 MMU translates logical address into physical one Virtual memory manager is a software component Uses demand loading Exploits locality of reference to improve performance Operating Systems, by Dhananjay Dhamdhere Virtual Memory Basics 12. Operating Systems, by Dhananjay Dhamdhere Copyright © 2008 Operating Systems, by Dhananjay Dhamdhere Virtual Memory Basics (continued) 12. Operating Systems, by Dhananjay Dhamdhere Copyright © 2008 Operating Systems, by Dhananjay Dhamdhere Virtual Memory Using Paging MMU performs address translation using page table Effective memory address of logical address (pi, bi) = start address of the page frame containing page pi + bi 12. Operating Systems, by Dhananjay Dhamdhere Copyright © 2008 Operating Systems, by Dhananjay Dhamdhere Demand Paging Preliminaries 12. Operating Systems, by Dhananjay Dhamdhere Copyright © 2008 Operating Systems, by Dhananjay Dhamdhere Demand Paging Preliminaries (continued) Memory Management Unit (MMU) raises a page fault interrupt if page containing logical address not in memory 12. Operating Systems, by Dhananjay Dhamdhere Copyright © 2008 Operating Systems, by Dhananjay Dhamdhere Demand Paging Preliminaries (continued) A page fault interrupt is raised because Valid bit of page 3 is 0 12. Operating Systems, by Dhananjay Dhamdhere Copyright © 2008 Operating Systems, by Dhananjay Dhamdhere Demand Paging Preliminaries (continued) At a page fault, the required page is loaded in a free page frame If no page frame is free, virtual memory manager performs a