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

Discussion

The valid-invalid bit in a page table entry indicates whether

  • A.the page is in the process’s address space and currently in memory
  • B.the page has been modified
  • C.the page may be executed
  • D.the page is shared with another process

Answer: D

Correct answer: the page is in the process’s address space and currently in memory

The valid-invalid bit records whether a page-table entry refers to a page that is legally part of the process’s address space and currently resident in physical memory. Marked invalid, any reference to it traps to the operating system. The trap has two possible meanings, and the operating system must distinguish them. Either the reference is genuinely illegal - outside the address space - in which case the process is terminated with an addressing error; or the page is legal but not resident, in which case it is a page fault and the page is brought in from the backing store. The kernel keeps a separate record of which pages a process is entitled to in order to tell the two apart. The other bits in an entry serve different purposes: the dirty bit records modification, so a clean page need not be written back; the reference bit supports clock and second-chance replacement; and protection bits mark a page read-only or execute-only. Demand paging works by starting every page marked invalid.

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

Post your comment

Please log in or register to post a comment.