——————————————————————————————————————————————
MMU的大名,早就听说了,可是一直不知道它是怎么工作的,前几月貌似看的模模糊糊,现在快年关了,来做个了结。在文中我会大量引用英文,并且不做翻译,因为俺觉得我的英文水平会误解别人。O(∩_∩)O哈哈~
One of the key services provided by an MMU is the ability to manage tasks as indepen-dent programs running in their own private memory space. A task written to run under the control of an operating system with an MMU does not need to know the memory
requirements of unrelated tasks. This simplifies the design requirements of individual tasks running under the control of an operating system.
——给每个任务提供独立的运行空间。
The MMU simplifies the programming of application tasks because it provides the resources needed to enable virtual memory—an additional memory space that is indepen-dent of the physical memory attached to the system. The MMU acts as a translator, which
converts the addresses of programs and data that are compiled to run in virtual memory to the actual physical addresses where the programs are stored in physical main memory.This translation process allows programs to run with the same virtual addresses while being
held in different locations in physical memory.——MMU作为一个转换器。程序可以运行在同一块虚拟内存,而各自存储在不同的物理内存。
We begin with a review of the protection features of an MPU and then present the additional features provided by an MMU. We introduce relocation registers, which hold the conversion data to translate virtual memory addresses to physical memory addresses,
and the Translation Lookaside Buffer (TLB), which is a cache of recent address relocations.We then explain the use of pages and page tables to configure the behavior of the relocation registers.
——这里介绍重定位寄存器,它保存转换虚拟地址到物理地址的数据;介绍旁路缓冲器(TLB),它是存放最近的的地址重定位信息的cache(高速缓存);介绍如是使用页和页表来重新配置重定位寄存器。
We then discuss how to create regions by configuring blocks of pages in virtualmemory .We end the overview of the MMU and its support of virtual memory by showing how tomanipulate the MMU and page tables to support multitasking.
——讨论通过虚拟内存中的块页表来配置来创建区域。最后演示使用虚拟内存来支持和创建多任务操作系统
___________________________________________________________________________
现在来看看这个MMU到底有什么东西,有什么特备的硬件结构
—————————————————————————————————————
To permit tasks to have their own virtual memory map, the MMU hardware performs address relocation, translating the memory address output by the processor core before it reaches main memory. The easiest way to understand the translation process is to imagine
a relocation register located in the MMU between the core and main memory.——地址重定位寄存器,其实就是地址转换器
Figure 14.1 shows an example of a task compiled to run at a starting address o