Page tables are used to translate the virtual addresses seen by the application in to physical addresses used by the hardware to technique instructions; such hardware that handles this specific translation is often known as the memory management unit. Each entry in the page table holds a flag indicating whether the corresponding page is in actual memory or not. If it is in actual memory, the page table entry will contain the actual memory address at which the page is stored. When a reference is made to a page by the hardware, if the page table entry for the page indicates that it is not currently in actual memory, the hardware raises a page fault exception, invoking the paging supervisor part of the operating technique.
Nearly all implementations of virtual memory divide a virtual address space in to pages, blocks of contiguous virtual memory addresses. Pages are usually at least four kilobytes in size; systems with giant virtual address ranges or amounts of actual memory usually use larger page sizes.
Page tables
Systems can have page table for the whole technique, separate page tables for each application and segment, a tree of page tables for giant segments or some combination of these. If there is page table, different applications jogging simultaneously use different parts of a single range of virtual addresses. If there's multiple page or segment tables, there's multiple virtual address spaces and concurrent applications with separate page tables redirect to different actual addresses.
Paging supervisor
This part of the operating technique creates and manages page tables. If the hardware raises a page fault exception, the paging supervisor accesses secondary storage, returns the page that has the virtual address that resulted in the page fault, updates the page tables to reflect the physical location of the virtual address and tells the translation mechanism to restart the request.
When all physical memory is already in use, the paging supervisor must free a page in primary storage to hold the swapped-in page. The supervisor makes use of of a variety of page replacement algorithms such as least recently used to choose which page to free.
Nearly all implementations of virtual memory divide a virtual address space in to pages, blocks of contiguous virtual memory addresses. Pages are usually at least four kilobytes in size; systems with giant virtual address ranges or amounts of actual memory usually use larger page sizes.
Page tables
Systems can have page table for the whole technique, separate page tables for each application and segment, a tree of page tables for giant segments or some combination of these. If there is page table, different applications jogging simultaneously use different parts of a single range of virtual addresses. If there's multiple page or segment tables, there's multiple virtual address spaces and concurrent applications with separate page tables redirect to different actual addresses.
Paging supervisor
This part of the operating technique creates and manages page tables. If the hardware raises a page fault exception, the paging supervisor accesses secondary storage, returns the page that has the virtual address that resulted in the page fault, updates the page tables to reflect the physical location of the virtual address and tells the translation mechanism to restart the request.
When all physical memory is already in use, the paging supervisor must free a page in primary storage to hold the swapped-in page. The supervisor makes use of of a variety of page replacement algorithms such as least recently used to choose which page to free.
No comments:
Post a Comment