> From: Paul Ruizendaal
> project to make V6 run with the Gurwitz TCP stack on a TI990 clone
> (which is pretty similar to a PDP11).
Neat!
> the code size is about 25KB for both a minimal V6 kernel and the TCP
> stack, the rest is data.
That's impressively small; the MIT V6+ with 'demux only in the kernel' was
40KB for the combined code (although I can't easily get separate figures for
the networking part and the rest).
> The Gurwitz code also has an Ethernet driver (note ARP was not invented
> yet)
How did it get Ethernet addresses?
Noel
> I'm sure it's been attempted before, but would anyone be up to the
> challenge of trying to get that going with networking on an
> 18-bit-address-space pdp11?
By coincidence I’m in the middle of a project to make V6 run with the Gurwitz TCP stack on a TI990 clone (which is pretty similar to a PDP11). It runs without separate I/D as two processes in about 100KB.
The Gurwitz TCP stack was the reference implementation for the VAX that BBN did in 1981. It is in the THUS archive:
https://minnie.tuhs.org//cgi-bin/utree.pl?file=BBN-Vax-TCP
As documented in IEN168, the actual TCP processing happens in a separate kernel process, much like process 0 (swapper) in Unix itself. It turns out that the network process shares no data (other than the u struct) with the kernel proper and can be run in a separate address space. Just a few ’thunks’ are needed: open/read/write/close from the kernel to the TCP stack and sleep/wakeup in the other direction.
A V6 Unix kernel runs in 48KB with buffers, the TCP stack with buffers needs about the same; both must remain resident - i.e. it ties up about 100KB of the 256KB core on a 18-bit machine. I suppose when using separate I/D it can run without thunks: the code size is about 25KB for both a minimal V6 kernel and the TCP stack, the rest is data.
In my setup, network connectivity is via a SLIP interface. The Gurwitz code also has an Ethernet driver (note ARP was not invented yet), but I’m not using that. I’m happy to report that this 1981 tcp/ip code can still talk to current OSX and Linux machines.
Just yesterday I got the setup working and I can run minimalist telnet connections etc. Alas it is not quite stable yet, it tends to crash after 5-10 minutes of use.
The BBN reference implementation includes FTP and Telnet servers and clients which I think will still interoperate with current versions. As a final remark note that this BBN code uses an API that is almost unchanged from the API as used on NCP Unix. As compared to sockets this means that a listening connection is not a rendez-vous, but blocks until a connection is made (and then becomes an active connection, i.e. stops listening), and that there is no “select” type functionality.
PS:
> IIRC, outbound packets are copied into kernel buffers
IDRC; according to the documentation, outbound packets are DMA'd directly from
user memory. I have yet to read the code to verify this.
> we must have added PTY's of some sort
There is indeed a PTY driver; it has comments from BBN'ers who edited it, so
perhaps we got it from BBN.
> I don't remember which one SMTP used.
The 'simple' TCP.
> The whole thing worked _really_ well. Alas, I don't think anyone else
> picked up on it.
So I found a long list of people we sent tapes to. Oh well....
> The kernel code is not that large, it should even run on a /40, without
> overlays (although the number of disk buffers would probably get hit).
Well, maybe... Here is the output of 'size' on the last Unix image for that
machine:
40560+3098+44594
It was a /45, so split I/D (no overlays, though). How much could be trimmed
out of that, I'm not sure.
Noel
Hi,
I have an 11/45 I'm hoping will be running soon.
I'd like to run 2.9BSD on it because it's the most highly functional system
I know of that has "official hopes" to fit on such a restrictive machine.
I've heard that it's really unlikely / tough to get a kernel built that'll
run tcp (I care mostly about ftp and telnet) on such a
small-memory-footprint machine. Is this true?
Would anyone be willing to do a quick mentoring / working session with me
to get me up to speed with the constraints I'm facing here and possibly
give me a jump on making adjustments to build such a kernel if possible?
thx
jake
P.S. There's kind of an implied challenge in the 2.11bsd setup docs,
mentioning that "2.11BSD would probably only require a moderate amount of
squeezing to fit on machines with less memory, but it would also be very
unhappy about the prospect."
I'm sure it's been attempted before, but would anyone be up to the
challenge of trying to get that going with networking on an
18-bit-address-space pdp11?
> From: Clem Cole <clemc(a)ccc.com>
> This is why I suggested that if you really want telnet and ftp to the
> PDP-11, you might be better off moving the networking stack out of the
> kernel
Really, the answer is that I need to get off my @ss and put the MIT V6+ system
up (I have all the files, just need to get a round tuit).
It has TCP/IP, but is it not all crammed into the kernel. And unlike the early
BBN V6, it doesn't do TCP as a single process to which all the other
client/server processes talk via IPC.
Instead, the only thing in the kernel is inbound demuxing, and minimal outbound
processing. (IIRC, outbound packets are copied into kernel buffers; an earlier
version of the networking interface driver actually did do inbound and outbound
DMA directly from buffers in the user's process, but only one process could use
the network interface at a time.)
The TCP code was a library that was built into the user process which did the
server/client applications. (The servers which supported login, like FTP,
needed to run as root, like the ordinary login, setuid'ing to the entered
user-id.) I don't remember if we supported server Telnet, but I think we
did. So we must have added PTY's of some sort, I'll have to check.
Since the TCP was in the user process, we actually had a couple of different
ones, depending on the application. Dave Clark had done a quick-n-dirty TCP on
the Alto (in BCPL) which was only good for things like user Telnet, not for
applications that sent a lot of data. We ported that one for the first TCP; we
later did a 'high-speed bulk data' TCP, used for FTP, etc. I don't remember
which one SMTP used.
The whole thing worked _really_ well. Alas, I don't think anyone else picked
up on it.
The kernel code is not that large, it should even run on a /40, without
overlays (although the number of disk buffers would probably get hit). And
since the TCP is in user processes, it could all get swapped out, so it would
run OK on machines without that much physical memory.
The issue is going to be that it will need a new network interface driver,
since I think the only driver ever done for it was for Pronet. And now we get
back to the 'what interfaces are available' question. Doing a DEC driver would
allow use of DEQNA's and DELQA's on QBUS machines, which would be optimal,
since they are common. And people could bring up Unix with TCP/IP on -11/23's.
But we'd have to add ARP (which I would do as a process, with only the
IP->Ether address mapping table stored in the kernel). I wrote a really nice
ARP for the C Gateway that could easily be used for that.
Noel
> From: Warner Losh
> I kinda doubt it has good NCP support: it was released in November of
> 1983.
Wow, that far back? I'd assumed it was later (considerably later).
Looking at the 2.9 networking stuff:
https://minnie.tuhs.org//cgi-bin/utree.pl?file=2.9BSD/usr/net/sys/net
it does indeed have _no_ NCP support.
> I'd get it running in simh, then move to real hardware.
Absolutely; running in an emulator is, I have found, a key step on getting an old
OS running. I've found Ersatz-11 to be really good for PDP-11 emulation.
> It's going to take a lot of elbow grease to make that work, I think.
Indeed; part of the problem, if the goal is going to be 'run it on real
hardware' is 'what network interface to use'.
All the ARPANET interfaces are out. There are drivers there for Proteon,
Ungermann-Bass, Xerox 3MB Ethernet, etc interfaces, but i) where you gonna
find one, and ii) you'll need a router to connect up to most other things.
There's a driver for the Interlan Ethernet interface, but AFAIK, those are
non-existent. (If anyone has one they're willing to part with, please let me
know!)
DEC Ethernet interfaces are available, but i) only the QBUS ones are common,
DEUNAs and DELUAs are almost impossible to find, that I've even seen, and ii)
it would need a driver.
> Ultrix-11 is of similar vintage, and similar functionality and does boot
> on the 18-bit 11's.
Yes, definitely worth looking at; I know it had TCP/IP (we had it on our
-11/73 at Proteon), but I don't know which interfaces it supported; probably
just the DEC ones (which, given the above, is not necessarily a Bad Thing).
Noel
> From: Grant Taylor
> What protocols did 2.9BSD support? Did it have NCP?
NCP was turned off on 1 January, 1983. What do you think?a
> Would it be any easier to use an external NCP to TCP/IP gateway?
Such as?
Noel
Augusta Ada King-Noel, Countess of Lovelace (and daughter of Lord Byron),
was born on this day in 1815; arguably the world's first computer
programmer and a highly independent woman, she saw the potential in
Charles Babbage's new-fangled invention.
J.F.Ossanna was given unto us on this day in 1928; a prolific programmer,
he not only had a hand in developing Unix but also gave us the ROFF
series.
Who'ld've thought that two computer greats would share the same birthday?
-- Dave
We gained Rear Admiral Grace Hopper on this day in 1906; known as "Amazing
Grace", she was a remarkable woman, both in computers and the Navy. She
coined the term "debugging" when she extracted a moth from a set of relay
contacts from a computer (the Harvard Mk I) and wrote "computer debugged"
in the log, taping the deceased Lepidoptera in there as well. She was
convinced that computers could be programmed in an English-like language
and developed Flow-Matic, which in turn became, err, COBOL... She was
posthumously awarded the Presidential Medal of Freedom in 2016 by Barack
Obama.
-- Dave