(computer science) The characteristic of a virtual memory system which retrieves only that part of a user's program which is required during execution.
| Sci-Tech Dictionary: demand paging |
(computer science) The characteristic of a virtual memory system which retrieves only that part of a user's program which is required during execution.
| 5min Related Video: Demand paging |
| Computer Desktop Encyclopedia: demand paging |
Copying a page of program code from disk into memory when required by the program.
Download Computer Desktop Encyclopedia to your iPhone/iTouch
| Wikipedia: Demand paging |
In computer operating systems, demand paging is an application of virtual memory. In a system that uses demand paging, the operating system copies a disk page into physical memory only if an attempt is made to access it (i.e., if a page fault occurs). It follows that a process begins execution with none of its pages in physical memory, and many page faults will occur until most of a process's working set of pages is located in physical memory. This is an example of lazy loading techniques.
Contents |
Demand paging, as opposed to loading all pages immediately:
Demand paging follows that pages should only be brought into memory if the executing process demands them. This is often referred to as lazy evaluation as only those pages demanded by the process are swapped from secondary storage to main memory. Contrast this to pure swapping, where all memory for a process is swapped from secondary storage to main memory during the process startup.
When a process is to be swapped into main memory for processing, the pager guesses which pages will be used prior to the process being swapped out again. The pager will only load these pages into memory. This process avoids loading pages that are unlikely to be used and focuses on pages needed during the current process execution period. Therefore, not only is unnecessary page load during swapping avoided but we also try to preempt which pages will be needed and avoid loading pages during execution.
Commonly, to achieve this process a page table implementation is used. The page table maps logical memory to physical memory. The page table uses a bitwise operator to mark if a page is valid or invalid. A valid page is one that currently resides in main memory. An invalid page is one that currently resides in secondary memory. When a process tries to access a page, the following steps are generally followed:
In Unix systems, and also in Linux, demand paging is actually achieved by using the mmap() system call itself. The operating system maps the executable file (and its dependent libraries) into the newly created program's virtual address space, without actually allocating any physical RAM for the contents of those files. Since executable code is usually read-only and shared, the program literally runs from the page cache.
| This article includes a list of references, related reading or external links, but its sources remain unclear because it lacks inline citations. Please improve this article by introducing more precise citations where appropriate. (June 2009) |
This entry is from Wikipedia, the leading user-contributed encyclopedia. It may not have been reviewed by professional editors (see full disclaimer)
| Multiaccess computer (computing) | |
| UNIVAC 90/60 | |
| Arch Wireless, Inc. |
| What is page in and page out? Read answer... | |
| What is derived demand and autonomous demand? Read answer... | |
| What is Joint Demand and Composite Demand? Read answer... |
| Demand paged memory management? | |
| Distinguish demand and anticipatory paging? | |
| Difference between paging and demand paging? |
Copyrights:
![]() | Sci-Tech Dictionary. McGraw-Hill Dictionary of Scientific and Technical Terms. Copyright © 2003, 1994, 1989, 1984, 1978, 1976, 1974 by McGraw-Hill Companies, Inc. All rights reserved. Read more | |
![]() | Computer Desktop Encyclopedia. THIS COPYRIGHTED DEFINITION IS FOR PERSONAL USE ONLY. All other reproduction is strictly prohibited without permission from the publisher. © 1981-2009 Computer Language Company Inc. All rights reserved. Read more | |
![]() | Wikipedia. This article is licensed under the Creative Commons Attribution/Share-Alike License. It uses material from the Wikipedia article "Demand paging". Read more |
Mentioned in