Linear Address Spaces: Unsafe at any speed
The Mill&#x27;s memory model is one of its most interesting features IMO [1] and solves some of the same problems, but by going the other way.<p>On the Mill the whole processor bank uses a global virtual address space. TLB and mapping to physical memory happens at the <i>memory controller</i>. Everything above the memory controller is in the same virtual address space, including L1-L3+ caches. This solves <i>a lot</i> of problems, for example: If you go out to main memory you&#x27;re already paying ~300 cycles of latency, so having a large silicon area &#x2F; data structure for translation is no longer a 1-cycle latency problem. Writes to main memory are flushed down the same memory hierarchy that reads come from and succeed as soon as they hit L1. Since all cache lines are in the same virtual address space you don&#x27;t have to track and synchronize reads and writes across translation zones within the cache hierarchy. When you request an unallocated page you get the whole pre-zeroed page back <i>instantly</i>, since it doesn&#x27;t need to be mapped to physical pages until writes are flushed out of L3. This means its possible for a page to be allocated, written to, read, and deallocated which <i>never actually touches physical memory</i> throughout the whole sequence and the whole workload is served purely within the cache hierarchy.<p>Protection is a separate system (&quot;PLB&quot;) and can be much smaller and more streamlined since it&#x27;s not trying to do two jobs at once. The PLB allows processes to give fine-grained temporary access of a portion of its memory to another process; RW, Ro, Wo, byte-addressed ranges, for one call or longer etc. Processes get allocated available address space on start, they can&#x27;t just assume they own the whole address space or start at some specific address (you should be using ASLR anyways so this should have no effect on well-formed programs, though there is a legacy fallback).<p>[1]: My previous comment: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=27952660" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=27952660</a>