Computer Old Farts Forum
 help / color / mirror / Atom feed
From: clemc at ccc.com (Clem Cole)
Subject: [COFF] Fwd: [ih] NCP and TCP implementations
Date: Tue, 10 Mar 2020 14:30:16 -0400	[thread overview]
Message-ID: <CAC20D2PZPg9DzPCQtTnk9s_-v-qttok+NqwFod=SeBLvWUCwRw@mail.gmail.com> (raw)
In-Reply-To: <CANCZdfp-mphz6cUuAStjiV9iS30m1eHrcy0j5TnXiUQBe8K5Gw@mail.gmail.com>

On Tue, Mar 10, 2020 at 2:23 PM Warner Losh <imp at bsdimp.com> wrote:

> >>>  In addition to the Berkeley BSD work, I remember Gurwitz, Wingfield,
> Nemeth, and others working on TCP implementation for the PDP-11/70 and Vax.
>
> This is new. I'd like more info The name Nemeth is interesting. Is that
> Evi? And does that body of code still exist?
>
Alan Nemeth -- former BBN Fellow, later DEC CCE.  Leah Architect of the
C30/C70 and the Bufferfly.
This is the 'official' IP/TCP implementation for UNIX.  Joy would start
with it.  A version of the code is in Warren's archives and on Kirk's
larger disk.


>
> >>> I think I speak authoritatively here, since I wrote and debugged that
> first Unix TCP code.   I still have an old, yellowing listing of that first
> Unix TCP.
>
> I wonder if you could write him and see if this listing can be scanned /
> preserved...
>
I have this AM in fact before I sent the message to you -- no response so
far.

>
> Warner
>
> On Tue, Mar 10, 2020 at 11:52 AM Clem Cole <clemc at ccc.com> wrote:
>
>>
>> Given the recent discussion of pipes and networking ...  I'm passing this
>> along for those that might not have seen it.
>>
>> ---------- Forwarded message ---------
>> From: Jack Haverty via Internet-history
>> Date: Tue, Mar 10, 2020 at 1:30 PM
>> Subject: Re: [ih] NCP and TCP implementations
>> To: *Internet-History*
>>
>>
>> The first TCP implementation for Unix was done in PDP-11 assembly
>> language, running on a PDP-11/40 (with way too little memory or address
>> space).   It was built using code fragments excerpted from the LSI-11
>> TCP implementation provided by Jim Mathis, which ran under SRI's
>> home-built OS.  Jim's TCP was all written in PDP-11 assembler.  The code
>> was cross-compiled (assembled) on a PDP-10 Tenex system, and downloaded
>> over a TTY line to the PDP-11/40.  That was much easier and faster than
>> doing all the implementation work on the PDP-11.
>>
>> The code architecture involved putting TCP itself at the user level,
>> communicating with its "customers" using Unix InterProcess
>> Communications facilities (Rand "Ports").   It would have been
>> preferable to implement TCP within the Unix kernel, but there was simply
>> not enough room due to the limited address space available on the 11/40
>> model.  Later implementations of TCP, on larger machines with twice the
>> address space, were done in the kernel.  In addition to the Berkeley BSD
>> work, I remember Gurwitz, Wingfield, Nemeth, and others working on TCP
>> implementation for the PDP-11/70 and Vax.
>>
>> The initial Unix TCP implementation was for TCP version 2 (2.5 IIRC), as
>> was Jim's LSI-11 code.  This 2.5 implementation was one of the players
>> in the first "TCP Bakeoff" organized by Jon Postel and carried out on a
>> weekend at ISI before the quarterly Internet meeting.  The PDP-11/40 TCP
>> was modified extensively over the next year or so as TCP advanced
>> through 2.5, 2.5+, 3, and eventually stabilized at TCP4 (which it seems
>> we still have today, 40+ years later!)
>>
>> The Unix TCP implementation required a small addition to the Unix kernel
>> code, to add the "await" and "capac" system calls.  Those calls were
>> necessary to enable the implementation of user-level code where the
>> traditional Unix "pipeline" model of programming
>> (input->process->process...->output) was inadequate for use in
>> multi-computer programming (such as FTP, Telnet, etc., - anywhere where
>> more than one computer was involved).
>>
>> The code to add those new system calls was written in C, as was almost
>> all of the Unix OS itself.  The new system calls added the functionality
>> of "non-blocking I/O" which did not previously exist.  It involved very
>> few lines of code, since there wasn't room for very many more
>> instructions, and even so it required finding more space by shortening
>> many of the kernel error messages to save a few bytes here and there.
>>
>> Randy Rettberg and I did that work, struggling to understand how Unix
>> kernel  internals worked, since neither of us had ever worked with Unix
>> before even as a user.   We did not try to "get it right" by making
>> significant changes to the basic Unix architecture.  That came later
>> with the Berkeley and Gurwitz efforts.  The PDP-11/40 was simply too
>> constrained to support such changes, and our mission was to get TCP
>> support on the machine, rather than develop the OS.
>>
>> I think I speak authoritatively here, since I wrote and debugged that
>> first Unix TCP code.   I still have an old, yellowing listing of that
>> first Unix TCP.
>>
>> FWIW, if there's interest in why certain languages were chosen, there's
>> a very simple explanation of why the Unix implementation was done in
>> assembler rather than C, the native language of Unix.  First, Jim
>> Mathis' code was in assembler, so it was easy to extract large chunks
>> and paste them into the Unix assembler implementation.  Second, and
>> probably most important, was that I was very accustomed to writing
>> assembler code and working at the processor instruction level.  But I
>> barely knew C existed, and was certainly not proficient in it, and we
>> needed the TCP working fast for use in other projects.  The choice was
>> very pragmatic, not based at all on technical issues of languages or
>> superiority of any architecture.
>>
>> /Jack Haverty
>>
>>
>> On 3/9/20 11:14 PM, vinton cerf via Internet-history wrote:
>> > Steve Kirsch asks in what languages NCP and TCP were written.
>> >
>> > The Stanford first TCP implementation was done in BCPL by Richard Karp.
>> > Another version was written for PDP-11/23 by Jim Mathis but not clear in
>> > what language. Tenex was probably done in C at BBN. Was 360 done in
>> PL/1??
>> > Dave Clark did one for IBM PC (assembly language/??)
>> >
>> > Other recollections much appreciated.
>> >
>> > vint
>> --
>> Internet-history mailing list
>> Internet-history at elists.isoc.org
>> https://elists.isoc.org/mailman/listinfo/internet-history
>> _______________________________________________
>> COFF mailing list
>> COFF at minnie.tuhs.org
>> https://minnie.tuhs.org/cgi-bin/mailman/listinfo/coff
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/coff/attachments/20200310/93e60031/attachment.html>


  reply	other threads:[~2020-03-10 18:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAAFtm_VOa2Xmq1aQ9-yLwYDCow9UYE5=anYxd1=uNm7s+=j0sg@mail.gmail.com>
     [not found] ` <e2cb399e-0ed8-b11b-1ca2-113c833fba2a@3kitty.org>
2020-03-10 17:52   ` clemc
2020-03-10 18:23     ` imp
2020-03-10 18:30       ` clemc [this message]
2020-03-10 18:31         ` clemc
2020-03-10 20:32         ` clemc

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='CAC20D2PZPg9DzPCQtTnk9s_-v-qttok+NqwFod=SeBLvWUCwRw@mail.gmail.com' \
    --to=coff@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).