T1#research#regulation
The Birth of UNIX — Bell Labs

Metadata
- Date
- Decade
- 1960s
- Tier
- T1
- Timelines
- A General History of Information Technology · A History of Operating Systems · A History of Open Source and Free Software
- Sources
- 06
- Connections
- 04
- Tags
- #research#regulation
The UNIX story is often told as a recovery from a failure. The framing is Ritchie's own: "For computer science at Bell Laboratories, the period 1968-1969 was somewhat unsettled. The main reason for this was the slow, though clearly inevitable, withdrawal of the Labs from the Multics project."
After Multics
Multics — the Multiplexed Information and Computing Service, built by MIT, General Electric and AT&T Bell Labs — had gathered every advanced idea of its day into one system: timesharing, a hierarchical file system, dynamic linking, ring-based protection, a command language. It did eventually ship. Bell Labs left it in 1969.
The four researchers most involved in what came next — Ken Thompson, Dennis Ritchie, Doug McIlroy and Joe Ossanna — were, in Ritchie's words, "among the last Bell Laboratories holdouts actually working on Multics." What they were losing was not a product but a habit. Multics could not support many users, but it could support them, and what they wanted to keep was "not just a good environment in which to do programming, but a system around which a fellowship could form."
Through 1969 they lobbied to buy a medium-scale machine — a DEC PDP-10, or an SDS Sigma 7 — promising to write an operating system for it. Every proposal died without being formally refused. The last and most baroque of them, structured to minimise outlay through a mix of purchase, third-party lease and a processor trade-in, drew a remark that Ritchie is careful to label as rumour: that the vice-president of Research, W. O. Baker, had said "Bell Laboratories just doesn't do business this way!" Ritchie's own retrospective verdict is less romantic: "we were asking the Labs to spend too much money on too few people with too vague a plan."
The PDP-7
What actually produced the machine was a game. Thompson had written Space Travel — a simulation of the solar system's major bodies — first on Multics, then in Fortran for the GE 635's GECOS, where the display was jerky and a single game cost about $75 of CPU time. So he found "a little-used PDP-7 computer with an excellent display processor" and he and Ritchie rewrote the game for it.
Meanwhile Thompson, R. H. Canaday and Ritchie had been designing a file system on blackboards and scribbled notes. "Most of the design was Thompson's," Ritchie wrote, "as was the impulse to think about file systems at all, but I believe I contributed the idea of device files." Space Travel had taught them how clumsy it was to prepare programs for the PDP-7; Thompson began implementing the blackboard file system on it, and then everything a file system needs in order to be exercised: processes, utilities to copy, print, delete and edit files, and a command interpreter. In August 1969, with his wife Bonnie away for a month, he gave a week each to the kernel, the shell, an editor and an assembler. Once the assembler worked, the system could support itself.
Ritchie dates the name to "well into 1970," when Brian Kernighan proposed the name Unix — in Ritchie's words, "a somewhat treacherous pun on 'Multics'". The earlier spelling UNICS is widely reported.
An I-List, but No Path Names
The file system of PDP-7 UNIX is recognisable today. It had an i-list: a linear array of i-nodes, each describing a file's protection mode, type, size and block list. It had directories, which were simply files containing names and i-numbers. It had special files describing devices. read, write, open, creat, close were all there.
What it did not have is the thing UNIX is usually credited with inventing in 1969. There were no path names. Every filename argument was a simple name, without /, taken relative to the current directory, and links plus an elaborate set of conventions stood in for hierarchy. Reaching a file in another user's directory took three commands and a cleanup. Worse, a directory could not be created while the system was running — all of them were made when the file system was rebuilt from paper tape, which made directories, in Ritchie's phrase, "a nonrenewable resource." Subdirectories were therefore hard enough to use that nobody used them. The hierarchical namespace arrived with the PDP-11.
Nor was there multiprogramming, or fork, or wait, or exec. There were exactly two processes, one per terminal. The shell read a command line, linked to the command's file, copied a bootstrap to the top of memory and jumped to it; the bootstrap read the command over the shell's own code; exit read a fresh copy of the shell back over the finished command.
Two decisions in that primitive loop carried everything after it. First, the shell was an ordinary user-level program stored in a file, not part of the operating system — "crucial to subsequent development," Ritchie wrote. Second, because both the shell and the IO system were under Thompson's exclusive control, the < and > redirection notation — an idea Multics had in clumsier form and nobody at Bell Labs had thought to steal — took, once the right idea surfaced, "a matter of an hour or so to implement."
Modern process control was "designed and implemented within a couple of days." Separating fork from exec, rather than combining them, was partly a matter of what was cheap: the PDP-7's fork "required precisely 27 lines of assembly code." The change immediately broke chdir, which had been an ordinary command and now changed the directory of a child process that promptly exited.
The PDP-11, and Three Typists
In early 1970 the group asked again, and this time asked for less and promised something specific: about $65,000, for a system dedicated to editing and formatting text. Ossanna pushed it; L. E. McMahon found the money; the order went in that May. The processor arrived at the end of summer, but no disk was available until December, so for three months the machine sat in a corner enumerating all the closed knight's tours on a 6×8 board.
The first PDP-11 UNIX ran in 24K bytes of core — 16K for the system, 8K for user programs — on a 512K-byte disk, with files capped at 64K bytes. In the last half of 1971 it carried three typists from the Patent department preparing patent applications, on a machine with no memory protection, where every test of a new program risked crashing the system out from under them. The Patent department adopted it, and that credibility bought the group one of the first PDP-11/45s built.
Pipes
Pipes appeared in 1972, "at the suggestion (or perhaps insistence) of M. D. McIlroy," who had argued years earlier that commands should be binary operators taking an input and an output file. The idea, explained one afternoon on a blackboard, was not taken up — the infix notation looked too radical. "What a failure of imagination!" Ritchie wrote later.
When pipes were finally installed, the first notation reused the redirection characters: sort input >pr>opr>. It survived a couple of months before the modern | replaced it. The term filter was coined almost immediately, and commands were rewritten to be usable in the middle of one — until then, nobody had imagined anyone would want sort or pr to read standard input when given no arguments. Ritchie's own assessment of why this mattered: "The genius of the Unix pipeline is precisely that it is constructed from the very same commands used constantly in simplex fashion."
1973 — C, and the Paper
The watershed came in the summer of 1973, when the kernel was rewritten in C. The published cost is exact: "The size of the new system is about one third greater than the old." It was accepted because the same rewrite brought multiprogramming and the ability to share reentrant code between user programs, and because the result was easier to understand and modify.
Portability was the consequence, not the motive, and it is what separated UNIX from every operating system before it. It was not the first OS written in a high-level language — Burroughs' MCP had been written in the ALGOL-derived ESPOL in 1961, and Multics was largely PL/I — but it was the first where writing in one cashed out as the ability to move the system to a different machine.
In October 1973 Ritchie and Thompson presented UNIX at the Fourth ACM Symposium on Operating Systems Principles, at IBM's Thomas J. Watson Research Center in Yorktown Heights; the revised paper ran in Communications of the ACM in July 1974. It is a short document with an unusual boast in it: since PDP-11 UNIX became operational in February 1971 about 40 installations had been put into service, and "UNIX can run on hardware costing as little as $40,000, and less than two man years were spent on the main system software."
The Constraint That Gave It Away
In 1949 the US Department of Justice sued AT&T under the Sherman Act in New Jersey federal court. The 1956 consent decree that settled it required no divestiture; instead AT&T was prohibited from engaging in any new business other than common carrier communications services, and Bell Labs was required to license its patents to third parties for reasonable royalties. As the Federal Judicial Center puts it: "One consequence of the agreement was that AT&T was forbidden to enter the computer business—a concession the company's management did not see as very significant at the time."
Bell Labs therefore could not sell UNIX. It sent it out instead at nominal cost — effectively tape and postage — to universities and research institutions, with source code. What Berkeley did with a copy is a story of its own.
When Linus Torvalds began writing Linux in 1991, his model was UNIX. When Apple built iPhone OS in 2007, the kernel beneath it was a UNIX descendant. Most people who have never heard of UNIX now use a UNIX-descended operating system every day.
Questions this page answers
- Who created UNIX?
- Ken Thompson began it at AT&T Bell Labs in 1969 on an idle PDP-7, and Dennis Ritchie joined him. It was named UNICS, later UNIX, in 1970.
- When was UNIX rewritten in C?
- In 1973. The C language had been designed in 1972, and the rewrite is what gave UNIX its portability.
Sources
TertiaryHistory of Unix — Wikipedia
Last updated: