Subject: Re: The VM system
To: None <tech-kern@NetBSD.ORG>
From: Andrew Cagney <>
List: tech-kern
Date: 11/21/1995 21:29:49

I believe that there are two important problems with the VM system in
4.4 BSD (NetBSD is based on 4.4 BSD code):

	o	no unified buffer cache

	o	Mach

The unified buffer cache...

As part of 4.4BSD, the VM system was given a major update.  The
motivation, as you suggest, was to use a modern VM design (the vm
previously dated back to the late 70's.) and to separate out the
generic and target specific (in Mach speak pmap) parts.

While most of the work was done it was never quite finished.  The
implementors didn't address the problem of ensuring coherency between
files accessed via mmap calls and those accessed via normal io.
Instead, in 4.4bsd, mmap goes via the VM system while file IO goes via
separate, more traditional, buffers.  The `fix' is to unify the VM and
file buffers (well actually eliminate the file buffers and do
everything via VM).

Operating systems that implement this include most modern flavours of
UNIX (the ones I know include SunOS, Solaris, OSF/1, HPUX, Linux,
FreeBSD) and also subsystems implemented on small kernels such as NT
and Chorus.

Mach ...

Mach, Chorus, Amoeba and other kernels (V, sprite, ...) during the
80's served as test beds for implementing various modern Operating
System concepts. Such concepts included things like capibilities,
compatibility subsystems, VM, communication, distributed systems,
micro-kernel design, threads ....

Of them, Mach is probably best known for work by Rashid
[CMU-CS-87-140] for its implementation of Machine-Independant Virtual
Memory Management.

I believe, however, that the Mach VM now has problems.  Firstly its
age - since being written back in 1987 several other alternative VM
systems providing the same basic functionality but built using more
modern designs have emerged.  Secondly its implementation - Mach 2.6
(and has been argued 3.0) was implemented as part of a university
project, the objective was to prototype idea's.  The objective was not
to develop comercial grade software intended for the mainstream OS

How to fix it ...

Unless NetBSD is planing on a major rewrite of the VM system
(implementing concepts such as external pagers, distributed vm caches
and the like) I see little point in re-inventing things.  I think it
would be much easier to implement or adopt the FreeBSD system. But
then again I shouldn't mention the ....

Hope this helps,

				Andrew :-)

PS: Adelaide UNI CS department wrote an internal paper back in 89/90
that compared the operating systems Chorus and Mach. This was part of
the selection process for choosing an OS for an SMP target.  While the
two systems had comparable functionality, the paper concluded that
Chorus was the clear winner - both in terms of its underlying design
and in the quality of its implementation.  Unfortunatly Chorus costs
$$$$ to people outside of the university environment.  Since I was at
Adelaide uni at the time my opinions are influenced by this