Demand paging
Encyclopedia : D : DE : DEM : Demand paging
In computer operating systems, demand paging is a simple method of implementing virtual memory. In a system that uses demand paging, the operating system copies a 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.
Advantages of demand paging:
- Does not load the pages that are never accessed, so saves the memory for other programs and increases the degree of multiprogramming.
- Less loading latency at the program startup.
- Less disk overhead because of less page reads.
- Pages will be shared by multiple programs until they are modified by one of them, so a technique called copy on write will be used to save more resources.
- Ability to run large programs on the machine, even though it does not have sufficient memory to run the program. This method is better than an old technique called overlays.
- Does not need extra hardware support than what paging needs, since protection fault can be used to get page fault.
- Individual programs face extra latency when they access a page for the first time. So prepaging, a method of remembering which pages a process used when it last executed and preloading few of them, is used to improve performance.
- Memory management with page replacement algorithms become slightly more complex.
See also
References
- Tanenbaum, Andrew S. Operating Systems: Design and Implementation (Second Edition). New Jersey: Prentice-Hall 1997.
From Wikipedia, the Free Encyclopedia. Original article here. Support Wikipedia by contributing or donating.
All text is available under the terms of the GNU Free Documentation License See Wikipedia Copyrights for details.
