Machine-translated by Google. Questions are authored in English.
Top

Discussion

Prepaging differs from demand paging in that it

  • A.brings pages into memory before they are referenced
  • B.never writes pages back to disk
  • C.uses a larger page size
  • D.requires no page table

Answer: D

Correct answer: brings pages into memory before they are referenced

Prepaging brings pages into memory in anticipation of their being needed, rather than waiting for a reference to fault them in. Pure demand paging loads nothing until it is actually referenced. The motivation is the burst of faults a process suffers at start-up or on resuming after being swapped out, when none of its pages are resident. Loading its whole working set at once is cheaper than faulting it in page by page, because a single large transfer costs little more than a small one once the disk seek is paid for. Whether it pays depends on the accuracy of the guess. If a fraction \( \alpha \) of the prepaged pages are actually used, prepaging is worthwhile only when the cost saved on \( \alpha \) faults exceeds the cost of loading the \( 1-\alpha \) that were not needed. Where \( \alpha \) is near zero it is pure waste. Real systems use it selectively - on process resumption, where the working set is already known - and rely on demand paging otherwise.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.