I started using Unix in ~1977 at UC Santa Barbara. At some point
around then we decided to host a Unix users meeting in the U-Cen
student union building. We asked the facilities people to prepare
a sign pointing to the meeting room.
Imagine my reaction when I walked into the building and saw
the following sign:
"Eunuchs Group Meeting - Room 125"
I don't know if any eunuchs actually showed up.
Jon Forrest
Warner Losh <imp(a)bsdimp.com> kindly corrected my statement that kcc
compiler on the PDP-10 was done by Ken Harrenstien, pointing out that
it was actually begun by Kok Chen (whence, the name kcc).
I've just dug into the source tree for the compiler, and found this
leading paragraph in kcc5.vmshelp (filesystem date of 3-Sep-1988) that
provides proper credits:
>> ...
>> KCC is a compiler for the C language on the PDP-10. It was
>> originally begun by Kok Chen of Stanford University around 1981 (hence
>> the name "KCC"), improved by a number of people at Stanford and Columbia
>> (primarily David Eppstein, KRONJ), and then adopted by Ken Harrenstien
>> and Ian Macky of SRI International as the starting point for what is now
>> a complete and supported implementation of C. KCC implements C as
>> described by the following references:
>>
>> H&S: Harbison and Steele, "C: A Reference Manual",
>> HS1: (1st edition) Prentice-Hall, 1984, ISBN 0-13-110008-4
>> HS2: (2nd edition) Prentice-Hall, 1987, ISBN 0-13-109802-0
>> K&R: Kernighan and Ritchie, "The C Programming Language",
>> Prentice-Hall, 1978, ISBN 0-13-110163-3
>>
>> Currently KCC is only supported for TOPS-20, although there is
>> no reason it cannot be used for other PDP-10 systems or processors.
>> The remaining discussion assumes you are on a TOPS-20 system.
>> ...
I met Ken only once, in his office at SRI, but back in our TOPS-20
days, we had several e-mail contacts.
----------------------------------------
P.S. In these days of multi-million line compilers, it is interesting
to inspect the kcc source code line count:
% find . -name '*.[ch]' | xargs cat | wc -l
80298
A similar check on a 10-Oct-2016 snapshot of the actively-maintained
pcc compiler for Unix systems found 155896 lines.
-------------------------------------------------------------------------------
- Nelson H. F. Beebe Tel: +1 801 581 5254 -
- University of Utah FAX: +1 801 581 4148 -
- Department of Mathematics, 110 LCB Internet e-mail: beebe(a)math.utah.edu -
- 155 S 1400 E RM 233 beebe(a)acm.org beebe(a)computer.org -
- Salt Lake City, UT 84112-0090, USA URL: http://www.math.utah.edu/~beebe/ -
-------------------------------------------------------------------------------
Gentlemen,
Below some additional thoughts on the various observations posted
about this. Note that I was not a contemporary of these developments,
and I may stand corrected on some views.
> I'm pretty sure the two main System V based TCP/IP stacks were STREAMS
> based: the Lachman one (which I ported to the ETA-10 and to SCO Unix)
> and the Mentat one that was done for Sun. The socket API was sort of
> bolted on top of the STREAMS stuff, you could get to the STREAMS stuff
> directly (I think, it's been a long time).
Yes, that is my understanding too. I think it goes back to the two
roots of networking on Unix: the 1974 Spider network at Murray Hill and
the 1975 Arpanet implementation of the UoI.
It would seem that Spider chose to expose the network as a device, whereas
UoI chose to expose it as a kind of pipe. This seems to have continued in
derivative work (Datakit/streams/STREAMS and BBN/BSD sockets respectively).
When these systems were developed networking was mostly over serial lines,
and to use serial drivers was not illogical (i.e. streams->STREAMS). By 1980
fast local area networks were spreading, and the idea to see the network as
a serial device started to suck.
Much of the initial modification work that Joy did on the BBN code was to
make it perform on early ethernet -- it had been designed for 50 kbps arpanet
links. Some of his speed hacks (such as trailing headers) were later
discarded.
Interestingly, Spider was conceived as a fast network (1.5 Mbps); the local
network at Murray Hill operated at that speed, and things were designed to
work over long distance T1 connections as well. This integrated fast LAN/WAN
idea seems to have been abandoned in Datakit. I have a question out to Sandy
Fraser to ask about the origins of this, but have not yet received a reply.
> The sockets stuff was something Joy created to compete with the CMU Accent
> networking system. [...] CMU was developing Accent on the Triple Drip
> PascAlto (aka the Perq) and had a formal networking model that was very clean
> and sexy. There were a lot of people interested in workstations, the Andrew
> project (MIT is about to start Athena etc). So Bill creates the sockets
> interface, and to show that UNIX could be just as modern as Accent.
I've always thought that the Joy/Leffler API was a gradual development of
the UoI/BBN API. The main conceptual change seem to have been support for
multiple network systems (selectable network stack, expansion
of the address space to 14 bytes).
I don't quite see the link to Accent and Wikipedia offers little help here
https://en.wikipedia.org/wiki/Accent_kernel
Could you elaborate on how Accent networking influenced Joy's sockets?
> * There's no reason for
> a separate listen() call (it takes a "backlog" argument but
> in practice everyone defaults it and the kernel does strange
> manipulations on it.)
Perhaps there is. The UoI/BBN API did not have a listen() call;
instead the open() call - if it was for a listening connection - blocked until
a connection occurred. The server process would then fork of a worker process
and re-issue the listening open() call for the next connection. This left a
time gap where the server would not be 'listening'.
The listen() call would create up to 'backlog' connection blocks in the
network code, so that this many clients could connect simultaneously
without user space intervention. Each accept() would hand over a (now
connected) connection block and add a fresh unconnected one to the backlog
list. I think this idea came from Sam Leffler, but perhaps he was inspired
by something else (Accent?, Chaos?)
Of course, this can be done with fewer system calls. The UoI/BBN system
used the open() call, with a pointer to a parameter data block as the 2nd
argument. Perhaps Joy/Leffler were of the opinion that parameter data
blocks were not very Unix-y, and hence spread it out over
socket()/connect()/bind()/listen() instead.
The UoI choice to overload the open() call and not create a new call
(analogous to the pipe() call) was entirely pragmatic: they felt this
was easier for keeping up with the updates coming out of Murray Hill
all the time.
> In particular, I have often thought that it would have been a better
> and more consistent with the philosophy to have it implemented as
> open("/dev/tcp") and so on.
I think this is perhaps an orthogonal topic: how does one map network names
to network addresses. The most ambitious was perhaps the "portal()" system
call contemplated by Joy, but soon abandoned. It may have been implemented
in the early 90's in BSD, but I'm not sure this was fully the same idea.
That said, making the the name mapping a user concern rather than a kernel
concern is indeed a missed opportunity.
Last and least, when feeling argumentative I would claim that connection
strings like "/dev/tcp/host:port" are simply parameter data blocks encoded
in a string :^)
> This also knocks out the need for
> SO_REUSEADDR, because the kernel can tell at the time of
> the call that you are asking to be a server. Either someone
> else already is (error) or you win (success).
Under TCP/IP I'm not sure you can. The protocol specifies that you must
wait for a certain period of time (120 sec, if memory serves my right)
before reusing an address/port combo, so that all in-flight packets have
disappeared from the network. Only if one is sure that this is not an
issue one can use SO_REUSEADDR.
> Also, the profusion of system calls (send, recv, sendmsg, recvmsg,
> recvfrom) is quite unnecessary: at most, one needs the equivalent
> of sendmsg/recvmsg.
Today that would indeed seem to make sense. Back in 1980 there seems
to have been a lot of confusion over message boundaries, even in
stream connections. My understanding is that originally send() and
recv() were intended to communicate a borderless stream, whereas
sendmsg() and recvmsg() were intended to communicate distinct
messages, even if transmitted over a stream protocol.
Paul
> On Sep 23, 2017, at 3:06 PM, Nelson H. F. Beebe <beebe(a)math.utah.edu> wrote:
>
> Not that version, but I have the 4.4BSD-Lite source tree online with
> these files in the path 4.4BSD-Lite/usr/src/usr.bin/uucp:
Thanks, but I have the 44BSD CDs.
> If they look close enough to what you need, I can put
> a bundle online for you.
I'm looking for the seismo/uunet version that Rick hacked on for so many years. It started off as the 4.3BSD version, but grew to embrace the volume of traffic uunet handled in its heyday. It wasn't your daddy's uucico ;-)
--lyndon
Dario Niedermann <dario(a)darioniedermann.it> wrote on Sat, 23 Sep 2017
11:17:04 +0200:
>> I just can't forgive FreeBSD for abandoning the proc filesystem ...
It can be there, if you wish.
Here are two snippets from a recent log of a recent "pkg update -f ;
pkg upgrade" run on a one of my many *BSD family systems, this one
running FreeBSD 11.1-RELEASE-p1:
Message from openjdk8-8.131.11:
======================================================================
This OpenJDK implementation requires fdescfs(5) mounted on
/dev/fd and procfs(5) mounted on /proc.
If you have not done it yet, please do the following:
mount -t fdescfs fdesc /dev/fd mount -t procfs proc
/proc
To make it permanent, you need the following lines in
/etc/fstab:
fdesc /dev/fd fdescfs rw 0 0 proc /proc procfs rw 0 0
======================================================================
Message from rust-1.18.0:
======================================================================
Printing Rust backtraces requires procfs(5) mounted on /proc .
If you have not already done so, please do the following:
mount -t procfs proc /proc
To make it permanent, you need the following lines in /etc/fstab:
proc /proc procfs rw 0 0
======================================================================
I've seen such messages in many package installations in the *BSD
family, and I generally add the suggested lines to /etc/fstab.
Perhaps others more familiar with BSD internals might comment on
whether it is many non-BSD software, like the Java Developer's Kit,
and Mozilla's rust language, that mostly would like /proc support, or
whether there are plenty of native-BSD packages that expect it too.
The second edition of
Marshall Kirk McKusick, George V. Neville-Neil, and Robert N. M. Watson
The Design and Implementation of the FreeBSD Operating System
ISBN 0-201-70245-2 (hardcover), 0-321-96897-2 (hardcover)
has 5 pages with mention of the /proc filesystem, and nothing that
suggests that it is in any way deprecated.
-------------------------------------------------------------------------------
- Nelson H. F. Beebe Tel: +1 801 581 5254 -
- University of Utah FAX: +1 801 581 4148 -
- Department of Mathematics, 110 LCB Internet e-mail: beebe(a)math.utah.edu -
- 155 S 1400 E RM 233 beebe(a)acm.org beebe(a)computer.org -
- Salt Lake City, UT 84112-0090, USA URL: http://www.math.utah.edu/~beebe/ -
-------------------------------------------------------------------------------
Sadly no longer with us (he exited in 2011), he was forked in 1941. Just
think, if it wasn't for him and Ken, we'd all be running Windoze, and
thinking it's wonderful.
A Unix bigot through and through, I remain,
--
Dave Horsfall DTM (VK2KFU) "Those who don't understand security will suffer."
Tom Ivar Helbekkmo:
Why should anyone need to? Of all the mailing lists I'm on, this one is
the only one that has this problem.
=====
Beware tunnel vision. Another mailing list I'm on has exactly
the same problem, made worse because it's being run by a central
Big Company Mailing List Provider so the rules keep changing under
foot and it's up to the poor-sod list maintainer (who is not a
programmer) to cope.
To bring the focus back to this mailing list, not every program
runs on a little-endian computer with arbitrary word alignment
and pointers that fit in an int.
Norman Wilson
Toronto ON
Does anyone have a copy of Rick's uunet version of the 4.3BSD UUCP source? The disk I had it on seized up, and I can't figure out a fine-grained-enough set of search keywords to find it through a web search :-(
--lyndon
Lyndon Nerenberg:
I really like mk. 8ed was where it first rolled out? I remember
reading about it in the 10ed books. It's a joy to use in Plan 9.
======
Later than that. I was around when Andrew wrote mk, so it
definitely post-dated the 8/e manual.
mk does a number of things better, but to my mind not quite
enough to justify carrying it around. Just as I decided long
ago (once I'd come out of the ivory hothouse of Murray Hill)
that I was best off writing programs that hewed to the ISO C
and POSIX interfaces (and later put some work into bringing
my private copy of post-V10 nearer to the standards), because
that way I didn't have to think much about porting; so I
decided eventually that it is better just to use make.
As with any other language, of course, it's best to use it
in as simple a way as possible. So I don't care much whether
it's gmake or pmake or qmake as long as it implements more
or less the 7/e core subset without breaking anything.
Larry McVoy:
I do wish that some simple make had stuffed a scripting language in there.
Anything, tcl, lua, even (horrors, can't believe I'm saying this) a little
lisp. Or ideally a built in shell compat language. All those backslashes
to make shell scripts work get old.
======
This is something mk got right, and it's actually very simple to do:
every recipe is a shell script. Not a collection of lines handed
one by one to the shell, but a block of text. No backslashes (or
extra semicolons) required for tests. Each script is run with sh -e,
so by default one failed command will abort the rest, which is
usually what one wants; but if you don't want that you just insert
set +e
(So it's not that I dislike mk. Were it available as an easy
add-on package on all modern systems, rather than something I'd
have to carry around and compile, I'd be happy to use it.)
Norman Wilson
Toronto ON
I tried running my own server on mcvoy.com but eventually gave up, the
spam filtering was a non-ending task.
If someone has a plug and chug setup for MX I'd love to try it.
Thanks,
--lm