Re: NetBSD without MMU ?

Wes Peters <[email protected]>
Newsgroups gmane.os.netbsd.devel.ports
Organization Softweyr LLC
Message-ID <[email protected]>
Lennart Augustsson wrote:
> 
> > : You don't _need_ an MMU to implement fork()....  (eg. as in MINIX)
> > 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).
> Not at all.  Original Unix implemented fork() without PIC.  What you do
> is that you copy all of the current process to swap space and then you
> make that process the parent (well, I guess you could make it the child
> if you want).  Context switch will be somewhat slow since it will
> require a swapping out and in.

One of the big improvements in many UNIX implementations in the early 80s
was to implement "shared text" - i.e. copy the data+bss segments but share
the text segment between processes.  This saved memory and fork time both.

> Now, this particular solution may not apply if you don't have swap space. :)

Some of those old systems ran fine with no swap, right up until you tried
to load a large file into the editor.  You get what you pay for.

-- 
            "Where am I, and what am I doing in this handbasket?"

Wes Peters                                                         Softweyr LLC
[email protected]                                           http://softweyr.com/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.