Unix Tell All Book From Kernighan Hits The Shelves

When you think of the Unix and C revolution that grew out of Bell Labs, there are a few famous names. Dennis Ritchie, Ken Thompson, and Brian Kernighan come to mind. After all, the K in both K&R C and in AWK stand for Kernighan. While Kernighan is no stranger to book authorship — he’s written several classics including “the white book” for C and Unix — he has a new book out that is part historical record and part memoir about the birth of Unix.

Usually, when a famous person writes a retrospective like this, it is full of salacious details, but we don’t expect much of that here. The book talks about Bell Labs and Multics, of course. There’s serious coverage of the first, sixth, and seventh editions with biographies of people integral to those releases.

The final part of the book deals with the explosive growth and commercialization of the operating system along with its many descendants. Yes, Linux is in there, of course, as is BSD and others. In broad strokes, this probably doesn’t add a lot to what we all know about the history of Unix, but the personal details and just hearing it from a primary source is worth the price of admission.

The books doesn’t sugar coat anything. Imagining someone who has had such an impact on the industry as a “below average intern” struggling with the infamous McCracken FORTRAN book to write a program is difficult, but you can also imagine how he felt and what that young Kernighan would have thought if he could see how his work is considered today. In his words: “I didn’t really know how to program.”

There were some technical surprises. We always thought AWK was influenced by Snobol, but according to the book, it borrowed from RPG. We don’t see it, but who are we to argue with the K in AWK?

We do wonder how many other Kindle Direct paperback books were typeset using groff. We are betting not many. We were a bit surprised there isn’t an electronic version, and at $18, the book isn’t an impulse buy. But for the insights into historical computing, it is priceless.

56 thoughts on “Unix Tell All Book From Kernighan Hits The Shelves

  1. About “… AWK … according to the book, it borrowed from RPG”; I haven’t read the book but I think it may be referring to “the cycle of RPG” that is almost the defining paradigm of RPG and is similar to the way AWK works (in a very simplified description): you have to visualize the file(s) to be processed as a serial collection of records, you define a “heading” section of code, to be run at the start of the process, a “processing” section, to be run for every record and a “totals” section to be run at the end.

    RPG also lets you define binary “indicators” (flags) that are set or unset according to the data present in every record which could be considered as “ancestors” of AWK’s use of regular expressions.

    Of course with the newer versions of RPG “you can do anything”, but keep in mind that the book is referring to “the old ages”… ;-)

    Best regards,

    A/P Daniel F. Larrosa

  2. I’ve heard that in the mid-to-late 1990s, Microsoft had to make a choice about the foundation for future OS development. It could go with the ‘pro’ version of Windows called Windows NT, which owed much to VAX/VMS. Or it could build on Xenix, a version of UNIX to which Microsoft had full rights. Tests, I was told, showed that Xenix was faster and more stable than Windows NT, but Microsoft opted for the latter. I’ve always suspected that it did so because a Windows based on Unix would be easier to clone and that could not be.

    Ah, but if Microsoft had made the opposite choice, history would have taken an interesting turn. Virtually all the major desktop to laptop to mobile devices would be based on Unix. Billions of OSs would be based on code developed by a few hackers at Bell Labs long before.

    1. While I love Linux and Unix, the granularity of permissions in VMS/NT is really really good. Even though ACLs exist I almost never see them in use in multiuser Linux environments while it’s used extensively on the Windows side.

      1. On the other hand, shared drives can very quickly turn into a complete clusterfuck of ACLs if you don’t manage it very strictly as an admin (which means approving or manually performing every rule and AD group). Sometimes simplicity is good because it forces you to think about what you’re doing and structuring things properly instead of just adding more ad-hoc rules to a bunch of files.

    2. Personally I don’t believe you have any actual experience with any of this stuff, we tested Xenix against Sun OS and found it miserably lacking. Even on a fast 486 system it was miserably slow compared to a Sun 3/60 at 16 MHz. And don’t even get me started with the bugs. If you ever actually tried to use a Xenix system to write any code or even to just run a mail server you would throw the keyboard across the room and ask for Windows 3.1 back. Even back then you could get a decent mailer for MS-DOS and not deal with stupid sendmail shit.

      1. I didn’t have the hardware to run Xenix back then.

        But it wasn’t a Unix-clone, it was the Unix source code. Since it was meant to run on common hardware it lacked paging or maybe that was the later version. If I remember from reading a later Unix book, some of what was added
        in Xenix returned to a major line of Unix.

        Looking back , Microsoft went with Unix very early, before there was an IBM PC, though perhaps concurrently with there “development” of MSDOS. I always thought there was a probression, but the dates in the Wikipedia article says otherwise.

        Now maybe they released code before its time, and expected buyers to help fix it. Or maybe they messed things up trying to get it into smaller memory size.

        But the Wikipedia article does say Microsoft expected it to be their future foundation. Maybe that’s interpretation, when MS bought the source code that was the intent (when MS was still only releasing BASIC and maybe other languages) and someone garbled it into a later period.

        Michael

        1. xenix was not meant to run on common hardware. Its first target was a custom 68000 system made by Radio Shack. Its main problem was that they used the Microsoft C compiler instead of the AT&T compiler so literally every executable on they system was just rotten. Unix at Microsoft was just a way to generate some revenue from the enterprise sector before NT was ready. They never took it seriously, they never put appropriate resources into it. Today trump will sell you a wall, back then Microsoft sold you xenix. same thing.

          1. Define ‘common hardware’. IBM Compatibles weren’t really standardized until 1988, and machines could be only broadly compatible with the PC/AT. Even CP/M required specific tailoring to whatever hardware a particular manufacturer used, and there were no ‘standard’ 68k machines at all, at least to my knowledge. The only computer ‘standard’ in the early 80s was the MSX, and that was initially a Microsoft project

          2. But eventually you could get Xenix for the 286. That was “common”.

            And by definition, anything sold at Radio Shack was “common” even if few coukd afford one.

            I also recall a review in Byte, around 1984, for an 8086 system intended for Unix. A lot of RAM for the time, and expensive, but I don’t recall it being anything out of the ordinary in hardware, except maybe a multiple serial port board.

            I was fine with floppies until I got my first hard drive. Then I couid never go back. If you were used to a “real” Unix system, the limitations would be more obviius.

            At one point I mentioned in alt.folklore.computers some of the “unix-like” operating systems before Minix and the free BSD and Linux. I was surprised when Dennis Ritchie replied, he was a regular in his later years,that one I mentioned, maybe Mark William’s OS, was very unix-like. So it wasn’t impossible, when previously I’d thought the clones replicated tte good things about Unix without being particularly compatible. Even Xenix had a different name because MS didn’t have the rights to the name.

            But, my original point was that Xenix was Unix, so it’s easy to see that MS for a time saw it as the future. Afterall, around 1981 we hobbyists saw articles about Unix, touting it as a very good OS, and I know I wanted it as a result, even if it took years before I ran Linux.
            So it’s not a surprise that MS saw a future in Unix, for a time. They bought the source code, and issued Xenix. Eventually they changed their mind.

            Michael

      2. Purely anecdotal comment here, but I DO have experience with Xenix.

        I remember setting up and running a Tandy 16B business computer for a small company I once worked for. For those unfamiliar, the 16B contained both a 4-Mhz Z80 processor (allowing it to run TRSDOS and CPM if you wanted to) and an 8 Mhz Motorola 68000, which gave it capability to run Xenix. We ran Xenix. (In that mode, the Z80 became an I/O processor for the 68000). I think we had two 8 meg hard drives and a daisywheel printer.

        If memory serves me, our system served 3 simultaneous users via Radio Shack DT-1 video display terminals . We ran a database package, inventory, accounts payable/receivable, spreadsheets, and several smaller pieces of analytical software that I wrote. I remember being very impressed at how responsive it was.

        Granted, there was no bitmap graphics (let alone color or sound), but this was a business machine, not a game machine… and it was 1982, after all.

        I never threw my keyboard across the room, rather, I remember Xenix and that particular hardware quite fondly.

        I don’t question your personal (bad) experience, but maybe yours was not so much about Xenix itself, but rather, the result of a poor implementation of Xenix on an Intel CPU.

        FWIW I DO remember hating windows 3.1. To me, Windows 3.1 was a dog turd dressed up with French buttercream.

        1. Did you write any code? Did you have to do any source-level debugging? Did you ever pick over the frightening mish-mash of AT&T and Microsoft .h files in /usr/include? Did you try to get hardware handshaking to work on a modem? Did you actually measure disk I/O bandwidth? Users have no idea how awful things are behind the scenes. Maybe a whole lot of developers stayed up late and drank a lot of coffee working around Microsoft bugs.

      3. I suspect there might be more than one thing called Xenix… I first ran Xenix on an IBM PC AT (6 MHz 286). That chip didn’t have virtual memory, it didn’t have much of anything to be honest. This would have had to be around 1985 or 86. I don’t know how much of a common codebase it would have been able to share with a… well, let’s see, wikipedia exists… OK, if it’s to be trusted, Xenix 2.X was based on Unix V7 and Xenix 3.X was based on System 3, so there’s a decent amount of difference right there. And at some point (and the ‘pedia says 1987) they moved to System V. A 3/60 was one of the later 3 series, so this could be the case of a young SysV versus a more mature BSD4.2. I know I first used SysV a little in late 1984 or early 85 on a 3b5 and goodness it was primitive at that point, but this was at AT&T so that’s what we had.

        I don’t remember Xenix on a 286 being all that bad, but I was comparing it to V7 on a PDP, so it makes sense they’d be pretty similar. Also, I was rather inexperienced at the time, and maybe I’ve forgotten the bad parts over the years. It happens. :-)

    3. Your timeframe is off. Microsoft was hopeful in the early-to-mid 80s that they could transition to a UNIX system. However, they were struggling with early x86 architecture, they were seeing potential competition from AT&T’s separate parts, now that they weren’t constrained by their telephone monopoly, and under pressure to keep developing DOS. By the time of the 386, they’d abandoned Xenix to SCO, and development was folded into SCO UNIX by the end of the 90s.

  3. Fascinating that an article announcing a new book failed to include the title of the book anywhere in the article.

    For those curious, you can click the one link in the article and discover the book is called “UNIX: A History and a Memoir”.

    1. *Welcome, New User – Like Russian Roulette with 6 bullets loaded

      *C++ – The COBOL of the 90s.

      *Programming – Hold still, this won’t hurt a bit.

      Ok, this book has earned some time to read it.

    2. “The Unix Haters Guide” was written when the media lab took away Steve Strassman’s Symbolics 3600 and he started bitching about the HP workstations. It’s just a crybaby rant and not much more.

    3. It’s an interesting book, and quite funny … presenting things from mid-1990s perspective, before Linux and free BSDs caught on.

      It is amusing to also consider that all those haters spent billions polishing OSes (“with GUIs that will kill CLI”), like Windows and Apple OS, and yet they were unable to kill Unix.

      Fast forward to 2019, and Microsoft takes OpenSSH from OpenBSD :)

        1. Kids don’t remember what it was like without operating systems. Every program had to include I/O and no easy way to work with other programs.
          And all the work to get those functions in each new piece of software.

          In 1984 I got a Radio Shack Color Computer, and disk drive. It had rudimentary I/O as part of Microsoft BASIC, but not a real OS. When I got an assembler, it included a sort of OS, but nothing else ran in it.
          An OS takes care of that, so the programs can be smaller, and no need to reinvent the wheel.

          But you can use the Linux kernel and ignore the utilities and apps, useful for embedded things like my tv set. It diesn’t need much beyond a program to do its stuff, but the kernel is free, and saves work.

          I thought OSX was like that, using an existing kernel and some utilities, and then run Apple programs on top.

          Michael

          1. “I thought OSX was like that, using an existing kernel and some utilities, and then run Apple programs on top.”

            Yes, their claim to fame may be the exquisite user interface. (Desktop to PC Mavens)

          2. I remember using ‘Sidekick’ from Borland which was a TSR which let you pause your main program, pop into a utitility tool with a calculator, notepade and other stuff, then pop back in. Early multitasking on MS-DOS. It sold like hotcakes because it met a need.

      1. It’s also quite funny that most of the things they’re ranting about have been fixed soon after in the mid-90s.

        And many were actually not flaws of unix itself but of the proprietary hardware they were using.

        And some things were really shortsighted:
        “Run the program again. Now it tells me that the server is not autho-rized to talk to the client. Talk to the unix wizard again. Oh, yes, you have to run xauth, to tell it that it’s OK for boris to talk to akbar. This is done on a per-user basis for some reason. I give this 10 seconds of thought: what sort of security violation is this going to help with? Can’t come up with any model.”

        Seriously.. Having a whole room of X-terminals and running without xauth was asking for people to open xview with a porn image on your terminal just as the professor walked by. Or ‘xblaster’ which changed someone else’s mouse pointer into crosshairs and would shoot holes in their windows when clicked. Password capturing was also quite possible (though on a shared ethernet it was a good thing that pcap didn’t exist yet)

        1. “It’s also quite funny that most of the things they’re ranting about have been fixed soon after in the mid-90s.”

          It appeared to me (read the first chapter last night) that it was written before then.
          But, even though I’ve considered myself “pro-UN*X”, that chapter brought up enough memories to make me re-consider.

  4. $18 isn’t much for a book nowadays, and there’s no guarantee that an ebook would be much cheaper.

    Though I suspect this won’t be a big seller, and thus I’m not likely to find it used at a book sale.

    Michael

  5. > Usually, when a famous person writes a retrospective like this, it is full of salacious details, but we don’t expect much of that here.

    Well, maybe not salacious to YOU.

  6. I’ve been in the Unix desert for so long I had completely forgotten about Meta-dot! And I still use Xemacs for my main editor, so it’s there, just not convenient as under Zmacs!

    1. That was really because the cost of the OS and hardware was too great to limit to one person.

      Nobody else uses my Linux system, I don’t have a terminal connected, but it’s way cheaper than the Radio Shack 68000 system.

      Xenix came out so early that it was concurrent with the IBM PC. So it’s more like tgey anticipated a future, and then veered elsewhere.

      I remember readingbabkut MSDOS, and different iterations kept adding things from Unix, like redirection and subdirectories. So it influenced MS to some extent.

      Michael

        1. It was rather TOPS-10 that was the grandfather of MS-DOS. The direct father was CP/M. This is where extensions have come from (like .COM and .TXT) and directories, drive letters, some commands like dir, etc. CP/M was again insprired by TOPS-10 so in that sense TOPS-10 is the grandfather.

          Of course in those days there would have been a lot of cross-polination just like there is today (think pinch to zoom appearing in Android shortly after iOS). But I don’t think Unix had a direct relationship to MS-DOS.

        2. Sorry. No, I’m saying that after. MSDOS was created, some of the later improvements seemed to come from from Unix.

          If it was based on Unix from the start, it would be very different, including multi -tasking rather than the third party workarounds.

          Around 1981 you couid get Microware OS-9, which onky claimed to be Unix-like. It was multi-user and multi-tasking, and had redirection and piping. So it was influenced by Unix, but not compatible and generally not too close.

          Michael

  7. Trying to explain the concept of an in-built cycle, and then trying to explain that the operating system (in my case, OS400) took care of memory allocation, etc, so your program could concentrate on getting its job done without having to worry about things like buffer overflows – minds BLOWN! :-)

  8. Mayhaps BrianK will see this comment: i just want to vociferously & vehemently Thank Brian, Dennis, and all his cohorts and friends who worked together to develop Multics, B, C, Unix and text processing tools and all the other great and flexible bits that we grew up using.

Leave a Reply to g2-c133535210f76855393e13f95c9684eeCancel 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.