*BSD News Article 27326


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!munnari.oz.au!bruce.cs.monash.edu.au!harbinger.cc.monash.edu.au!yeshua.marcam.com!usc!elroy.jpl.nasa.gov!ames!koriel!news2me.EBay.Sun.COM!exodus.Eng.Sun.COM!opus!gingell
From: gingell@opus.eng.sun.com (Rob Gingell)
Newsgroups: comp.unix.bsd
Subject: Re: How was BSD written?
Date: 12 Feb 1994 03:36:09 GMT
Organization: Sun
Lines: 63
Distribution: world
Message-ID: <mlojl9INNdn@exodus.Eng.Sun.COM>
References: <1994Feb9.055849.9351@nuchat.sccsi.com> <2jctac$qkd@mail.fwi.uva.nl> <2jekt5$let@nntp2.Stanford.EDU>
NNTP-Posting-Host: opus

In article <2jekt5$let@nntp2.Stanford.EDU> jonathan@leland.Stanford.EDU (Jonathan Stone) writes:
>Casper H.S. Dik (casper@fwi.uva.nl) writes:
>>steve@sccsi.com (Steve Nuchia) writes:
>>>I always wondered how sysVr4 was written.  Did the AT+T programmers
>>>implement virtual memory and TCP/IP from published specifications,
>>>or did they have access to BSD code?
>
>>The virtual memory came from Sun.

Yes, the SunOS 4.0 VM system was extracted from SunOS (along with other
things) and used for the work that resulted in SVR4.  The process of 
doing SVR4 changed it of course, but it's easily recognizable as the
SunOS 4.0 and later VM system.

>Whose VM system was derived from 4.2BSD, if I recall correctly.
>Didn't SunOS 3.x use a "machine-independent"  VM system
>that *was* VAX virtual memory structures, and translate in
>software to the Sun-2/Sun-3 MMU?

The SunOS 4.0 VM system's implementation was not derived from 4.2BSD, though
its specification at the system call level is very clearly derived from
4.2BSD.

However, you're correct that prior to SunOS 4.0, the  memory management system
in SunOS was essentially straight 4.2BSD.  It's something of a stretch to call
the 4.2BSD VM system "machine  independent", and  I don't  believe anyone ever
represented it as such.  It definitely knew it was a VAX VM system.   Ports of
4.2BSD, including the pre-SunOS 4.0 systems,  tried to  create an "abstract
VAX" in the lower levels of the system so that the upper  levels could operate
easily on it.  4.2BSD was certainly well-enough written  that it  was easy for
people to do this, but it basically implemented a VAX abstract machine.

>Yes, it's a nitpick, Sun's VM system changed for SunOS 4.x;
>I don't know how *much* because I've never studied the SunOS source.
>My point is simply that the ancestry is *there*...

I see what you're trying to say, but the point isn't really valid.  Casper's
original assertion is basically correct -- SVR4's VM system is the SunOS 4.0
one, and relative to the code, there's no anscestry there.

The 4.0 implementation bears little but superficial resemblance to the 4.2BSD
one.  Such ancestry as exists comes from the fact that the 4.0 VM system was
essentially a complete implementation (and expansion of) the 4.2BSD
specification.  It was the SunOS 4.0 implementation that was written "from
scratch" starting with the specification, and SVR4 used the resulting
implementation.

Of course, we started with the 4.2BSD specification because (first of all) it
was a pretty decent specification that no one had gotten around to fully
implementing.  We built an original implementation largely because a number of
aspects of the "abstract VAX" were too constraining to deliver both the full
functionality of the specification and to allow us to rapidly get to the
variety of hardware we had and anticipated in the future.  The process of
building that implementation taught us a lot, things that are reflected in the
literal differences from and amplification upon the 4.2BSD specification.

The 4.3BSD specification captured many (if not all) of these differences,
certainly all the important ones.  We were fortunate as we worked to be able
to collaborate with a number of people in the BSD community, and particularly
Kirk McKusick and Mike Karels at CSRG.  Ultimately, of course, later BSD
releases also implemented the full specification, though that implementation
was as independent of SunOS 4.0 as 4.0 was of 4.2BSD.