In a previous article, we took a look at the steps that led up to the creation of Unix. Today, we will continue to look at the evolution of Unix and the events that led to the creation of BSD.
The Unix Room
When Ken Thompson, Dennis Ritchie, and their team started their operating system project, they were assigned an office on the sixth floor of Building Two at Bell Labs. The room contained their hard-won PDP-11, along with several model 33 and model 37 teletypes. Eventually, the teletypes were replaced with monitor terminals, and the team moved to a better room one floor down.
The room was very busy, no matter where it was. Inside, people were either coding or socializing. Many people spent more time in the Unix room than they did in their own office. Ken Thompson was a prime example.
For a short time, the room had a strange feature: a 10kg chocolate bar. According to Brian Kernighan, “they would put a 10kg chocolate bar in the middle of this table, and of course, it wasn’t long before you had little chocolate fragments all over the place. It was just an unbelievable mess, but it was good chocolate.” One can imagine that this was a precursor to the many perks that technology companies offer today.
The First Editions
Unlike most software, Unix did not have scheduled releases and version numbers. This was due to the fact that it was evolving very rapidly. Instead, the developers released a new version of the programmer’s manual periodically.
The first edition of Unix was released on November 3, 1971. This version contained a FORTRAN compiler and versions of many low-level system utilities still used today— including cat, find, ls, and many more. It also had a B compiler, a BASIC interpreter, device files and functions for managing punched tape, DECtape, and RK05 disks.
One of the things that made the first edition of Unix stand out was the inclusion of a hierarchical file system. Commonplace as the nested folder metaphor is today, the ability to organize files into multiple levels of containing directories or folders was novel at the time.
For the time, Unix provided a remarkably powerful environment for software development— and did so in a relatively small space. It was approximately 4200 lines of code long and took up 16 KiB of memory.
In Early Unix history and evolution, Dennis Ritchie says “every program for the original PDP-7 Unix system was written in assembly language, and bare assembly language it was—for example, there were no macros.” When the team acquired its newer PDP-11, Unix had to be rewritten—still in assembly—for the more powerful machine. Although hand-writing so much code in machine-specific assembly was an incredible amount of work, it gave Unix maximum direct access to the hardware, and the increased performance which came with it.
Did you know?
Improve the way you make use of ZFS in your company
Did you know you can rely on Klara engineers for anything from a ZFS performance audit, to developing new ZFS features to ultimately deploying an entire storage system on ZFS?
The second edition was released several months later on June 12th, 1972. According to the preface to the second edition, “the number of UNIX installations have grown to 10, with more expected.” This new release included many new commands such as echo, exit, man, stty, and the first C compiler.
The third edition followed several months later in February of 1973. This version added a C debugger, pipes, crypt, kill, passwd, ps, size, speak, split, uniq, and yacc to the system. By this time, Unix had expanded to 16 machines. Pipes were the most important part of this release. The addition of pipes had been advocated by M. D. McIlroy for a long time, but up to this point they had gained little support. Brian Kernighan said that pipes were a “nice idea in theory, but it’s much harder to figure out how to do that in practice.” However, once a new notation was introduced, pipes were added to the system and greatly extended its functionality.
The Rise of C
Unix needed a high-level programming language to be considered a “serious system”. Writing new assembly for each different computer UNIX was going to run on just wasn’t going to be possible. Thompson decided that he would write a FORTRAN compiler. After a week, his focus shifted, and he started working on a new programming language named B, which was influenced by the BCPL language.
B was designed to be simple and portable, but the fact that it was an interpreted language meant that it “was doomed to be slow“. (There had been talk about rewriting Unix in B, but that was dropped.) There was also an issue porting B to the PDP-11. These problems led to the creation of the C language by Ritchie.
Early C was basically an improved version of B. As Unix evolved, so did the C programming language. In 1973, Ritchie added structures to C, improved the compiler, and made several other changes to make it the language that we know (and love) today.
When the fourth edition of Unix debuted in November of 1973, the system had been rewritten in C. This was groundbreaking because it meant that Unix had become “one of the earliest operating systems to be written in a high-level language, a fact that made subsequent porting to other hardware architectures possible.”
This edition also introduced the comm, dump, file, grep, nice, nohup, sleep, sync, tr, and wait commands. According to the manual, the number of installs was now “above 20“. It also marked the first time the outside world was exposed to Unix through a paper written by Thompson and Ritchie. The article was printed in Communications of the ACM, which was published by the Association for Computing Machinery.
The Unix Train Picks Up Steam
The ACM article piqued the interest of people outside of Bell Labs. They wanted to try out this new operating system. However, AT&T could not sell Unix, due to a consent decree with the federal government. But they could license it. Starting with the fifth edition, released in June of 1974, they did just that. The manual for this edition noted that the “number of UNIX installations is now above 50, and many more are expected”. This release also introduced col, dd, diff, eqn, lpr, pwd, spell, and tee.
Initially, Unix was only licensed to educational institutions. Many future programmers and computer scientists encountered Unix in this way. That changed when the sixth edition was released in May of 1975. From this point forward, Unix was licensed to “commercial firms as well as schools”. Schools were only charged $200 per license, but companies were charged $200,000 per license. The cost might seem prohibitive, but “a few firms felt the improved productivity achieved with Unix was worth the fee”. Two years after the release of the sixth edition, “UNIX was running at some 500 sites, including 125 universities in the United States and several other countries”. Despite its popularity, Bell Labs would add a slide that said “No advertising, no support, no bug fixes, payment in advance” whenever they talked about Unix at conferences. Since they could not expect to receive support from the system’s creators, many Unix users banded together to aid each other by “fixing bugs, writing new tools, and generally improving the system as they saw fit”.
Seventh Edition Unix: the Father of BSD
The seventh edition of Unix was released in January of 1979. This version greatly improved system reliability and introduced an improved file system. It also included new tools, including awk, make, sed, tar, uucp, the Bourne shell, an improved C compiler, and a FORTRAN 77 compiler. According to the October 1983 issue of Byte Magazine, “Many of the previous rough spots had disappeared, the maximum file size had grown to 1 gigabyte, and a standard I/O (input/output) library had been introduced”.
During the 1975/1976 academic year, Ken Thompson worked as a visiting professor at the University of California at Berkeley. While there, he introduced the students to Unix and they worked together to create new tools for it. The Unix tools created by Berkeley students included the C shell, vi, the Berkeley Fast File System, sendmail, a Pascal compiler, and virtual memory management on the new Digital VAX architecture. These tools were packaged with Unix and released as the Berkeley Software Distribution. The first full version for the VAX was 3BSD, released in December of 1979. From there, BSD would grow on its own and eventually overshadow its progenitor.
Like this article? Share it!