UNIX Version 0, Running On A PDP-7, In 2019

WIth the 50th birthday of the UNIX operating system being in the news of late, there has been a bit of a spotlight shone upon its earliest origins. At the Living Computers museum in Seattle though they’ve gone well beyond a bit of historical inquiry though, because they’ve had UNIX (or should we in this context say unix instead?) version 0 running on a DEC PDP-7 minicomputer. This primordial version on the original hardware is all the more remarkable because unlike its younger siblings very few PDP-7s have survived.

The machine running UNIX version 0 belongs to [Fred Yearian], a former Boeing engineer who bought his machine from the company’s surplus channel at the end of the 1970s. He restored it to working order and it sat in his basement for decades, while the vintage computing world labored under the impression that including the museum’s existing machine only four had survived — of which only one worked. [Fred’s] unexpected appearance with a potentially working fifth machine, therefore, came as something of a surprise.

To load the OS a disk emulator was connected to the machine, and for possibly the first time in many decades a new UNIX version 0 device driver was written to enable it to be used. The first login was the user “dmr”, a homage to UNIX co-creator Dennis M. Ritchie.

With so few surviving machines it’s no surprise that we’ve not featured a PDP-7 before. You can, however, entertain yourself reading our coverage of UNIX at 50,

Via Hacker News.

34 thoughts on “UNIX Version 0, Running On A PDP-7, In 2019

  1. I’d love to see a “front panel” version of the PDP-7 offered. I wish Digital had slapped a logo on there for show. It looks easy enough to make. Any chance of getting the measurements as well as what functionality was offered through the front panel?
    I love Fred’s commitment to the pocket protector. Rocket on!!

    1. Apparently Unix 0 runs better in SIMH than on this physical hardware, at least as of the time of the video. The OS boots, but for the moment at least, the compiler doesn’t run. There’s still enough flakiness in the hardware that it’s hard to say if the problem is a bug in the software or a flake.

      One of the restoration engineers was working on it the day after the video and was replacing a bad instruction (a roughly 3×5 circuit board) with a working one as I happened to visit, and I got to sit down and chat about it with him. A total treat.

      You don’t see it in the head picture, but this particular unit has a party piece- a custom memory interface that Boeing added, which the museum has lashed a Xylinx sbc to, to implement a disk-like interface for loading the OS. Watching it at work, it ran at about 1mbit/s.

    1. Depends on who you talk to… If you calk to Ken Thompson, he’ll tell you he never called it that. Others did, but nobody wants to take credit for it… It’s not entirely clear that it ever was called unics, except that it makes a good story, so was repeated so much it became real…

      1. There’s a comment in the Unix Version 6 source code, after a terrifying hack to backpatch a location in memory and then execute it, that has a comment written above it: “you are not expected to understand this.”

        Neither Ken nor Dennis would admit to writing it.

        1. I dug into my copy of the John Lions commentary on V6 UNIX and found the quote in question. It’s in the function swtch(), the CPU scheduler (finds another task to run and runs it).

          Here’s the full comment, sans /* */

          If the new process paused because it was
          swapped out, set the stack level to the last call
          to savu(u_ssav). This means that the return
          which is executed immediately after the call to aretu
          actually returns from the last routine which did
          the savu.

          You are not expected to understand this.

        2. It doesn’t actually patch and execute a location in memory. Even then, self-modifying code was seen as the spawn of the devil. It simply set the stack context so that return() would return not from the current function (the CPU scheduler swtch() [sic]) but to where the task being dispatched last left off. It essentially implements a coroutine switch.

          1. Although I now longer have access to a copy of “The Design of the UNIX Operating System” (Maurice J. Bach) which dives deep into Unix kernel code, I’m pretty sure this was eventually realized by a combination of setjmp/longjmp. So recently, when I discovered there is a git repo containing the sources from the Lion’s commentary I did a git grep setjmp and got–nothing.

    2. I was at Bell Labs in the late 1970s and early 1980s. I remember one of those guys (probably Dennis Ritchie) come out and deny that “UNIX” was “castrated MULTICS”. Which was funny, since nobody had asked him if it was.

  2. Funny though, I have never realized that in the past the processor architecture used words that were a multiple of 3 because of the dominance of octal encoding for hand input commands and data.

    1. Other way around: Before the IBM System/360 made 8-bit characters the norm, most computer systems (scientific or business = decimal) used 6-bit characters, and words which were multiples of 6 bits were very common. For that reason, octal was used to encode the binary.
      Examples: The IBM 704, 709, 7040, 7090 (36 bits); Univac 1100 family (36 bits); GE 200 and 600 (36 bits); CDC 1600 (48 bits) and 6000 (60 bits); DEC PDP-6 (36 bits); DEC PDP-1 and PDP-4/7 (18 bits); DEC PDP-5 (12 bits); IBM 1400 series (BCD encoded in 6 bits for decimal arithmetic); etc.

        1. I took my college assembly language programming course on a Cyber 74. It was either that, or fight the CS students for time on a PDP-11. Plenty of those around, but I figured how many chances was I going to get to code on Big Iron?

  3. My first real system at College with a DEC-20 running TOPS-20 with rows for VT100s. If you got unlucky, you had to use the teletypes down at the end at maybe 9600 baud, more likely 300 baud if my memory is correct. Editing was a total pain on those system compared to the VT100s. Great keyboards!

    Seeing this PDP-7 running makes me nostalgic… but not too much. And seeing the B language with that wierd limitation of only two characters per write() call is even funkier!

    1. My first terminal was a Teletype…or rather, parts of a Teletype, which I bought through the Honeywell surplus outlet on Rt 9 in Framingham. Further down the road, near where Bose HQ is now, there was a Teletype service facility. I took the pieces there and asked if they could turn them into a Teletype, Some anonymous repair tech took pity on an 18 year old nerd, and put a working machine together out of spare parts for, IIRC, about $150.

      I spent $450 on an acoustic coupler, and used that machine all through college, never once having to fight for a terminal in the public rooms.

      My next terminal was a DEC VT05, purchased, again, in pieces, from the surplus stock of DEC Westfield. I spent a couple of months debugging and repairing that, and used it all through graduate school, with the same modem, at a blazing 300 baud.

      Surplus places are great, and it warms my heart to see old equipment rescued and put to use. Which reminds me…I have a rescued SGI desktop which I need to set up.

  4. I’ve been to the Living Computers Museum almost 7 years ago. If you have never been, and are in the Seattle area… it’s WELL WORTH IT to go there. I had a great time there, and you can actually USE all the computers– they aren’t behind glass and turned off or turned on by you can’t touch.

    They even have Bill Gates and Paul Allen’s resumes up on display, complete with typos and miss-spellings that would make a just out of college intern with zero real world interview experience cringe today!

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.