CS FundamentalsHardGATE CS
A process accesses an address whose PTE has the valid bit clear. Which TWO situations are both possible, and how does the OS tell them apart?
- A. The page is dirty or clean; the OS checks the dirty bit
- B. The TLB is full or empty; the OS checks the TLB
- C. The page is on disk (legal, load it) or the address is outside the process's mapped regions (illegal, segmentation fault); the OS checks its own region list (e.g. VMAs)
- D. The page is shared or private; the OS checks the reference bit
Correct answer: C. The page is on disk (legal, load it) or the address is outside the process's mapped regions (illegal, segmentation fault); the OS checks its own region list (e.g. VMAs)
The PTE alone cannot distinguish 'not yet loaded' from 'never allocated'; the kernel consults its virtual-memory area descriptors to decide between servicing the fault and delivering SIGSEGV.
More Operating Systems questions
- Which feature lets an OS allocate memory for a growing stack only when it is actually touched?
- A system thrashes at 50 processes. Which of these will reduce thrashing? 1. Using local page replacement 2. Adding more physical memory 3…
- Why is pure LRU rarely implemented exactly in hardware, and what is used instead?
- The aging algorithm keeps an 8-bit counter per page; every tick it shifts the counter right by one and puts the page's reference bit into…
- Which is a disadvantage of a very large page size (e.g. 1 GB pages for all memory)?
- Kernel same-page merging (KSM) / page deduplication scans for identical pages across VMs and maps them to one frame. What makes this safe…