1.

What do you know about demand paging in operating systems?

Answer»

Demand paging in operating systems is a strategy for LOADING pages (a PAGE is the smallest unit of data for memory management in a virtual memory operating system). A page frame is the smallest contiguous unit of physical memory with a predetermined length into which the operating system maps memory pages) only when they are needed. Virtual Memory is a storage allocation method that MAKES it possible to address secondary memory as if it were the main memory. The addresses used by a program to refer to memory are different from the addresses used by the memory system to designate physical storage sites, and the addresses created by the program are automatically converted to machine addresses. The quantity of secondary memory available is defined by the number of main storage sites available rather than the actual number of main storage locations, and the capacity of virtual storage is restricted by the computer system's addressing scheme.

When a place on the page is addressed during execution, the page is only brought into memory. The following are the steps for getting a page into the main memory or demand paging:

  • An attempt is MADE by the operating system to visit the page.
  • If the page is valid, the CPU proceeds to process instructions as usual (in memory).
  • When a page is wrong, the operating system performs a page fault trap.
  • The operating system then examines the memory reference to see if it is a valid reference to a secondary memory location. The process will be cancelled if this is not the case (illegal memory access). Otherwise, the operating system will have to read the page from the main memory.
  • The operating system ARRANGES a disc operation to read the desired page into the main memory.
  • The operation that was paused as a result of the operating system trap is then restarted or continued.


Discussion

No Comment Found