Minor corrections to the material in Paul's text.
This is meant to be a laundry-list of facts, not a
suggested set of words; I'm feeling too prolix this
morning to produce the latter, and figure those on the
list may be interested in the petty details anyway.
The initial user-mode environment was a mix of 32V,
subsequent work within 1127, and imports from 4.1BSD.
I don't know the exact heritage: whether it was 1127's
work with 4.1BSD stuff added or vice-versa.
The kernel was a clean break, however: 4.1xBSD for some
value of x (probably 4.1a but I don't remember which)
with Research changes. By the time of V8, that means:
-- All trace of BSD's original network interfaces removed,
except that select(2) remained in a slightly-different
form.
-- Stream I/O system added; all communication-device
drivers (serial ports, Ethernet, Datakit) changed to
work with streams. Pipes were streams.
-- File system switch added, supporting Killian's /proc
and Weinberger's first-generation (neta) network file
system.
-- Berkeley FFS replaced by Weinberger's bitmapped
file system: essentially the V7 file system except
the free list was a bitmap and the blocksize was 4KiB.
Hacky implementation, depending on a flag bit in the
minor device number; didn't use the file system switch.
Old 512-byte-block file systems had to be supported
partly to ease the changeover, partly because the first
version had a limited bitmap size so file systems larger
than about 120MiB wouldn't work. This limit was removed
later. (In retrospect I'm surprised I didn't then insist
on converting any remaining old-format file systems in
our domain and then removing the old-format code from
the kernel, since user-mode tools--including a user-mode
file server!--could be used to access any old disks
discovered later.)
For the purposes of Paul's note it probably suffices
just to say that there was a restart with a 4.1-series
kernel with changes as he describes, except also the
new file system format.
Norman Wilson
Toronto ON
Doug McIlroy:
The v8 manual was printed in 1985, but the system was
not "released" in the ordinary sense until a couple of
years ago. Some v8 features made it out into the world
via USG; some were described in open literature or
Usenix presentations, but I believe none were formally
shipped out of the company.
I'm surprised; I thought copies of the V8 manual existed
when I arrived at the Labs in mid-1984, but the date on
the title page is indeed February 1985.
There was no general release of V8 like those for earlier
Research systems, but there was a quasi-official V8 tape
sent to a handful of universities under a special letter
agreement. I remember working on that with Dennis,
checking that everything compiled and worked properly
in a chroot environment before the tape was written.
I think that happened in the summer of 1985.
I don't remember our doing that work, to make a single
coherent consistency-checked release tape, for any
subsequent system; just one-off caveat-emptor snapshots.
Norman Wilson
Toronto ON
The v8 manual was printed in 1985, but the system was
not "released" in the ordinary sense until a couple of
years ago. Some v8 features made it out into the world
via USG; some were described in open literature or
Usenix presentations, but I believe none were formally
shipped out of the company.
Doug
I ran a search for ‘Datakit’ on the archive of this maling list and came across the below message from Norman Wilson (Sep 2017). Having spent quite a bit of time recently on figuring out Datakit details and 8th Edition source, I now much better understand what he was saying — or at least I think I do.
It made me take another look at the /dev/pk[0123].c files in the V7 source code. I’d seen it before, but always thought it was UUCP code.
Now I’m wondering. It looks like UUCP packet "protocol g” is maybe much the same as the original (“Chesson”) packet algorithm for Datakit, and if so it would be “dual use”. It would seem that in V7 line discipline ‘0’ was normal tty handling, discipline ‘1’ was PK protocol over serial and line discipline ‘2’ was PK protocol over something with CRC in the driver - whatever that was.
If the above thought is correct, then it shines a light on network buffering in V7: it uses buffer space in blocks of n*32 bytes, carved out from a pool of disk buffers (see pk3.c); it pre-allocates space for one full receive window.
I have not fully figured it out, but at first glance it seems that the PK line discipline was only integrated with the DH-11 driver in the public V7 source. That would make sense in a networking context, as that board offered input buffering / DMA output to reduce the interrupt load. In 1979 Datakit seems to have connected over a DR-11C board, but there is no driver for that in the V7 source tree.
Am I on the right track?
=====
The point of the stream I/O setup with
stackable line disciplines, rather than the old single
line-discipline switch, was specifically to support networking
as well as tty processing.
Serial-device drivers in V7 used a single line-discipline
driver, used variously for canonical-tty handling and for
network protocols. The standard system as used outside
the labs had only one line discipline configured, with
standard tty handling (see usr/sys/conf/c.c). There were
driver source files for what I think were internal-use-only
networks (dev/pk[12].c, perhaps), but I don't think they
were used outside AT&T.
The problem Dennis wanted to solve was that tty handling
and network protocol handling interfered with one another;
you couldn't ask the kernel to do both, because there was
only one line discipline at a time. Hence the stackable
modules. It was possible to duplicate tty handling (probably
by placing calls to the regular tty line discipline's innards)
within the network-protocol code, but that was messy. It also
ran into trouble when people wanted to use the C shell, which
expected its own special `new tty' line discipline, so the
network code would have to know which tty driver to call.
It made more sense to stack the modules instead, so the tty
code was there only if it was needed, and different tty
drivers could exist without the network code knowing or caring.
When I arrived at the Labs in 1984, the streams code was in
use daily by most of us in 1127. The terminals on our desks
were plugged into serial ports on Datakit (like what we call
a terminal server now). I would turn on my terminal in the
morning, tell the prompt which system I wanted to connect to,
and so far as I could tell I had a direct serial connection.
But in the remote host, my shell talked to an instance of the
tty line module, which exchanged data with a Datakit protocol
module, which exchanged data with the low-level Datakit driver.
If I switched to the C shell (I didn't but some did), csh would
pop off the tty module and push on the newtty module, and the
network code was none the wiser.
Later there was a TCP/IP that used the stream mechanism. The
first version was shoehorned in by Robert T Morris, who worked
as a summer intern for us; it was later cleaned up considerably
by Paul Glick. It's more complicated because of all the
multiplexers involved (Ethernet packets split up by protocol
number; IP packets divided by their own protocol number;
TCP packets into sessions), but it worked. I still use it at
home. Its major flaw is that details of the original stream
implementation make it messy to handle windows of more than
4096 bytes; there are also some quirks involving data left in
the pipe when a connection closes, something Dennis's code
doesn't handle well.
The much-messier STREAMS that came out of the official System
V people had fixes for some of that, but at the cost of quite
a bit more complexity; it could probably be done rather better.
At one point I wanted to have a go at it, but I've never had
the time, and now I doubt I ever will.
One demonstration of virtue, though: although Datakit was the
workhorse network in Research when I was there (and despite
the common bias against virtual circuits it worked pretty well;
the major drawback was that although the underlying Datakit
fabric could run at multiple megabits per second, we never had
a host interface that could reliably run at even a single megabit),
we did once arrange to run TCP/IP over a Datakit connection.
It was very simple in concept: make a Datakit connection (so the
Datakit protocol module is present); push an IP instance onto
that stream; and off you go.
I did something similar in my home V10 world when quickly writing
my own implementation of PPP from the specs many years ago.
The core of that code is still in use in my home-written PPPoE code.
PPP and PPPoE are all outside the kernel; the user-mode program
reads and writes the serial device (PPP) or an Ethernet instance
that returns just the desired protocol types (PPPoE), does the
PPP processing, and reads and writes IP packets to a (full-duplex
stream) pipe on the other end of which is pushed the IP module.
All this is very different from the socket(2) way of thinking,
and it has its vices, but it also has its virtues.
Norman Wilson
Toronto ON
Here is a question for the old hands from the Labs, I’m trying to get the timeline of some development steps right.
The two main things are: when did the 4.1 merge take place, and when were ‘streams’ added?
Going by file dates, the surviving 8th edition source appears to be from 1985. I can see that a lot of files in /usr/include did not change after Jan 1982 (e.g. nlist.h). This suggests that early in 1982 the merge between 4.1 code and 32V code took place, to create the foundation for further development (“proto 8th edition”, so to speak).
Similarly, there are a dozen or so files in the kernel that all have a file date of November 1982. The most interesting one of these is “dtline.c”, a character mode Datakit driver: it uses ‘streams’. This suggests that there was a further code merge late in 1982 and implies that ‘streams’ were developed prior to that date.
From the S/F-Unix papers it seems that ‘streams’ did not exist in 1981, at least they are not mentioned in an otherwise comprehensive set of papers. On the other hand, the S/F-Unix work was done in the Exploratory group, not the Research group: maybe it was inappropriate to mention.
All in all, my hypotheses would be that:
- the 32V/4.1 merge took place early in 1982
- ‘streams’ were developed in 1982 on 32V (maybe also V7) systems
- a further merge took place late in 1982 that combined the new base with latest developments
Does that sound correct, or was it all different?
Related is the question when the "file system switch" was added. It must have been later than 1981 and before 1985, but I have not been able to pinpoint it further.
Paul
Andrew Hume (andrew(a)humeweb.com) has had trouble posting this, and asked me
to try. Reply directly to Andrew, not to me.
============================
I have the following manuals available:
3 Eight Edition Unix manuals (2 shrink-wrapped, one not (but still good
condition))
Unix programmers manual, Release 3.0 (Dolotta et al, 1980)
Sixth Edition programmers manual (Bell Labs cardboard cover)
Sixth Edition Documents manual (Bell Labs cardboard cover)
Seventh Edition programmers manual Volume 2a, Jan 1979. (actually documents
such as make, lint, troff etc)
Documents for UNIX, Volume 2 (Dolotta et al, 1981) sections E and F (make,
lex, security etc)
All the above are in pretty good condition, given they are bound in
cardboard covers and are 40ish years old.
I’d prefer to give them to someone archival, but otherwise, first come,
first served.
Andrew Hume
Anybody feel up for a bit of an archaeology challenge? Warner Losh is
currently poking through a bunch of bits but not having much luck decoding
them correctly. I've put a copy here: https://minnie.tuhs.org/Y5/Challenge/
If you can help, I'd suggest report major findings here, and we can use
the #TUHS channel in the ClassicCmp Discord server for chat.
Here's what Warner has found out so far:
It's quite interesting, but in a
format I've so far not been able to decode more than with emacs.
However, there's all kinds of wonderful here. This looks like it was a
dump from a VMS (or maybe similar DEC OS) ANSI tape. There's 4 datasets
of 2.5MB each. The first one appears to be a V5 tree of some sort (at
least it matches the V5 sources in places I can spot check in
Dennis_v5. The second block looks v6ish or maybe pwbish, but no kernel
sources. I don't think it's a continuation of the v5 stuff from the
first dataset. The third dataset is all binaries, as far as I can tell
so far, but things like mv and passwd. The 4th dataset appears to be
the dump of a VENIX-11 system, complete with source.
The 3rd dataset appears to be a Venix system. At least it has venix and
venix.old in what looks like the root directory. Still trying to sort
out extracting files from these datasets. v7fs hates them, but I'm
almost positive that's what they are.
Cheers, Warren
Crazy longshot post, part 27 in an infinite series
Are there any Xenix-11 images (boot tapes or disk images) around? My
googling skillz aren't mad enough to find this.
I've seen the Xenix 86 image in the archive that was copied from pce's
image warehouse which is cool and the generation of code I'm looking for,
but is for 8086 machines...
Warner
Another book from the same era--quite good--is A Unix Primer
by Ann Nichols Lomuto and Nico Lomuto, copyright 1983.
Before the title page appears an interesting endorsement:
"Prentice-Hall Software Series, Brian Kernighan, advisor
Doug
Prologue to TPC. Bob Morris did a visiting-researcher stint at
AT&T, where he became aware of infelicitous software architure
proposed for ESS 5. He thought Research could do it better. Ken,
Joe, and Lee bit. Lee's architecture was indeed novel: every
device in the system, right down to each touch-tone button, was
modeled as a process. Only after the clean model was working
were some processes--notably the buttons--jammed together to
cinch in the process table.
The team got the switch working in a matter of months--in time
to demonstrate it to Indian Hill before ESS was irrevocably
set in stone. ESS architecture was indeed rethought, taking
some ideas from TPC.
TPC was named after "TPC, The Phone Company" in the 1967 film,
"The President's Analyst".
Doug