From: Paul Ruizendaal <email@example.com>
To: segaloco <firstname.lastname@example.org>
Cc: The Eunuchs Hysterical Society <email@example.com>
Subject: [TUHS] Re: V8 4BSD or 32V Based? (was: Unix V8 Chaosnet, any takers?)
Date: Sat, 16 Jul 2022 11:31:34 +0200 [thread overview]
Message-ID: <E588CCC9-D1C6-48B5-B4F3-13CEAC4F96F1@planet.nl> (raw)
> On 15 Jul 2022, at 19:15, segaloco <firstname.lastname@example.org> wrote:
> Not trying to be combative by any means, but I've been doing a bit of research lately into when V8 was snapped from BSD and where Bell and Berkeley then diverged from that last major confluence, especially with a focus on init and other early stages of userland.
Not taken as combative - always working on the basis of my 'current understanding’ and that is evolving continuously as new views and facts present themselves.
My comments were intended around the kernel code, not the userland. That said, I’ve looked into this a bit more and I think you were more right than I was.
> "Research Unix 8th Edition started from (I think) BSD 4.1c, but with enormous amounts scooped out and replaced by our own stuff." - Dennis Ritchie
That is a good quote, but I think there is a better way to look at this, which is Warren’s tool to establish similarity between files (it is integrated with the Unix Tree webpage on TUHS).
> There's definitely a good chunk of code from 4BSD. Compare init, getty, locore.c (as opposed to .s in V7 back). Heck, even the main.c between the two kernels are more similar to each other than V7. I would almost opt towards calling that being rebased on 4BSD rather than V7 with bits and pieces of BSD added. I could see it being more beneficial to start with 4BSD and tack on necessary Bell bits rather than take V7/32V and try and shoehorn in the VM implementation for VAX.
Looking at various kernel files in the V8 tree, it would seem that the most comparable file in the TUHS database (and excluding V9-V10) would typically be “BBN-TCP”, closely followed by “4BSD”. This BBN-TCP kernel code is based on a snapshot of BSD from August 1980 (see its history file). Joy sent it to Gurwitz for integration of the BBN TCP stack with the BSD kernel. I think it is (or is close to) 4.1BSD.
From the output of Warren’s tool, it also seems that 4.1c deviated/evolved considerably from that base. It would require a more in-depth comparison to say more, but based on this quick check I think it is reasonable to say that V8 started from 4.1BSD (and not 32V as I thought, or 4.1c as dmr remembered). It would be interesting to see what the "enormous amounts scooped out” exactly were -- but maybe this refers more to the userland than the kernel.
Some bits - like select() - were not in 4.1BSD and would have come from 4.1c. The V8 kernel still has a lowcore.s (next to lowcore.c). Interestingly, this has the best match with later BSD versions. In all likelihood, there was cross-fertilisation after the initial code fork.
> The 4.1cBSD copy on the archive does appear to be pretty different, so in terms of raw comparison, I suspect the basis is 4BSD rather than 4.1cBSD. I don't know that we have a clean copy of 4.1BSD gold, I'd be interested to see if the structure of the source code changed between 4.1 and 4.1c, as 4.1c does exhibit the new organization by the BSD folks, 4BSD still shows folders like cmd, lib, and so on.
Yes, we have (now) reached the same conclusion, but don’t forget that V8 adds a lot of innovation on top of that (streams, file system switch, virtual proc file system, networking, remote file system, support for the Blit terminal, etc.). Networking in the V8 kernel (including Chaos) is organised very differently from 4.1cBSD.
next prev parent reply other threads:[~2022-07-16 9:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-15 17:15 [TUHS] " segaloco via TUHS
2022-07-15 17:50 ` [TUHS] " Warner Losh
2022-07-15 18:41 ` segaloco via TUHS
2022-07-16 9:31 ` Paul Ruizendaal [this message]
2022-07-16 10:31 ` Rob Pike
2022-07-16 19:27 Paul Ruizendaal
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).