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

Discussion

A page fault occurs when

  • A.a process references a page that is not currently in physical memory
  • B.a page is written to disk
  • C.two processes access the same page
  • D.the page table becomes full

Answer: C

Correct answer: a process references a page that is not currently in physical memory

A page fault is raised when a process references a page whose valid bit in the page table indicates it is not resident in physical memory. Servicing it follows a fixed sequence: the hardware traps to the operating system, which checks that the reference is legal, finds a free frame or selects a victim to evict, writes the victim back if it is dirty, reads the required page in from the backing store, updates the page table, and restarts the instruction that faulted. It is not an error, despite the name. Demand paging depends on page faults as its ordinary mechanism, and a process starts with none of its pages resident, faulting them in as it runs. The cost is what matters: a memory access takes nanoseconds and a disk access milliseconds, so the effective access time is dominated by the fault rate. A rate of one in a hundred thousand can still double the average access time, which is why locality of reference is essential to the scheme working at all.

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

Post your comment

Please log in or register to post a comment.