Which of the following tasks is/are the responsibility/responsibilities of the memory management unit (MMU) in a system with paging-based memory management? A. Allocate a new page table for a newly created process B. Translate a virtual address to a physical address using the page table C. Raise a trap when a page is tried to be written to but is marked read-only in the page table D. Raise a trap when a page referenced is not found in memory (page fault)
GATE 2024 · Operating System · Virtual Memory · medium
Answer: B, C, D
- Check each option against MMU hardware capabilities: A: Allocating a page table requires OS software (memory allocator, process management) -- NOT MMU. B: MMU walks the page table on every load/store to translate VA to PA -- YES, MMU. C: MMU reads protection bits in the PTE; a write to a read-only page raises a protection fault -- YES, MMU. D: MMU checks the present/valid bit in the PTE; if page is absent, it raises a page fault trap -- YES, MMU.
- Determine correct options: Tasks B, C, D are all hardware-level operations performed by the MMU. Task A is an OS-level software operation.