CS FundamentalsModerateGATE CS
A page fault occurs on a store instruction. Which sequence is correct for a demand-paged OS when a free frame exists?
- A. Trap to the kernel, check the access is valid, read the page from backing store into a free frame, update the page table, restart the faulting instruction
- B. Trap, kill the process because the page is invalid, reload the program
- C. Trap, write the page to disk, update the TLB, continue with the next instruction
- D. Trap, allocate a frame, update the page table, skip the faulting instruction
Correct answer: A. Trap to the kernel, check the access is valid, read the page from backing store into a free frame, update the page table, restart the faulting instruction
A page fault on a valid but non-resident page is serviced transparently; the faulting instruction must be restarted (not skipped) once the page is present. Only an invalid reference is fatal.
More Operating Systems questions
- Which hardware support is essential for demand paging to work with instructions that can fault midway (for example a block-move…
- Which statement about the dirty (modified) bit in a page-table entry is correct?
- In the enhanced second-chance (NRU-style) algorithm using (reference, modify) bit pairs, which class of page is the BEST victim and which…
- Assertion (A): Local page replacement can reduce thrashing caused by one misbehaving process affecting others. Reason (R): With local…
- Copy-on-write after fork(): the parent has 1000 resident pages. The child immediately calls exec(). Roughly how many page copies does COW…
- What is the main advantage of memory-mapped files (mmap) over read()/write() for random access to a large file?