MMU

From SEGGER Knowledge Base
Revision as of 02:03, 2 September 2025 by Rolf (talk | contribs) (Created page with "Category:Knowledge Base A Memory Management Unit (MMU) is a hardware component of a processor that translates virtual addresses into physical addresses. It also manages memory protection and cache control, enabling features such as virtual memory, process isolation, and efficient system memory usage. ==Overview== The MMU sits between the CPU and main memory. Every time the CPU issues a memory access, the MMU translates the virtual address used by software into the...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

A Memory Management Unit (MMU) is a hardware component of a processor that translates virtual addresses into physical addresses. It also manages memory protection and cache control, enabling features such as virtual memory, process isolation, and efficient system memory usage.

Overview

The MMU sits between the CPU and main memory. Every time the CPU issues a memory access, the MMU translates the virtual address used by software into the corresponding physical address in hardware.

Functions

  • Address translation: Converts virtual addresses to physical addresses using page tables.
  • Memory protection: Enforces access rights (read, write, execute) for different memory regions.
  • Cache control: Defines caching behavior for memory regions.
  • Virtual memory support: Provides each process with its own virtual address space.

Typical use

MMUs are common in larger computing systems. If it is present it typically has to be used, even if virtual memory is not a requirement, as it is the only way to actually use the data cache. Even if not using process isolation, it can be quite handy to assign multiple VAs to a single PA in order to allow different types of accesses to the same memory, such as cached and uncached. Accessing main memory uncached can be useful before or after a DMA transfer.