From: Paul Ruizendaal <pnr@planet.nl>
To: TUHS main list <tuhs@minnie.tuhs.org>
Subject: [TUHS] 2.9bsd with networking on 18-bit possible?
Date: Wed, 12 Dec 2018 11:29:56 +0100 [thread overview]
Message-ID: <0432D5D3-2835-4288-AA4A-57AF3311F4F3@planet.nl> (raw)
> 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.
next reply other threads:[~2018-12-12 10:38 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-12 10:29 Paul Ruizendaal [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-12-15 1:54 Paul Ruizendaal
2018-12-12 17:55 Paul Ruizendaal
2018-12-12 14:38 Noel Chiappa
2018-12-12 14:14 Noel Chiappa
2018-12-11 18:43 Noel Chiappa
2018-12-11 18:51 ` Clem Cole
2018-12-12 1:20 ` Jacob Ritorto
2018-12-11 16:57 Noel Chiappa
2018-12-11 17:01 ` Jon Forrest
2018-12-11 18:03 ` Clem Cole
2018-12-11 16:16 Noel Chiappa
2018-12-11 16:26 ` Clem Cole
2018-12-11 4:42 Noel Chiappa
2018-12-11 2:11 Noel Chiappa
2018-12-11 2:36 ` Grant Taylor via TUHS
2018-12-11 3:28 ` Warner Losh
2018-12-10 22:05 Jacob Ritorto
2018-12-11 1:21 ` Clem cole
2018-12-11 1:55 ` Grant Taylor via TUHS
2018-12-11 7:22 ` Lars Brinkhoff
2018-12-11 15:28 ` Clem Cole
2018-12-11 17:21 ` Lars Brinkhoff
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0432D5D3-2835-4288-AA4A-57AF3311F4F3@planet.nl \
--to=pnr@planet.nl \
--cc=tuhs@minnie.tuhs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).