Virtual Address

From Mill Computing Wiki
Jump to: navigation, search

The Mill architecture defines a unified virtual 60-bit address space that is distributed among processes by the operating system as needed. Portions of the virtual addresses may be mapped to physical addresses in the usual way, and portions may use Implicit Zero and not have physical memory backing at all. The virtual address spaces of different processes may overlap, causing the processes to share access to the overlapped portions. Processes may have different rights to such shared regions; for example, one may be able to both read and write addresses in the region, while another may only be able to read.

A single process may have a very small virtual address space (only as big as is needed to hold its code and static data and whatever portion of its stack that it actually uses), or a very large virtual address space as large as the full 60-bit space minus whatever is needed for other processes and not shared.

In the traditional implementation of virtual memory, each process has a virtual address space that begins at address 0, which means that a single virtual address will refer to a different effective memory location in each different process. This ambiguity must be resolved before a virtual address can be used to look up a location in cache or physical memory. Traditional systems with virtually addressed caches must therefore either combine virtual addresses with a process ID when looking for matching cache tags, or purge cached values associated with other processes before a new process can begin using the cache.

In effect, the Mill solution uses virtual address bits rather than dedicated process IDs to distinguish the virtual memory associated with one process from that associated with others. A traditional system might use 48-bit virtual addresses plus a 12-bit process ID to achieve a similar but less flexible result; with that solution, the effective virtual address space could only be fully used if the maximum number of processes were in use, each using its full range of private addresses.

While a virtual address size of 60 bits is the default choice for Mill processors, if it became desirable to generate a Mill family member with a virtual address space smaller than 60 bits (for example, in an embedded system where the width of address calculation logic is a concern), that change be made easily—and without having to rebalance the size of the virtual address spaces vs. the size of process IDs.