释义 |
demand paging
demand paging[də′mand ‚pā·jiŋ] (computer science) The characteristic of a virtual memory system which retrieves only that part of a user's program which is required during execution. demand paging (memory management)A kind of virtual memory where a pageof memory will be paged in if an attempt is made to accessit and it is not already present in main memory. Thisnormally involves a memory management unit which looks upthe virtual address in a page map to see if it is pagedin. If it is not then the operating system will page it in,update the page map and restart the failed access. Thisimplies that the processor must be able to recover from andrestart a failed memory access or must be suspended while someother mechanism is used to perform the paging.
Paging in a page may first require some other page to be movedfrom main memory to disk ("paged out") to make room. If thispage has not been modified since it was paged in, it cansimply be reused without writing it back to disk. This isdetermined from the "modified" or "dirty" flag bit in thepage map. A replacement algorithm or policy is used toselect the page to be paged out, often this is the least recently used (LRU) algorithm.
Prepaging is generally more efficient than demand paging.demand pagingCopying a page of program code from disk into memory when required by the program. |