Subject: Re: Is an MMU necessary?
To: Grant Stockly <gussie@stockly.com>
From: Todd Whitesel <toddpw@best.com>
List: netbsd-ports
Date: 07/26/2000 05:04:50
> Can you get by without a MMU?

Sure, but you lose some important features.

For one thing, all your programs have to share the same address space.
This means you have to either compile everything as PIC (position
independent code) or you have to be prepared to relocate every program
as it is loaded in so it can run from an available chunk of memory.

Lots of older/lower-end operating systems do just that.

But it is considerably slower than letting an MMU take care of things
and let every program in the system think it has its own standardized
address space.

Another thing the MMU does for you is let you simulate having more real
memory than you've actually got -- you can trade speed and disk space
for the ability to let your programs pretend they've got huge amounts
of physical memory to play with.

Systems that have no MMU are fine for a specialized application where you
only run a fixed set of programs, with a reasonably bounded amount of data.
When the system is designed for this purpose alone, it can be considerably
faster than a comparable MMU-using system -- which is why many dedicated
devices use operating systems that have no MMU (but even that market is
beginning to offer MMU ability as a development aid and also to help
support system upgrades such as device-specific plug-ins).

For a general purpose system however, life is much easier if you design
to use an MMU from the ground up. The original versions of UNIX did not
use an MMU but as the hardware became available, the MMU soon became a
critical hardware requirement.

People have indeed hacked Linux/BSD/etc to run on hardware with no MMU,
but there are always significant sacrifices involved which they aren't
very interested in talking about.

Todd Whitesel
toddpw @ best.com