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(a)planet.nl> 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 routine
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 for
> 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’t
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 early
as
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 through
AT&T's legal department (IIRC a year, but I've not gone back 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 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 around
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 it
working, then renamed/copied it to slowsys while they got paging working
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 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
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=715
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