3i Infotech Papers: Sample Questions 558 - 558 of 1245

Examrace Placement Series prepares you for the toughest placement exams to top companies.

Question number: 558

» Basic CS » Operating System

Essay Question▾

Describe in Detail

What are demand-and pre-paging?

Explanation

Demand-paging:

Diagram of demand paging.

Diagram of Demand Paging.

Diagram of demand paging.

  • The transfer of page from secondary memory to primary memory is upon need- that is “on demand”- page brought into memory when a location on page is referenced during execution.

  • Process begins execution with no page in physical memory- page faults accrue the process’s working set in physical memory.

Advantages of bringing a page into memory only when needed:

  • Less I/O needed

  • Faster response

  • Support for more users

  • Loading pages of memory on demand lowers the memory footprint.

    • Memory footprint refers to amount of main memory that a program uses or reference while running.

Pre-paging:

Understanding of pre-paging.

Understanding of Pre-Paging.

Understanding of pre-paging.

  • Tries to predict which page would be required next by the processor and brings that proactively into memory.

  • Assumes for example that process requests consecutive address and gets the next page when last address on this page is accessed. Actual prediction schemes might be more complicated.

  • Retrieval of a page other than demanded by a page fault hoping that additional page would be needed in future.

Advantages and Disadvantages of Pre-paging

  • If pre-paged page are unused, I/O and memory are wasted.

  • Good strategies to pre-page might however increase the performance by reducing expensive page faults.