1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
|
+++
title = "History of Unix part II: Birth of Unix"
author = ["Michał Sapka"]
date = 2024-03-16T21:00:00+01:00
categories = ["unix-history"]
draft = false
weight = 2003
image_dir = "unix-history"
image_max_width = 480
abstract = "How Unix came to be?"
shortname = "Part II: Unix"
link = "part-ii-unix"
aliases = ["/bsd/history/02_unix/"]
primary_menu = "unix-history"
[menu]
[menu.unix-history]
weight = 2003
identifier = "history-of-unix-part-ii-birth-of-unix"
name = "2. Birth of Unix"
+++
## Bell Labs {#bell-labs}
Let's pause here and discuss a few things.
_Bell Labs_ was a research institute founded by no other, but the famous Alexander Graham Bell in 1876.
It is known as one of the most innovative places ever conceived.
It was the birthplace of radio astronomy, the transistor, the laser, the photovoltaic cell, the charge-coupled device (CCD), information theory, and the programming languages B, C, C++, S, SNOBOL, AWK, AMPL, and the UNIX operating system.
The work completed there was awarded 10 times with a Nobel Prize[^fn:1].
But it wasn't all pretty.
AT&T (owner of the lab) was _the_ telephone company in the USA.
It had the _de facto_ monopoly for most of the 20th century.
This led to a consent decree with US Government under which AT&T was forbidden to branch out to other markets.
This agreement happened in 1956 and will be very important for our story[^fn:2].
Another cool tidbit: back then computer screens as we know them now were yet to be invented.
There were ways for computer to present information on a screen, but it was not feasable to present information back to the user in real time.
The monitor was a separate machine and an _assembly_ code to light up individual pixels would need to be sent every time to it.
If the user wanted to see what the edited document looked like, the only way to achieve that was via a printer.
Try to print a page every few lines - let alone every character.
Even the bravest of the brave would not escape the anger of the finance department.
## Getting a computer {#getting-a-computer}
After this short intermission, let's return to _UNIX_.
The popular history of _UNIX_ goes as follows:
Ken Thompson finds a PDP-7 microcomputer, starts playing with it and suddenly realizes that he has created a new operating system.
What he actually wanted to do, was to play a damn game.
A completely reasonable reason to revolutionize the industry if you ask me.
Ken was a huge fan of _Space Travel_, but it was only available on mainframes.
And since those costed an arm and a leg, end users were paying for time they used.
A single game of _Space Travel_ could cost Ken USD 50-75[^fn:3].
Luckily, he was able to find a discarded PDP-7 from another department[^fn:2].
{{< image class="centered" alt="Photo of black screen with lines representing rudimentay space ship viewscreen" source="https://www.uvlist.net/game-164857-Space+Travel" file="space-travel.png" >}}
Fig. 2.1. Space Travel
{{< /image >}}
What the PDP-7 was, was a refrigerator size 18bit monstrosity[^fn:2].
It was at the time a 5-year-old and obsolete[^fn:4] leftover from an ended research into audio-psychology.
No one cared what would happen to this particular machine.
Have I mentioned just how stinky rich the _Bell Lab_ was?
So, Ken started rewriting the game for that PDP-7 as _GECOS Space Travel_.
Porting the game proved challenging and difficult to debug, so they developed a system for PDP-7 to make developing the game easier.
This was how _PDP UNIX_ was born[^fn:5].
A guy wanted to play a god-damn game and now bankrupt in the process[^fn:2]
Labs management was very happy with this turn of events as _UNIX_ was something to show after the _Multics_ fiasco.
They allowed Ken to get himself a _PDP-11_ and port _UNIX_ to it.
It was a cheaper machine compared to _PDP-7_, but it was also 16bit - which was a nice change.
Officially, the new system would allow for document preparation for patent applications[^fn:4].
The biggest benefit however was the popularity of this machine - over the next decades it could be seen everywhere across enterprise America.
You can buy a working one from _eBay_ today.
It won't be easy nor cheap, but definitely possible.
{{< image class="centered" alt="Photo of a big, old computer the size of a wardrobe. The dominating color is teal." source="https://en.wikipedia.org/wiki/PDP-7#/media/File:Pdp7-oslo-2005.jpeg" file="pdp-7.jpeg" >}}
Fig. 2.2. PDP-7
{{< /image >}}
{{< image class="centered" alt="Photo of two white men. One is standing over and talking the other. The other is sitting in front of a teletype." source="https://www.bell-labs.com/institute/blog/invention-unix/" file="thompson-ritchie-pdp11.jpg" >}}
Fig. 2.3. Ken Thompson and Denis Ritchie working on the legendary PDP-11.
{{< /image >}}
## Unix 1 {#unix-1}
So here we are, November 1971, and _UNIX 1_ for _PDP-11_ is released[^fn:6]
A year later Ken notes:
>
>
> [...]the number of UNIX installations has grown to 10, with
> more expected. None of these has exactly the same complement of
> hardware or software. Therefore, at any particular installation,
> it is quite possible that this manual will give inappropriate
> information. [...] Also, not all installations have the latest versions of all the software.''
>
> -- Unix Programmers Manual, Second Edition. Thompson Ken, Ritchie Denis, 1972
Note, that this is 10 mainframes across _Bell Labs_, so user count was significantly higher.
It's also worth to talk about release cycle.
UNIX was in constant development, and each installation would use current snapshot at the moment of installation.
This is why Ken notes that each part of _UNIX_ could differ between installations.
What is also important is that due to licensing of _UNIX_ (or rather lack of thereof), each installation would be accompanied by full source code.
Administrators were able to modify the system.
Crazy times.
Still, in June 1972 the 2nd Edition of _UNIX_ was released and every 7–8 months a new release was out.
In November 1973, a 4th Edition was released, and it was the first one released to Universities.
It made quite the buzz, and first user groups started forming under the _USENIX_ name[^fn:2].
It's worth to mention that this version was rewritten in C, as previous versions which were created in Assembly
This made it the first portable _UNIX_, as it could be recompiled to any compared, as long as it also had a C compiler[^fn:4].
The system was presented by Ken and Denis during the _4th Symposium on Operating System Principles_ the same year,
and a year later Ken and Dennis publish the first paper on _UNIX_ - "The UNIX Time-Sharing System" in the _Communications_ journal of ACM.
{{< image class="centered" alt="Photo of front and back cover of an orange book with The Unix System written in the center; Above it a text states AT&T Bell Laboratories Technical Jurnal" source="https://leancrew.com/all-this/2011/10/dennis-ritchie-unix-and-clarity/" file="unix-tech-journal.jpg" >}}
Fig. 2.4. Bell System Technical Journal cover.
{{< /image >}}
The word was out and _UNIX_ became known outside of _Bell Labs_.
In the next episode of History of Unix: the scariest creature of them all.
Lawyers.
[^fn:1]: [Bell Labs --- {W}ikipedia{,} The Free Encyclopedia](https://en.wikipedia.org/wiki/Bell_Labs)
[^fn:2]: [The hidden early history of unix the forgotten history of early unix](https://www.youtube.com/watch?v=xuzeagzqwrs)
[^fn:3]: [UVL](https://www.uvlist.net/game-164857-Space+Travel)
[^fn:4]: [The early days of Unix at Bell Labs - Brian Kernighan (LCA 2022 Online)](https://www.youtube.com/watch?v=ECCr_KFl41E)
[^fn:5]: [Living Computer Museum](https://livingcomputers.org/Blog/Restoring-UNIX-v0-on-a-PDP-7-A-look-behind-the-sce.aspx) has a real PDP-7 running _PDP Unix_ if want to chek it.
[^fn:6]: The 50th anniversary of this event was very big for a small group of fans.
|