MMU question

Francois-Rene Rideau
Tue, 7 Mar 2000 01:20:45 +0100

> A discussion on comp.lang.forth led me to wonder: Is virtual memory
> hardware unnecessary for TUNES?
Unnecessary, yes. Useless, not necessarily.
Many techniques for GC (new/old spaces, BIBOP) and persistence (mmap,
dynamic sizing), and/or typing (again BIBOP, overflow checking) depend
on some kind of behind-the-scenes invalidation and revalidation mechanisms.
MMUs are such mechanisms, despite being coarse-grained, and not flexible.

In absence of MMUs, invalidation and revalidation must be done in software.
This means better compilers. I believe CPUs may usefully support some kind of
basic features for invalidation and revalidation in parallel with computation,
as long as these features do not add overly lag on the critical path.
I have no clear idea of what these basic features would optimally look like.
Maybe someone with more experience than I in software and hardware (co)design
may shed some light on the topic. I believe that LISP machines had all of
type-tagging, GC-tagging and MMU done in parallel with computation.

> We don't need it for protection if we have automatic proofing.
No, but it might still useful for emulating legacy architectures
(or the system itself); unless of course some Crusoe-like JIT can
help emulate the MMU?

> As for garbage collection, I've heard of
> efficient memory managers that don't use VM hardware.  But can we do
> persistent storage, efficiently, without VM hardware?
Of course we can. "Just" wrap basic (or not-so-basic) blocks with
software (|in|re)validation checks instead of hardware ones.
Hardware n-way associative tables look like they can be useful in many cases;
but when memory access grows so much more expensive than CPU cycles, it
might become interesting to do part of table lookup in software.
I'm not keen enough in the details of timing in hardware design.

Note that, more generally, wrapping blocks of code within transactions
is a very generic pattern for "cache" management (which, as everyone knows,
is the root of low-level optimization).

[ François-René ÐVB Rideau | Reflection&Cybernethics | ]
[  TUNES project for a Free Reflective Computing System  |  ]
Out of convicted rapists, 57% admitted to reading pornography.
95% admitted to reading the Bible.