Which of the following tasks is/are the responsibility/responsibilities of the memory management unit (MMU) in a system with paging-based memory management?
Answer
(B), (C), (D)
Explanation
The MMU is the hardware between the CPU and memory that handles every memory reference. Its jobs are the ones done on each access:
- B: it translates each virtual address to a physical address through the page table, with the TLB caching recent translations.
- C: if the page table entry is invalid or not present, it cannot translate the address and raises a trap (a page fault) for the OS to handle.
- D: it checks the protection bits on every access and traps when a process writes to a read-only page.
A is not an MMU task. Creating a process and allocating and filling its page table is done in software by the operating system kernel; the MMU only uses the table the OS has set up, for example through the page-table base register.
Answer: B, C, D