The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
* [TUHS] V8 4BSD or 32V Based? (was: Unix V8 Chaosnet, any takers?)
@ 2022-07-15 17:15 segaloco via TUHS
  2022-07-15 17:50 ` [TUHS] " Warner Losh
  2022-07-16  9:31 ` Paul Ruizendaal
  0 siblings, 2 replies; 6+ messages in thread
From: segaloco via TUHS @ 2022-07-15 17:15 UTC (permalink / raw)
  To: Paul Ruizendaal; +Cc: The Eunuchs Hysterical Society

Re-subject'd as this part of the conversation diverges.

Found the quote that I was thinking of when I said that:

https://yarchive.net/comp/bsd.html

"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

The "I think" adds some murkiness for sure.  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.

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.

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.

- Matt G.

------- Original Message -------
On Friday, July 15th, 2022 at 1:51 AM, Paul Ruizendaal via TUHS <tuhs@tuhs.org> wrote:


> > Message: 6
> > Date: Thu, 14 Jul 2022 17:51:39 +0000
> > From: segaloco segaloco@protonmail.com
> >
> > Given V8 being rebased on 4(.1?)BSD, I suspect the path of least resistance would be to just start grafting V8 code onto the working 4.1BSD.
>
>
> I doubt that V8 is "rebased on 4(.1?)BSD": in my understanding it ported some code from 4xBSD, but it is a different code base.
>
> As I currently understand it, the V8 kernel:
>
> - is a further development from 32V
> - retains the code organisation of the V5..32V versions
> - adds virtual memory code from BSD
> - adds select() from BSD
>
> and then adds all the V8 innovation on top of that (streams, file system switch, virtual proc file system, networking, remote file system, support for the Blit terminal, etc.)
>
> In particular in the area of networking the V8 kernel is organised quite differently from the 4xBSD kernel, including the Chaosnet driver (i.e. it is streams based).
>
> Paul

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [TUHS] Re: V8 4BSD or 32V Based? (was: Unix V8 Chaosnet, any takers?)
  2022-07-15 17:15 [TUHS] V8 4BSD or 32V Based? (was: Unix V8 Chaosnet, any takers?) segaloco via TUHS
@ 2022-07-15 17:50 ` Warner Losh
  2022-07-15 18:41   ` segaloco via TUHS
  2022-07-16  9:31 ` Paul Ruizendaal
  1 sibling, 1 reply; 6+ messages in thread
From: Warner Losh @ 2022-07-15 17:50 UTC (permalink / raw)
  To: segaloco; +Cc: Paul Ruizendaal, The Eunuchs Hysterical Society

[-- Attachment #1: Type: text/plain, Size: 2226 bytes --]

On Fri, Jul 15, 2022 at 11:15 AM segaloco via TUHS <tuhs@tuhs.org> wrote:

> Re-subject'd as this part of the conversation diverges.
>
> Found the quote that I was thinking of when I said that:
>
> https://yarchive.net/comp/bsd.html
>
> "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
>
> The "I think" adds some murkiness for sure.  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.
>
> 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.
>
> 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.
>

The biggest differences between BSD4.1 and BSD4.1c were the addition of FFS
in 4.1b (we have 4.1a from Kirk's DVD, as well as 4.1 and two versions of
4.1c). There's no ufs that I can detect in V8 though.

If we look at the vm, the 4.1c.2 files are from 83, the 4.1 files are from
80 and the v8 files are from 81.

Kirk's DVD has a 4.1.snap on it that lines up more closely with at least
the vm files. I don't recall what these files are from. It's not present in
the TUHS archives that I see. This snapshot is about a year after 4.1BSD
release, but maybe 18 months before the 4.1a snapshot.

Warner

[-- Attachment #2: Type: text/html, Size: 2778 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [TUHS] Re: V8 4BSD or 32V Based? (was: Unix V8 Chaosnet, any takers?)
  2022-07-15 17:50 ` [TUHS] " Warner Losh
@ 2022-07-15 18:41   ` segaloco via TUHS
  0 siblings, 0 replies; 6+ messages in thread
From: segaloco via TUHS @ 2022-07-15 18:41 UTC (permalink / raw)
  To: Warner Losh; +Cc: Paul Ruizendaal, The Eunuchs Hysterical Society

Thanks for the insight, definitely a stronger case for 4.1BSD being involved in some way, shape, or form. Here are a few SCCS strings from V8 vs 4BSD and 4.1(c)BSD.

init:

V8      - "@(#)init.c	4.3 (Berkeley) 10/13/80"
4BSD    - "@(#)init.c	4.3 (Berkeley) 10/13/80"
4.1cBSD - "@(#)init.c	4.10 (Berkeley) 12/22/82"

getty:

V8      - "@(#)getty.c	4.1 (Berkeley) 10/1/80"
4BSD    - "@(#)getty.c	4.1 (Berkeley) 10/1/80"
4.1cBSD - "@(#)getty.c	4.9 4.9 82/12/23"

Locore (not an SCCS string, but comment at top):

V8      - "Locore.c	4.11	81/05/15"
4BSD    - "Locore.c	4.4	11/10/80"
4.1BSD  - "Locore.c	4.11	81/05/15" (Note, used the BBN VAX version here, I couldn't find the kernel sources in the 4.1cBSD on the archive...)

Main (kernel):

V8      - "main.c	4.14	81/04/23"
4BSD    - "main.c	4.2	11/9/80"
4.1BSD  - "main.c	4.14	81/04/23"

crt0: This one doesn't have SCCS info, is identical between V8 and 4BSD in ASM.  The crt0 in 4.1cBSD is in C instead, so not really comparable.

doprnt (c library):

V8      - "@(#)doprnt.s	4.3 (Berkeley) 3/22/81"
4BSD    - No string...
4.1cBSD - "@(#)doprnt.s	4.4 (Berkeley) 11/25/81"

Granted, this isn't exhaustive by any means, but everything I've checked has shown a much stronger 4 through 4.1cBSD character than V7/32V.  It's too bad the march from V7 to V8 isn't more documented, what I'm starting to see here is a incremental approach where perhaps 4BSD was picked up, started to be modified into a research version, and as useful developments were made at Berkeley, they continued to merge in as well as make local changes until V8 was born.

This is all speculation on my part though, I don't want to establish history I wasn't there for, but there is a strong case for V8 starting possibly as 4BSD with a pretty open door to continuing to pull from BSD for a little while.  Specifically, I've seen more 4BSD alignment in userland, more 4.1BSD alignment in the kernel, but it's all, as Dennis put it, "pretty eclectic".

- Matt G.

------- Original Message -------
On Friday, July 15th, 2022 at 10:50 AM, Warner Losh <imp@bsdimp.com> wrote:


>
>
> On Fri, Jul 15, 2022 at 11:15 AM segaloco via TUHS <tuhs@tuhs.org> wrote:
>
> > Re-subject'd as this part of the conversation diverges.
> >
> > Found the quote that I was thinking of when I said that:
> >
> > https://yarchive.net/comp/bsd.html
> >
> > "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
> >
> > The "I think" adds some murkiness for sure. 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.
> >
> > 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.
> >
> > 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.
>
>
> The biggest differences between BSD4.1 and BSD4.1c were the addition of FFS in 4.1b (we have 4.1a from Kirk's DVD, as well as 4.1 and two versions of 4.1c). There's no ufs that I can detect in V8 though.
>
> If we look at the vm, the 4.1c.2 files are from 83, the 4.1 files are from 80 and the v8 files are from 81.
>
> Kirk's DVD has a 4.1.snap on it that lines up more closely with at least the vm files. I don't recall what these files are from. It's not present in the TUHS archives that I see. This snapshot is about a year after 4.1BSD release, but maybe 18 months before the 4.1a snapshot.
>
> Warner

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [TUHS] Re: V8 4BSD or 32V Based? (was: Unix V8 Chaosnet, any takers?)
  2022-07-15 17:15 [TUHS] V8 4BSD or 32V Based? (was: Unix V8 Chaosnet, any takers?) segaloco via TUHS
  2022-07-15 17:50 ` [TUHS] " Warner Losh
@ 2022-07-16  9:31 ` Paul Ruizendaal
  2022-07-16 10:31   ` Rob Pike
  1 sibling, 1 reply; 6+ messages in thread
From: Paul Ruizendaal @ 2022-07-16  9:31 UTC (permalink / raw)
  To: segaloco; +Cc: The Eunuchs Hysterical Society



> On 15 Jul 2022, at 19:15, segaloco <segaloco@protonmail.com> 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.

Paul


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [TUHS] Re: V8 4BSD or 32V Based? (was: Unix V8 Chaosnet, any takers?)
  2022-07-16  9:31 ` Paul Ruizendaal
@ 2022-07-16 10:31   ` Rob Pike
  0 siblings, 0 replies; 6+ messages in thread
From: Rob Pike @ 2022-07-16 10:31 UTC (permalink / raw)
  To: Paul Ruizendaal; +Cc: segaloco, The Eunuchs Hysterical Society

That sounds mostly right, from memory. V8 was definitely adapted from
some 4BSD, not 32V - there was major internal friction on that
decision. I will admit to being a defender of Reiser and London's VAX
port, which was screamingly fast. However.

Regarding select, I recall that Dennis implemented it and passed it to
Berkeley*, but maybe not. He certainly had a hand in its design; I
distinctly remember talking to him about it after one of his trips out
west.

-rob

A note for the historians: Bell Labs's Unix Support Group (USG), which
did development work for Unix, and was not even in the same building
as Research, was run by Berkley (sic) Tague. Thus we had Berkeley Unix
and Berkley's Unix and no end of fun and confusion on that score.


On Sat, Jul 16, 2022 at 7:32 PM Paul Ruizendaal <pnr@planet.nl> wrote:
>
>
>
> > On 15 Jul 2022, at 19:15, segaloco <segaloco@protonmail.com> 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.
>
> Paul
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [TUHS] Re: V8 4BSD or 32V Based?  (was: Unix V8 Chaosnet, any  takers?)
@ 2022-07-16 19:27 Paul Ruizendaal
  0 siblings, 0 replies; 6+ messages in thread
From: Paul Ruizendaal @ 2022-07-16 19:27 UTC (permalink / raw)
  To: The Eunuchs Hysterical Society


> Regarding select, I recall that Dennis implemented it and passed it to
> Berkeley*, but maybe not. He certainly had a hand in its design; I
> distinctly remember talking to him about it after one of his trips out
> west.

That is an interesting comment. DMR was on the steering committee for what would become 4.2BSD.

I once spoke with Kirk McKusick about the origins of the sockets API and I think he told me that there was a lot of debate in the committee whether descriptor readiness API should be stateful (like Haverty’s await() https://www.tuhs.org/cgi-bin/utree.pl?file=BBN-V6/ken/awaitr.c ) or stateless (like select). According to Sam Leffler (who I think added select() to 4.1c BSD) the select system call was somewhat modelled after the ADA select statement. 

I am speculating now, but I would not be surprised if dmr favoured the stateless design and contributed to its design.

Paul


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-07-16 19:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-15 17:15 [TUHS] V8 4BSD or 32V Based? (was: Unix V8 Chaosnet, any takers?) 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
2022-07-16 10:31   ` Rob Pike
2022-07-16 19:27 Paul Ruizendaal

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).