As one of the few remaining people who has actually worked
with the original dmr stream I/O system, I'd love to dive
into the debate here, but I don't have time. I can't resist
commenting on a few things that have flown by, though. Maybe
I can find time to engage better on the weekend.
-- If you think there were no record delimiters in the stream
system, you don't know enough about it. A good resource to
repair that is Dennis's BSTJ paper:
https://www.bell-labs.com/usr/dmr/www/st.pdf
It's an early description and some of the details later
evolved (for example we realized that once pipes were
streams, we no longer needed pseudoterminals) but the
fundamentals remained constant.
See the section about Message blocks, and the distinction
between data and control blocks. Delimiters were one kind
of control; there were others, some of them potentially
specific to the network at hand. In particular, Datakit
(despite being a virtual-circuit network) had several sorts
of control words, including message delimiters. Delimiters
were necessary even just for terminals, though: how else
does the generic read(2) code know to return early, before
filling the buffer, when a complete line has arrived?
-- It's hard to compare sockets to streams and make much
sense, because they are very different kinds of thing.
When people talk about sockets, especially when complaining
that sockets are a mess, they usually mean the API: system
calls like connect and listen and getpeername and so on.
The stream system was mainly about the internal structure--
the composable modules and the general-purpose queue interface
between them, so that you could take a stream representing
an (already set up) network connection and push the tty
module on it and have a working remote terminal, no need
for user-mode programs and pseudo-terminals.
It's not inconceivable to build a system with socket-like
API and stream internals.
-- Connection setup was initially done with network-specific
magic messages and magic ioctls. Later we moved the knowledge
of that messy crap into network-specific daemons, so a user
program could make a network call just by calling
fd = ipcopen("string-destination-name")
without knowing or caring whether the network transport was
TCP or Datakit or involved forwarding over Datakit to a
gateway that then placed a TCP call to the Internet or whatnot.
That's what the connection server was all about:
https://www.bell-labs.com/usr/dmr/www/spe.pdf
Again, the API is not specific to the stream system. It
wouldn't be hard to write a connection server that provided
the same universal just-use-a-string interface (with the
privileged parts or network details left up to daemons)
on a system with only socket networking; the only subtle
bit is that it needs to be possible to pass an open file
descriptor from one process to another (on the same system),
which I don't think the socket world had early on but I
believe they added long ago.
-- There's nothing especially hard about UDP or broadcast.
It's not as if the socket abstraction has some sort of magic
datagram-specific file descriptor. Since every message sent
and every message received has to include the far end's
address info, you have to decide how to do that, whether
by specifying a format for the data (the first N bytes are
always the remote's address, for example) or provide an
out-of-band mechanism (some ioctl mess that lets you
supply it separately, a la sendto/recvfrom, and encodes it
as a control message).
There was an attempt to make UDP work in the 9th/10th edition
era. I don't think it ever worked very cleanly. When I
took an unofficial snapshot and started running the system
at home in the mid-1990s, I ended up just tossing UDP out,
because I didn't urgently need it (at the time TCP was good
enough for DNS, and I had to write my own DNS resolver anyway).
I figured I'd get around to fixing it later but never did.
But I think the only hard part is in deciding on an interface.
-- It's certainly true that the Research-system TCP/IP code
was never really production-quality (and I say that even
though I used it for my home firewall/gateway for 15 years).
TCP/IP wasn't taken as seriously as it ought to have been
by most of us in 1127 in the 1980s. But that wasn't because
of the stream structure--the IP implementation was in fact
a copy of that from 4.2 (I think) BSD, repackaged and
shoehorned into the stream world by Robert T Morris, and
later cleaned up quite a bit by Paul Glick. Maybe it would
have worked better had it been done from scratch by someone
who cared a lot about it, as the TCP/IP implementors in the
BSD world very much did. Certainly it's a non-trivial design
problem--the IP protocols and their sloppy observance of
layering (cf the `pseudo header' in the TCP and UDP standards)
make them more complicated to implement in a general-purpose
framework.
Or maybe it just can't be done, but I wish someone had
tried in the original simpler setup rather than the
cluttered SVr4 STREAMS.
Norman Wilson
Toronto ON
> Sockets (which btw, totally SUCK PUS) were coded into things
> and even (YECHH) made POSIX and IETF spec status. Streams didn't stand
> a chance.
The question that originally pulled me into researching Unix networking 1975-1985 was more or less “how did we end up with sockets?”. That was 7 years or so ago, I now have a basic feel for how it came to be, and I also have better appreciation of the trade offs. What is the most “Unixy” of networking (as in the API and its semantics) is not something with an easy answer.
If I limit myself to the 1975-1985 time frame, I see three approaches:
1. The API used in Arpanet Unix, which was also used by BBN in its first reference implementation of TCP/IP
2. The BSD sockets API, in two flavours: the Joy flavour in BSD4.1a, and the Karels flavour in BSD4.1c and later
3. The Ritchie/Presotto IPC library / API from V8/V9. This evolved into SysV networking, but the original is the clean idea
At a high level of abstraction, there is a lot of similarity; close-up they are quite different. I like all three solutions!
One thing that struck my attention was that the Ritchie/Presotto IPC library has the concept of “calling” a host and the host/network can reply with a response code (“line busy”, “number unknown”, “not authorised”, etc.). BSD sockets do not cover that. I guess it derives from Spider/Datakit having that functionality, and Arpanet / tcp-ip not having that (resorting to a connection ‘reset’ or dead line instead). Sockets have a more elegant solution for connectionless datagrams (imo), and for the same reason I guess.
Sure, sockets has too much of the implementation sticking through the abstractions, but it is IMO not a bad design. That it became dominant I think is in equal measure due to economics and due to being “good enough”.
If someone has a proposal for a network API that is cleaner and better than what was out there, and would have worked with the hardware and use cases of the early 80’s, I’m all ears. But maybe better on COFF...
Paul
Wholeheartedly agree with the observations on forgotten versions, lack of source and a smaller pool of people back in the day.
It is not just the Research versions, also the internal AT&T versions and the base System V versions get little attention. Same reasons I think.
Luckily, these days the sources are available (although in the case of SysV of unclear legal status).
Part of the problem I think is that it is not well known what innovations are in each version. About 2 years ago I did a lot of spelunking through the V8 source and with the help of this list could come up with a list of highlights for V8 (text is now on the TUHS V8 source web page).
Never had the time to do that for V9. I think it was mentioned that it had a new filesystem with a bitmap free list. Also, it seems to have a lot of cleaned-up implementations of things that were new and rough in V8.
No clue what was new in V10.
Similar with Unix 3, Unix 4 and Unix 5. I’m thrilled that the docs for Unix 4 showed up recently. In these doc’s there is no material on IPC. From this I think that the IPC primitives from CB-Unix did not get merged in Unix 4, but only in Unix 5 (in a reworked form).
Personally, I’m still working (off and on) on recreating the Reiser demand paging system. To keep it interesting I’ve now got Sys III running on a small RISC-V board, and when I find another time slot I’ll try to add Reiser paging to it.
So the forgotten versions are only mostly forgotten, not totally forgotten :^)
Maybe make www.tuhs.org a CNAME for tuhs.org?
Surely a site devoted to the history of UNIX should use a
real link, not a symbolic one.
Norman `Old Fart' Wilson
Toronto ON
Hi all, we have a new addition to the Unix Archive at:
https://www.tuhs.org/Archive/Documentation/Manuals/Unix_4.0/
This is the documentation for Unix 4.0 which preceded System V. The
documents were provided by Arnold Robbins and scanned in by Matt Gilmore.
Cheers, Warren
Announcing the Open SIMH project
SIMH is a framework and family of computer simulators, initiated by Bob
Supnik and continued with contributions (large and small) from many others,
with the primary goal of enabling the preservation of knowledge contained
in, and providing the ability to execute/experience, old/historic software
via simulation of the hardware on which it ran. This goal has been
successfully achieved and has for these years created a diverse community
of users and developers.
This has mapped to some core operational principles:
First, preserve the ability to run old/historically significant software.
This means functionally accurate, sometimes bug-compatible, but not
cycle-accurate, simulation.
Second, make it reasonably easy to add new simulators for other hardware
while leveraging common functions between the simulators.
Third, exploit the software nature of simulation and make SIMH convenient
for debugging a simulated system, by adding non-historical features to the
environment.
Fourth, make it convenient for users to explore old system environments,
with as close to historical interfaces, by mapping them to new features
that modern host operating systems provide.
Fifth, be inclusive of people and new technology. It's serious work, but it
should be fun.
Previously, we unfortunately never spent the time to codify how we would
deliver on these concepts. Rather, we have relied on an informal use of
traditional free and open-source principles.
Recently a situation has arisen that compromises some of these principles
and thus the entire status of the project, creating consternation among
many users and contributors.
For this reason, a number of us have stepped up to create a new
organizational structure, which we call "The Open SIMH Project", to be the
keeper and provide formal governance for the SIMH ecosystem going forward.
While details of the structure and how it operates are likely to be refined
over time, what will not change is our commitment to maintaining SIMH as a
free and open-source project, licensed under an MIT-style license as shown
on the "simh" repository page.
It is our desire that all of the past users and contributors will come to
recognize that the new organizational structure is in the best interests of
the community at large and that they will join us in it. However, this
iproject as defined, is where we intend to contribute our expertise and
time going forward. At this point, we have in place the following,
although we foresee other resources being added in the future as we
identify the need and execute against them:
A Github "organization" for the project at https://github.com/open-simh
A Git repository for the simulators themselves at
https://github.com/open-simh/simh
The license for the SIMH simulator code base, found in LICENSE.txt in the
top level of the "simh" repository.
The "SIMH related tools" in https://github.com/open-simh/simtools. This is
also licensed under MIT style or BSD style open source licenses (which are
comparable apart from some minor wording differences).
A "SIMH Steering Group" -- project maintainers and guides.
The conventional git style process is used for code contributions, via pull
request to the project repository. The Steering Group members have approval
authority; this list is likely to change and grow over time.
By formalizing the underlying structure, our operational principles and
guidance can best benefit the community. These are being developed and
formalized, with a plan to publish them soon.
We have used our best judgment in setting up this structure but are open to
discussion and consideration of other ideas, and to making improvements.
Many of us have been part of different projects and understand that past
mistakes are real. We have tried to learn from these experiences and apply
the collected wisdom appropriately. We desire to hear from the community as
we update and refine the operating structure for the Open SIMH project.
We hope for your patience and look forward to your support as we work to
refine the organization and be able to provide this wonderful resource for
anyone to use as we continue to evolve the technology provided by the SIMH
system.
The SIMH Steering Group
Clem Cole
Richard Cornwell
Paul Koning
Timothe Litt
Seth Morabito
Bob Supnik
ᐧ
ᐧ
ᐧ
Hi all, I think it's time to move the (no longer) SIMH discussion over to
the COFF mailing list. The S/N ratio is dropping and we are straying too
far away from the Unix side of things.
Many thanks!
Warren
> https://www.tuhs.org/Archive/Documentation/Manuals/Unix_4.0/Volume_1/C.1.2_…
Since PDF didn't exist in 1981, the document is either a scan or the
result of a recent *roff run on ancient source. If it was made from
source, it's an impressive testimonial to the longevity and stability
of troff. Most probably it's a scan, in which case we owe many thanks
to the public-spirited person who digitized this trove. Was it you,
Arnold?
Doug