Subject: Re: NetBsd on MMU-less CPU's
To: None <netbsd-ports@netbsd.org>
From: Toru Nishimura <nisimura@itc.aist-nara.ac.jp>
List: netbsd-ports
Date: 06/08/2001 16:16:29
Todd Vierling <tv@wasabisystems.com> wrote;

> I don't know about uClinux, but the principles are pretty simple (if a bit
> tedious to accomplish from scratch):
>       <...snip...>
> and optionally:
> 
> * Provide the spawn*() family.  These are well recognized and their presence
>   encourages friendly fork/exec use by encapsulating it in one call.
> 
> * Encourage use of daemon() for backgrounding processes (rather than
>   fork/exit).
> 
> * Make sure you run code that is friendly to memory.  Code that can't pass
>   Purify is fatal.
> 
> ...Feel free to transcribe this braindump somewhere if you'd like.  8-)

It reminds me two UNIX-alike operating systems in early 1990s.

    - MiNT, runs on Atari ST and 68k MacIntosh
    - 68k MINIX, runs Atari, Amiga, and MacIntosh

Both were featured OSes could load program files from external
storages, run multiple programs simultaneously, and terminate them
gracefully.  The former, MiNT, is built upon DOS like operating system
named TOS, and acts as a genuine OS providing UNIX functionalities, yet
w/o conventional MMU.  Relocation was done by one of TOS system call at
program loadtime.  Special provision was offered to build PIC-enabled
programs to make possible to have shared text segment.  It had fork()
call behaves as vfork().

The latter was 68k implementation of famous A. Tannenbum's MINIX.  It
is said to run a lot of efforts w/ sweats to maintain the UNIX process
semantics of "each process owns the entire address space identical to
each other."

There were certainly many implementations of UNIX-alike in which
entire system run inside a single address space.  They were mostly
motivated by necessity to run UNIX-like programs in so-called "embeded
product" circumstances.  The first experience of mine was ANNEX
terminal server made by Encore Computer.  It was designed as a single
address space UNIX-alike which sports NS16032 processor.  More common
examples were then-flourished Xterminals.  It was quite natural to
mimick BSD UNIX as close as possible in order to port MIT's sample
Xserver program.  The Xterminal market was killed later effectively
by the introduction of xmosaic/netscape web browsers which munched
memory eagerly.  W/o proper assistance of memory management hardwares,
memory allocator easily gets suffered from fragmentation of available
memory.  Those systems often die miserably due the lack of effective
memory garbage collecting and relocation.  I was one of them who
abandoned to use Xterminal in favour of web browser. 

Tohru Nishimura
Nara Institute of Science and Technology