Memory Management Unit

The term Memory Management Unit (MMU, German: memory management unit ) designate a hardware component of a computer, which manages access to memory.

Tasks

Her responsibilities include the conversion of a virtual address to a physical address. :39 -40, it also enables access to the entire virtual address space that is provided by an operating system using the virtual memory management.

The MMU also regulates memory protection tasks. Thus, individual storage areas for the execution of code or other writing can be locked. A distinction is made between the foreclosure of

  • Programs themselves ("horizontal separation" ): programs can not access the memory of other programs (eg in case of error ).
  • Programs against the operating system ( " vertical hierarchy " ): The functioning of the operating system must not be jeopardized by (incorrect ) application programs. Characterized the safe operation in multitasking is much simpler since it is prevented by means of hardware, a fault in a process leading to a direct access to data of another process or the operating system. It can also be presented an initial unfragmented, exclusive memory space by the MMU each process.

Application and use

MMUs were originally designed as an external add-on component for microprocessors. You are now integrated directly into the most high-performance processors or located in the vicinity of the processor: 40 When using a Harvard architecture even two different MMUs exist within the processor - one for the command and one for the data store..

Embedded processors and microcontrollers use mostly no MMU. An MMU would mean more additional chip area and result in increased costs. Applications for this type of application can not rely on an address translation technique therefore mostly. The physical memory must therefore be accurately addressed. 223

Principle of operation

Each requested by a process virtual address is converted by the first memory management unit to a physical address before it is written on the address bus. Selbstnachladende MMUs have a special cache, the translation lookaside buffer, which stores each of the last address translations in the form of a table. Moreover, the MMU contains special fast register ( such as for base addresses and offsets ) to perform the address calculation as efficiently as possible. We distinguish the possible types of address translation (English address translation) on the type of page tables used.

Originally there were two methods of address translation, that by segments ( segmented MMU ) and that for pages ( paged MMU). When address translation by segments each logical storage areas of variable size to a physical memory area of the same size to be implemented. Since this method does not well fit with the memory management of modern operating systems with virtual memory management, it is hardly in use. The address translation for pages normally uses fixed block sizes and is now the usual method. Therefore, the mechanism of translation of logical addresses into physical addresses is referred to in the case of fixed block sizes as well as paging. For processes with a very large address space a very large number of table entries in the MMU would need for a fixed block size. Therefore, some operating systems in presence of a corresponding MMU, summarize parts of the address space by page entries, use the much larger block sizes. One logical address must not be assigned to any time a physical one. If such an address is addressed, there is a so-called error page (English page fault, page miss), then the operating system can load the data from an external storage medium; This process is transparent to an application. This is called " storage virtualization ".

563508
de