From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HTML_MESSAGE,MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 23443 invoked from network); 1 Jan 2023 05:27:17 -0000 Received: from minnie.tuhs.org (50.116.15.146) by inbox.vuxu.org with ESMTPUTF8; 1 Jan 2023 05:27:17 -0000 Received: from minnie.tuhs.org (localhost [IPv6:::1]) by minnie.tuhs.org (Postfix) with ESMTP id AE8C24241D; Sun, 1 Jan 2023 15:27:09 +1000 (AEST) Received: from mail-ej1-f45.google.com (mail-ej1-f45.google.com [209.85.218.45]) by minnie.tuhs.org (Postfix) with ESMTPS id 671D842417 for ; Sun, 1 Jan 2023 15:27:02 +1000 (AEST) Received: by mail-ej1-f45.google.com with SMTP id gh17so60244399ejb.6 for ; Sat, 31 Dec 2022 21:27:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=PvUIbiURiRtgKgRQoUwo0XDt9LOaLvD6k324gUcdK50=; b=czhBw2sZkOvztJiNAB+hNkfyiBobO9AyJexZcILDD8ICsUqq4iAMfBU1rvBsn9iPxr 3lPSrUs/1IpAmGmeMspU9B9Se//ItIt0R49y8G4sVPQbCyDpJoXU4+lDJZWqPqILh1Eo Yke3Lioq2zro3wFQwo762mjGee6e7rT6TNs8l8aC1rmYC5zFs+zjMP3hdwH9ZIsN9+LA +2mFIe4zjdp8kUXM+a3DR19Uj27ffzU/bz0xpvx2mWvYtgwkaMlhWk0+3VDan/e8TBHY DrnrK0/CmO3M+pxSTnNtaPqV7l+qNEQsIVRc0UhEwPQoqhBFfP43ohqTSQNrX1f2M50B coFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=PvUIbiURiRtgKgRQoUwo0XDt9LOaLvD6k324gUcdK50=; b=VOygu8/0BSK5SUUeRydwk75ngkDBTaRv5feu7GO2q/pAXPfVutM6GAxKschWWQkKpP xgslY8hE9DYM7wNU1L0PUvmojBECiOFxvdpidUXG2THM8QDNwzN4zpwlBj6fGSpW9nPr OfDNsnNI4U5+iSuTS6PGHNbq0hllZz7RS6hAWbDFIOZaOhGm827mpuBxafqdP1dvVfWm Huzc0C0WbP26cz09tiXmBpvxyXddeF+E8j+lm27LyEUoelwlCL5s6oShXtQj6AYX+uQX NRq1HFxGZ12M/GsxKfZnxTYjhk6bdNSZcc1TjW6MQoYpPd7jrdRvW+LLl0OstFC1ZdTd Qshg== X-Gm-Message-State: AFqh2krTc9QNyipL3vR+c2SOWfHHE7A9ZrjHBkONBV2BW+6D4VmBvxbx mk0Ok6pGQ3masxvlEdISx/9p2UrZKO5udFhvUYwSKQ== X-Google-Smtp-Source: AMrXdXtObt8awVOIrSA5ZWs/3RAN+XwvI03tvo7K/MEq5OvloHuAH2IngIkGoYZVgxN0BJsSBCTzGIWi/mQB/G+/Bso= X-Received: by 2002:a17:906:1858:b0:7c0:e7a6:cd2d with SMTP id w24-20020a170906185800b007c0e7a6cd2dmr2069022eje.317.1672550760736; Sat, 31 Dec 2022 21:26:00 -0800 (PST) MIME-Version: 1.0 References: <52FB6638-AEFF-4A4F-8C2E-32089D577BA0@planet.nl> <18521483-A73C-4B5F-A76A-6098BD93E9BC@planet.nl> In-Reply-To: From: Warner Losh Date: Sat, 31 Dec 2022 22:25:49 -0700 Message-ID: To: Jonathan Gray Content-Type: multipart/alternative; boundary="000000000000f67d5a05f12d113e" Message-ID-Hash: ACDSLU4YOX2IOU65ZJVI6EAXCMSXBI7L X-Message-ID-Hash: ACDSLU4YOX2IOU65ZJVI6EAXCMSXBI7L X-MailFrom: wlosh@bsdimp.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-tuhs.tuhs.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Paul Ruizendaal , The Eunuchs Hysterical Society , segaloco X-Mailman-Version: 3.3.6b1 Precedence: list Subject: [TUHS] Re: A few comments on porting the Bourne shell List-Id: The Unix Heritage Society mailing list Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --000000000000f67d5a05f12d113e Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, Dec 31, 2022, 9:38 PM Jonathan Gray wrote: > On Sat, Dec 31, 2022 at 07:55:28PM -0700, Warner Losh wrote: > > On Sat, Dec 31, 2022 at 5:55 AM Paul Ruizendaal wrote: > > > > > The "assembly code in the Bourne shell" comment is in the same > > > London/Reiser paper. The full quote is: > > > > > > "The (Bourne) shell is the standard user command interpreter. It > required > > > by far the largest conversion effort of any supposedly portable > program, > > > for the simple reason that it is not portable. Critical portions are > coded > > > in assembly language and had to be painstakingly rewritten. The shell > uses > > > its own sbrk which is functionally different from the standard routin= e > in > > > libc. The shell wants the routine which fields a signal to be passed = a > > > parameter giving the number of the signal being caught; signal was > also a > > > private rou- tine. This was handled by having the operating system > provide > > > the parameter in the first place, doing away with the private code fo= r > > > signal. The code in fixargs (for constructing the argument list to an > exec > > > system call) had to be diddled." > > > > > > The files in the V7 tree on the Tuhs website are dated January 1979, > so it > > > would seem that the fixes for 32V were immediately taken back to > Research. > > > As you point out, this means that the comments above do not refer to > the > > > well known source code, but to a predecessor of that (which I don=E2= =80=99t > think > > > survived). > > > > > > > We have ample evidence that V7 was really something more akin to a > rolling > > release. Let me explain: We know from the leaked '50 changes' tape that > > many of the features were set earlier rather than later. This leaked in > > 1978 (if my notes are right), but I found references to it from as earl= y > as > > November 1976 in > > http://www.toad.com/early-usenix-newsletters/197611-unix-news-n11.pdf. > This > > was 18 months after V6 was released, but over 2 years before V7 was > > released. In addition, we know from the AUUS newsletters in the archive > > document that the V7 release process process took a while to get throug= h > > AT&T's legal department (IIRC a year, but I've not gone back to the AUU= S > > newsletters to refresh my recollection). A big push of V7 was to make i= t > > portable as well (with AT&T doing an Interdata 8/32 port themselves, as > > well as at least looking at the Wollongong Interdata 7/32 port and the > > Harvard VM/370 port). In talking to Kirk and others that have been arou= nd > > from approximately that time, 32V was widely viewed as V7 for Vaxen. We > can > > see evidence in the surviving 32V files of evolution from the > 'PDP-11-like > > swapping to a more sophisticated paging algorithm' since we have the > > slowsys directory. It's my contention, as someone that coded in the era > > before good source code control, that it's evidence that somebody got i= t > > working, then renamed/copied it to slowsys while they got paging workin= g > so > > they could build either kernel for A/B testing. Kirk has also told me > that > > the 32V port was started well in advance of V7's release to be both a > > useful product inside of Bell Labs (since Vaxen were starting to appear= ) > as > > well as to prove that V7 was portable enough. I'll be the first to admi= t > > this is at best conjecture that matches available facts, artifacts and > old > > timers recollections (sorry Kirk), but that we have no direct evidence > for. > > It also allowed the 3BSD efforts to get going before the official V7 > > release due to the close ties between Bell Labs and Berkeley and the > DARPA > > project around Unix. > > "So DEC came to us at Holmdel. We were clearly the second string. > Tom London and John Reiser were interested and so was Ken Swanson, and > we got the VAX in early '78. I didn't do any of the technical work. In > fact, I devoted a lot of energy and time to getting the management to > let us do it. It wasn't research, you see. However, they let us take > the time. And in about three months my small group ported Version 7 to > the VAX. We got the machine in January, they had it running in April, > and by August it really worked. > ... > So, with the blessings of BTL Area 11 management, we sent 32V to > Berkeley. It was in October or November, 1978" > > Charlie Roberts in Salus QCU > > "The operating system is Research version 7 as of April 15, 1978. > .. > Work on the C compiler began in mid-December 1977. The hardware arrived > on March 3. We held a party on May 19 to celebrate successful multiuser > operation of the system." > > London and Reiser > A UNIX Operating System for the DEC VAX-11/780 Computer > https://www.bell-labs.com/usr/dmr/www/otherports/32v.html > > > > > I believe that we can conclude that the original 'hard to port' Bourne > > shell was produced around the time of the 50 changes tape, give or take= . > > And that all the unix porting efforts that pre-dated the V7 release > rolled > > what appeared in 32V into V7 to reduce the amount of pdp-11 assembler. > And > > those efforts are what we read about in the paper. > > "The Bourne shell work started either in early 1976, or maybe > late 1975. The first version was VERY different" > > John Mashey in net.unix-wizards, 18 Mar 86 > https://groups.google.com/g/alt.folklore.computers/c/xW3ZgEnFoFs > tuhs/Documentation/AUUGN/AUUGN-V06.6.pdf pg 39 > > "In 1976, Steve Bourne, who had recently joined 1127, wrote a new shell" > Kernighan, UNIX A History and a Memoir, 5.1 pg 88 > > Bourne's AsiaBSDCon 2016 talk also lists 1976 > and goes on to discuss sbrk() use causing problems with ports > https://youtu.be/7tQ2ftt3LO8?t=3D715 And at 5:18 he says he had a vax lab with three vaxen and the Lab's vax port didn't have virtual memory. Bill Joy with 3BSD which had virtual memory. They installed it on the vaxen because they were hitting physical memory limits for some of their programs.... This suggests that the 32V in the TUHS archive is a later one than this early port. 3BSD is listed as being released end of 1979... Still begs the question of when 32v started paging. :) But the time lines match up for the 32v effort to be fed back into the research code base... Warner > > --000000000000f67d5a05f12d113e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Sat, Dec 31, 2022, 9:38 PM Jonathan Gray <jsg@jsg.id.au> wrote:
On Sat, Dec 31, 2022 at 07:55:28PM -0700, Warner Losh = wrote:
> On Sat, Dec 31, 2022 at 5:55 AM Paul Ruizendaal <pnr@planet.nl> w= rote:
>
> > The "assembly code in the Bourne shell" comment is in t= he same
> > London/Reiser paper. The full quote is:
> >
> > "The (Bourne) shell is the standard user command interpreter= . It required
> > by far the largest conversion effort of any supposedly portable p= rogram,
> > for the simple reason that it is not portable. Critical portions = are coded
> > in assembly language and had to be painstakingly rewritten. The s= hell uses
> > its own sbrk which is functionally different from the standard ro= utine in
> > libc. The shell wants the routine which fields a signal to be pas= sed a
> > parameter giving the number of the signal being caught; signal wa= s also a
> > private rou- tine. This was handled by having the operating syste= m provide
> > the parameter in the first place, doing away with the private cod= e for
> > signal. The code in fixargs (for constructing the argument list t= o an exec
> > system call) had to be diddled."
> >
> > The files in the V7 tree on the Tuhs website are dated January 19= 79, so it
> > would seem that the fixes for 32V were immediately taken back to = Research.
> > As you point out, this means that the comments above do not refer= to the
> > well known source code, but to a predecessor of that (which I don= =E2=80=99t think
> > survived).
> >
>
> We have ample evidence that V7 was really something more akin to a rol= ling
> release. Let me explain: We know from the leaked '50 changes' = tape that
> many of the features were set earlier rather than later. This leaked i= n
> 1978 (if my notes are right), but I found references to it from as ear= ly as
> November 1976 in
> http://www.toad= .com/early-usenix-newsletters/197611-unix-news-n11.pdf. This
> was 18 months after V6 was released, but over 2 years before V7 was > released. In addition, we know from the AUUS newsletters in the archiv= e
> document that the V7 release process process took a while to get throu= gh
> AT&T's legal department (IIRC a year, but I've not gone ba= ck to the AUUS
> newsletters to refresh my recollection). A big push of V7 was to make = it
> portable as well (with AT&T doing an Interdata 8/32 port themselve= s, as
> well as at least looking at the Wollongong Interdata 7/32 port and the=
> Harvard VM/370 port). In talking to Kirk and others that have been aro= und
> from approximately that time, 32V was widely viewed as V7 for Vaxen. W= e can
> see evidence in the surviving 32V files of evolution from the 'PDP= -11-like
> swapping to a more sophisticated paging algorithm' since we have t= he
> slowsys directory. It's my contention, as someone that coded in th= e era
> before good source code control, that it's evidence that somebody = got it
> working, then renamed/copied it to slowsys while they got paging worki= ng so
> they could build either kernel for A/B testing. Kirk has also told me = that
> the 32V port was started well in advance of V7's release to be bot= h a
> useful product inside of Bell Labs (since Vaxen were starting to appea= r) as
> well as to prove that V7 was portable enough. I'll be the first to= admit
> this is at best conjecture that matches available facts, artifacts and= old
> timers recollections (sorry Kirk), but that we have no direct evidence= for.
> It also allowed the 3BSD efforts to get going before the official V7 > release due to the close ties between Bell Labs and Berkeley and the D= ARPA
> project around Unix.

"So DEC came to us at Holmdel.=C2=A0 We were clearly the second string= .
Tom London and John Reiser were interested and so was Ken Swanson, and
we got the VAX in early '78.=C2=A0 I didn't do any of the technical= work.=C2=A0 In
fact, I devoted a lot of energy and time to getting the management to
let us do it.=C2=A0 It wasn't research, you see.=C2=A0 However, they le= t us take
the time.=C2=A0 And in about three months my small group ported Version 7 t= o
the VAX.=C2=A0 We got the machine in January, they had it running in April,=
and by August it really worked.
...
So, with the blessings of BTL Area 11 management, we sent 32V to
Berkeley.=C2=A0 It was in October or November, 1978"

Charlie Roberts in Salus QCU

"The operating system is Research version 7 as of April 15, 1978.
..
Work on the C compiler began in mid-December 1977.=C2=A0 The hardware arriv= ed
on March 3.=C2=A0 We held a party on May 19 to celebrate successful multius= er
operation of the system."

London and Reiser
A UNIX Operating System for the DEC VAX-11/780 Computer
https://www.bell-labs.com/usr/= dmr/www/otherports/32v.html

>
> I believe that we can conclude that the original 'hard to port'= ; Bourne
> shell was produced around the time of the 50 changes tape, give or tak= e.
> And that all the unix porting efforts that pre-dated the V7 release ro= lled
> what appeared in 32V into V7 to reduce the amount of pdp-11 assembler.= And
> those efforts are what we read about in the paper.

"The Bourne shell work started either in early 1976, or maybe
late 1975. The first version was VERY different"

John Mashey in net.unix-wizards, 18 Mar 86
https://groups.google.com= /g/alt.folklore.computers/c/xW3ZgEnFoFs
tuhs/Documentation/AUUGN/AUUGN-V06.6.pdf pg 39

"In 1976, Steve Bourne, who had recently joined 1127, wrote a new shel= l"
Kernighan, UNIX A History and a Memoir, 5.1 pg 88

Bourne's AsiaBSDCon 2016 talk also lists 1976
and goes on to discuss sbrk() use causing problems with ports
https://youtu.be/7tQ2ftt3LO8?t=3D715=

And at 5:18 he sa= ys he had a vax lab with three vaxen and the Lab's vax port didn't = have virtual memory. Bill Joy with 3BSD which had virtual memory. They inst= alled it on the vaxen because they were hitting physical memory limits for = some of their programs....=C2=A0

This suggests that the 32V in the TUHS archive is a later one tha= n this early port. 3BSD is listed as being released end of 1979...

Still begs the question of when = 32v started paging.=C2=A0 :)

But the time lines match up for the 32v effort to be fed back into the= research code base...

W= arner

--000000000000f67d5a05f12d113e--