Discussion:
Unix Prototype On A PDP-7
(too old to reply)
Lawrence D'Oliveiro
2024-06-13 08:51:49 UTC
Permalink
Here’s where it all began, folks
After Bell Labs pulled out
of the MULTICS project, the future Unix team put in a proposal to get a
new machine of their own, but were turned down. So they had to make do
with this ancient, neglected PDP-7 they found lurking in a corner
somewhere, at least to begin with.

This was an 18-bit machine, part of the same lineage as DEC’s very first
computer, the PDP-1 from 1959. It didn’t even have a hardware stack.

After the crew had a working proof of concept of some of their ideas, they
were able to get the money to buy a nice new PDP-11. With nice registers,
byte addressability, a stack and everything.

And the rest, as they say, is history.
Rich Alderson
2024-06-13 19:01:19 UTC
Permalink
Here's where it all began, folks
http://youtu.be/pvaPaWyiuLA After Bell Labs pulled out
of the MULTICS project, the future Unix team put in a proposal to get a
new machine of their own, but were turned down. So they had to make do
with this ancient, neglected PDP-7 they found lurking in a corner
somewhere, at least to begin with.
I believed this story for years, until Ken Thompson and Brian Kernighan did a
presentation at VCF in 2019.

The PDP-7 they used was configured as a Graphics-II display processor (with a
big Type 340 display attached). It was NOT sitting unused.
This was an 18-bit machine, part of the same lineage as DEC's very first
computer, the PDP-1 from 1959. It didn't even have a hardware stack.
Actually, no. Although the PDP-1 was an 18 bit processor, the ISA was quite
different from the other 18-bit line, featuring a 6 bit instruction field and a
12 bit address space. The PDP-4/7/9/15 (an upwards compatible family, where
each higher number system could run code from its predecessors) ISA featured a
5 bit instruction field and a 13 bit address space, and later models included a
concept of indexed addressing to go up to 128KW physical.
After the crew had a working proof of concept of some of their ideas, they
were able to get the money to buy a nice new PDP-11. With nice registers,
byte addressability, a stack and everything.
Sort of.
And the rest, as they say, is history.
And it's better when you know all of the history.

BTW, the Youtube video from Living Computers: Museum + Labs mentions some of
the hard work done by Jeff Kaylin (whose cubicle was across the aisle from
mine) and Josh Dersch (whose cubicle and mine shared a wall). The hand you see
toggling switches on the fron panel belongs to Stephen Jones, Engineering
Manager for the museum, and technically our boss but we didn't work that way.
--
Rich Alderson ***@alderson.users.panix.com
Audendum est, et veritas investiganda; quam etiamsi non assequamur,
omnino tamen proprius, quam nunc sumus, ad eam perveniemus.
--Galen
John Ames
2024-06-13 19:37:36 UTC
Permalink
On 13 Jun 2024 15:01:19 -0400
Post by Rich Alderson
Actually, no. Although the PDP-1 was an 18 bit processor, the ISA
was quite different from the other 18-bit line, featuring a 6 bit
instruction field and a 12 bit address space. The PDP-4/7/9/15 (an
upwards compatible family, where each higher number system could run
code from its predecessors) ISA featured a 5 bit instruction field
and a 13 bit address space, and later models included a concept of
indexed addressing to go up to 128KW physical.
The PDP-1 was also a ones-complement machine; the PDP-4 (and, I think,
every other DEC machine after the -1, excepting the LINC mode of the
PDP-12 and LINC-8) was twos-complement.
John Levine
2024-06-16 17:19:42 UTC
Permalink
Post by John Ames
The PDP-1 was also a ones-complement machine; the PDP-4 (and, I think,
every other DEC machine after the -1, excepting the LINC mode of the
PDP-12 and LINC-8) was twos-complement.
The -4 and its successors had both ADD for a one's complement add and
TAD for two's complement. I don't get the impression that ADD was used
much. There was also ISZ for increment and skip if zero, with the zero
being the 2's comp all zero bits.

I believe you are correct that everything else, the -5, -6, -11, and their
successors were all two's complement.

I never understood the appeal of one's comp. Yes, you could negate
without that extra increment but the hardware to deal with two
versions of zero would surely have been more than a ripple carry.
--
Regards,
John Levine, ***@taugh.com, Primary Perpetrator of "The Internet for Dummies",
Please consider the environment before reading this e-mail. https://jl.ly
John Dallman
2024-06-16 20:25:00 UTC
Permalink
Post by John Levine
I never understood the appeal of one's comp. Yes, you could negate
without that extra increment but the hardware to deal with two
versions of zero would surely have been more than a ripple carry.
I suspect it was originally done when hardware was expensive enough that
there was some advantage in making the programmer cope with the
consequences. Then it was retained because people were used to it, and/or
wanted it for compatibility.

It makes sense of Christopher Strachey's idea that making computers
compatible with previous generations is a mistake, because you're
perpetuating your errors.

John
Lawrence D'Oliveiro
2024-06-17 00:16:55 UTC
Permalink
Post by John Levine
I never understood the appeal of one's comp.
It might have been a simpler evolutionary step from sign-magnitude.

Twos-complement makes so much more logical sense today, but back when it
was first introduced, it might have seemed like advanced maths (modulo
arithmetic).

Also one lingering annoyance with it is the extra negative value that has
no positive counterpart ...
Charlie Gibbs
2024-06-17 03:37:50 UTC
Permalink
Post by Lawrence D'Oliveiro
Post by John Levine
I never understood the appeal of one's comp.
It might have been a simpler evolutionary step from sign-magnitude.
Twos-complement makes so much more logical sense today, but back when it
was first introduced, it might have seemed like advanced maths (modulo
arithmetic).
Also one lingering annoyance with it is the extra negative value that has
no positive counterpart ...
"Two's complement, three's a crowd." -- Stan Kelly-Bootle
--
/~\ Charlie Gibbs | The Internet is like a big city:
\ / <***@kltpzyxm.invalid> | it has plenty of bright lights and
X I'm really at ac.dekanfrus | excitement, but also dark alleys
/ \ if you read it the right way. | down which the unwary get mugged.
Lawrence D'Oliveiro
2024-06-14 22:07:37 UTC
Permalink
Post by Rich Alderson
The PDP-7 they used was configured as a Graphics-II display processor
(with a big Type 340 display attached). It was NOT sitting unused.
I wondered about how they were able to get time on it for something as
major as OS development, then.

In Dennis Ritchie’s own words
<https://www.bell-labs.com/usr/dmr/www/hist.html>:

It did not take long, therefore, for Thompson to find a
little-used PDP-7 computer with an excellent display processor;
the whole system was used as a Graphic-II terminal. He and I
rewrote Space Travel to run on this machine. The undertaking was
more ambitious than it might seem; because we disdained all
existing software, we had to write a floating-point arithmetic
package, the pointwise specification of the graphic characters for
the display, and a debugging subsystem that continuously displayed
the contents of typed-in locations in a corner of the screen. All
this was written in assembly language for a cross-assembler that
ran under GECOS and produced paper tapes to be carried to the
PDP-7.
Phil Budne
2024-06-18 18:53:17 UTC
Permalink
Post by Rich Alderson
The PDP-7 they used was configured as a Graphics-II display processor (with a
big Type 340 display attached). It was NOT sitting unused.
My few centavos:

I was one of the folks who resurected PDP-7 UNIX from listings. The
initial utility listings found were from the front of the alphabet, so
I wrote a shell replacement (that was replaced when the second batch
of listings was found and scanned).

The swap device (fixed head disk) was a PDP-9 peripheral, and I recall
the Graphic II display hardware documentation describes the display as
a PDP-9 peripheral, with the PDP-7 as a footnote.

The PDP-7 shipped in 1965, and the -9 in 1966, so it seems likely the
hardware was ordered in a narrow band of time when the -9 was in
development.

All similar Bell systems on the 1972 F/S list are PDP-9s, which was
over 50% faster (1.0us cycle time vs 1.75).

My working assumption is that the -7 was a prototype of the Graphic II
workstation, ordered before the -9 was shipping.

A NASTY aspect of the RB09 disk that UNIX had to work around, is that
instructions with an indirect address took two cycles, which was long
enough so that the RB09 could overrun the controller's one word DMA
data buffer.

UNIX on the PDP-7 dealt with this by:

1. Spin waiting when the disk was active (essentially reducing it to a
PIO device), so it was no loss when the LCM replacement device was
implemented using PIO.

2. Writing interrupt service code WITHOUT use of indirect: The console
teletype character buffers had to be implemented using adds and self
modifying code rather than indirect (and the -7 had handy
auto-incrementing indirect pointer locations in low memory).

I can easily imagine the PDP-9 speedup alone, plus the possibility
that DMA wouldn't overrun the memory interface meant that the software
could easily moved beyond supporting the PDP-7, or made it the least
used system, hence the availability....

Finally, while the F/S list says the system had a Type 340 display
system, and I can well imagine the display tube and interface hardware
was the same, the display controller is different. The biggest
difference from the 340 is that the Graphic II controller uses
character tables in memory, and could define custom symbols.

Videos of the previous system Graphic I (PDP-5, the PDP-8 ancestor,
using a 340 display, backed up by the 7090; the later Graphic II
system was backed up by the GE635 running GECOS) in use:




My collection of related links:
https://github.com/DoctorWkt/pdp7-unix/wiki/Links
includes Graphic-1 and Graphic-2 links/citations

[My first Usenet post from "trn" in, likely three decades?]
Vir Campestris
2024-06-25 10:34:10 UTC
Permalink
Post by Phil Budne
1. Spin waiting when the disk was active (essentially reducing it to a
PIO device), so it was no loss when the LCM replacement device was
implemented using PIO.
2. Writing interrupt service code WITHOUT use of indirect: The console
teletype character buffers had to be implemented using adds and self
modifying code rather than indirect (and the -7 had handy
auto-incrementing indirect pointer locations in low memory).
This rings a bell for me on some very different hardware.

Some of the 8087 instructions took so **** long that we were getting
underruns. 8087 code was so rare we did retries instead.

Andy

Loading...