Pre-Paging in Operating Systems | OS Tutorials YASH PAL, July 2, 2026July 2, 2026 In Operating System Pre-paging is a page-fetching policy that brings pages into main memory without any demand. The fetching policy determines when a page should be brought into main memory. The two common alternatives are:Demand PagingPrepagingWith demand paging, a page is brought into main memory only when a reference is made to a location on that page. If the other elements of memory management policy are good, the following should happen.When a process is first started, there will be a huge number of page faults. As more and more pages are brought in, the principle of locality suggests that most future references will be to pages that have recently been brought in.Thus, after a time, the number of page faults drops to a very low level.With prepaging, pages other than the one demanded by a page fault are brought in.Prepaging exploits the characteristics of most secondary memory devices such as disks, which have seek times and rotational latency.If the pages of a process are stored contiguously in secondary memory, it is more efficient to bring in several contiguous pages at once rather than one at a time over an extended period.This policy is ineffective if most of the extra pages that are brought in are not referenced.The prepaging policy could be employed either when a process first starts up or every time a page fault occurs. However, the utility of prepaging has not been established.Prepaging should not be confused with swapping. When a process is swapped out of the memory and put in a suspended state, all of its resident pages are moved out.When a process is resumed, all of the pages that were previously in main memory are returned to main memory.Prepaging can be an advantage in some cases; it depends on whether the cost of prepaging is less than the cost of servicing the corresponding page faults.It may be the case that many of the pages brought back into memory by prepaging are not used.Let us assume that s pages are prepaged and a fraction α\alpha of these s pages are actually used (0≤α≤1).( 0 \le \alpha \le 1).The question may arise whether the cost of a saved page fault is greater or less than the cost of prepaging (1 – α)\alpha ) unnecessary pages.If α\alpha is close to zero, prepaging loses; if α\alpha is close to one, prepaging wins. engineering subjects Operating System Operating System