Subject: Re: NetBSD without MMU ?
To: Matthias Pfaller <>
From: Todd Vierling <>
List: netbsd-ports
Date: 04/17/2002 12:07:02
On Wed, 17 Apr 2002, Matthias Pfaller wrote:

: > However, you do have to do some really major evil and hack the compiler to
: > make all code PIC-and-then-some (ensuring base register relative addressing
: > for all data accesses).

: minix/68k used "shadow memory". After a fork the processes data segment was
: copied to "shadow memory". When the process switched to running the
: shadow memory image was exchanged with the "live" image. This is pretty
: expensive, but as soon as you exec, there is no more need for shadowing.

That's much more evil, actually.  Most modern MMU-less CPUs don't have
segmenting, and shadowing processes involves context switch overhead that's
more than high enough to turn off an embedded developer.

It's simpler to make sure to use base-relative addressing, and simpler yet
to avoid fork() proper and use vfork() and an inverted counterpart for
daemon() -- very little really needs the complete replication semantics of

-- Todd Vierling <>  *  Wasabi & NetBSD:  Run with it.
-- CDs, Integration, Embedding, Support --