1.

Explain demand paging?

Answer»

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.


Discussion

No Comment Found