Which of the following tasks is/are the responsibility/responsibilities of the…

2024

Which of the following tasks is/are the responsibility/responsibilities of the memory management unit (MMU) in a system with paging-based memory management?

  1. A.

    Allocate a new page table for a newly created process

  2. B.

    Translate a virtual address to a physical address using the page table

  3. C.

    Raise a trap when a virtual address is not found in the page table

  4. D.

    Raise a trap when a process tries to write to a page marked with read-only permission in the page table

Attempted by 172 students.

Show answer & explanation

Correct answer: B, C, D

Summary: The Memory Management Unit (MMU) is hardware responsible for low-level address translation and protection checks. Higher-level tasks such as allocating or initializing page tables are handled by the operating system.

  • Allocate a new page table for a newly created process — Incorrect. Creating and managing page tables (allocation, initialization, and policy decisions) is the operating system's job; the MMU uses the page table but does not create it.

  • Translate a virtual address to a physical address using the page table — Correct. The MMU maps virtual addresses to physical addresses using page-table entries. Translations are typically cached in a Translation Lookaside Buffer (TLB) to speed repeated accesses; if a cached translation is not available, the MMU (or support hardware) performs the page-table walk.

  • Raise a trap when a virtual address is not found in the page table — Correct. When a page-table entry is missing or marked not-present the MMU cannot complete translation and raises a page-fault trap. The operating system handles this trap (for example, by loading the page from disk or terminating the process).

  • Raise a trap when a process tries to write to a page marked with read-only permission in the page table — Correct. The MMU enforces permission bits stored in page-table entries; an attempted write that violates a read-only permission triggers a protection fault (trap), which the OS then handles (for example, by delivering a signal or terminating the offending process).

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Gate Guidance By Sanchit Sir