What is Demand Paging in Operating System

Advertisements

Types of RAID in Operating System What is Segmentation in Operating System

What is Demand Paging in Operating System

A demand paging mechanism is very much similar to a paging system with swapping where processes stored in the secondary memory and pages are loaded only on demand, not in advance.

demand paging in operating system

Demand paging is a method that loads pages into memory on demand. This method is mostly used in virtual memory. In this, a page is only brought into memory when a location on that particular page is referenced during execution. The following steps are generally followed.

  • Attempt to access the page.
  • If the page is valid (in memory) then continue processing instructions as normal.
  • If a page is invalid then a page-fault trap occurs.
  • Check if the memory reference is a valid reference to a location on secondary memory. If not, the process is terminated (illegal memory access). Otherwise, we have to page in the required page.
  • Schedule disk operation to read the desired page into main memory.
  • Restart the instruction that was interrupted by the operating system trap.

Advantages of Demand Paging

It increases the degree of multiprogramming as many processes can be present in the main memory at the same time. There is a more efficient use of memory as processes having size more than the size of the main memory can also be executed using this mechanism because we are not loading the whole page at a time.

Disadvantages of Demand Paging

The amount of processor overhead and the number of tables used for handling the page faults is greater than in simple page management techniques.


Types of RAID in Operating System What is Segmentation in Operating System

Advertisements

Buy This Ad Space @$20 per Month, Ad Size 600X200 Contact on: hitesh.xc@gmail.com or 9999595223

Pure VPN Privide Lowest Price VPN Just @ $1.65. Per Month with Non Detected IP Lowest Price Non Detected IP VPN

Magenet is best Adsense Alternative here we earn $2 for single link, Here we get links ads. Magenet

For Projects 9999595223

Google Advertisements


Buy Websites 9999595223

Buy College Projects with Documentation Contact on whatsapp 9999595223. Contact on: hitesh.xc@gmail.com or 9999595223 Try this Keyword C++ Programs

Advertisements