The first crude version of Unix was written in assembler language on the PDP-7 and later the PDP-11. But Ken Thompson thought it should be written in a higher-level language. In 1971 he first experimented with Fortran, but according to some stories, he gave up after only one day. He then decided to write his own language, loosely based on BCPL, and called it simply B. But B was interpreted so it was too slow for an operating system. B also lacked types, which complicated things.
Ritchie first expanded B, adding types to the language, and named the result New B, or NB. The next step was writing a compiler, which took longer than expected. The result was the C language and Thompson started to rewrite Unix in it, which he finished in 1973.
With this Thompson and Ritchie created a much more portable operating system, leaving only small parts of the code machine-dependent.
The Unix Philosophy
Douglas McIlroy, head of Bell Labs’ Computing Techniques Research Department, had created the concept of ‘pipes’ – chaining processes by streams, or: the output of one program becomes the input of another. His idea was to have specific tools to do specific jobs, and chain small tools together to do more complicated jobs. This was probably the first idea for “software componentry“. He summarized this as follows:
- Write programs that do one thing and do it well
- Write programs to work together
- Write programs to handle text streams, because that is a universal interface
This ultimately became known as “The Unix Philosophy”.
So the idea was there, but a syntax was needed to use it. Then Brian Kernighan came up with the vertical bar (|) and pipes were born, which led the way to creating several tools with specific tasks.
In the process, McIlroy developed several Unix tools like diff, spell, tr, and others.
A simple (and well-known) example of chaining two programs is:echo "IBM 9000" | tr A-Z ZA-Y
Where the first part outputs the text “IBM 9000″, which goes as input to tr, which shifts all letters (A-Z) one position and forms the name of a computer from a famous movie (ok, I like Sci-Fi movies…).
Spreading of Unix
Unix was a fact now and AT&T started distributing licenses to universities and the government. In 1976 / 1977 Thompson took a six-month leave from Bell Labs to teach at UCB. And of course he taught Unix. After he left, professors and students improved some parts of Unix, creating what became the Berkeley Software Distribution, or BSD, which was resold to several other universities.
UCB established the Computer Systems Research Group (CSRG), which received a grant from DARPA. They made the TCP/IP protocol available for Unix, opening the way for this operating system to play a key role in the early days of the internet.
The following BSD releases contributed several new tools to Unix, like a visual editor (that became vi), the c-shell, delivermail (which became sendmail) and the curses library, the forefather of ncurses.
For the VAX computer BSD included Virtual Memory Management. The kernel image of this Unix version was named vmunix – a name we can recognize in modern Linux kernels, normally named vmlinuz (the final ‘z’ because if the zlib-compression).
It is estimated that by 1978, over 600 (!) machines were running Unix.
To be continued…
]]> http://underpop.online.fr/n/nielshorn/2008/10/slackwarelinuxunix-pre-history-part-2-a-new-language-a-philosophy-and-the-spreading-of-unix/feed/ 1 http://underpop.online.fr/n/nielshorn/2008/10/slackwarelinuxunix-pre-history-part-1-the-origins/ http://underpop.online.fr/n/nielshorn/2008/10/slackwarelinuxunix-pre-history-part-1-the-origins/#comments Fri, 17 Oct 2008 01:45:00 +0000 Niels Horn http://underpop.online.fr/n/nielshorn/blog/?p=22 In the beginning there was…CTSS, the Compatible Time-Sharing System, developed at the Massachusetts Institute of Technology (MIT) Computation Center and first demonstrated in 1961. It had some interesting features like:
- inter-user messaging (what we would call ‘e-mail’ nowadays)
- a program called RUNCOM, that could execute several commands put together in a file – like modern-day shell scripts
- RUNOFF, probably the first text-formatting software
In 1964 MIT, together with Bell Labs an General Electric (GE) started developing Multics (Multiplexed Information and Computing Service) . GE manufactured mainframe computers in those days for which they needed an Operating System. It was conceived as a modular system, where new resources (memory, disk storage) could be added as necessary. Every file had an Access Control List to share or secure its contents amongst users.
Some novelties of Multics, now considered normal, were:
- dynamic linking
- daemons
- a hierarchical file system
- symbolic links
In 1969 AT&T / Bell Labs decided to leave the project and in 1970 GE’s computer business was sold to Honeywell.
In Europe Multics was distributed by Groupe Bull, where I had my first contact with computers. I don’t remember what year this happened, probably around 1975.
The birth of UNIX
Ken Thompson, who had worked through Bell Labs on Multics, had written a computer game called Space Travel for this operating system. Unsatisfied with the performance, he rewrote the program in assembly language for a Digital Equipment Corporation PDP-7, with help from Dennis Ritchie.
Together they teamed up with several other developers to write an operating system for the PDP-7. It is obvious that they were influenced my Multics, but they focused on the philosophy of Keep It Small & Simple, what ultimately became part of the famous Unix Philosophy.
They developed a new file system, a command line interpreter (CLI) and several utility programs for their new OS.
Brian Kernighan, who later co-wrote the first book on the C programming language with Dennis Ritchie, invented the name Unics, as a pun on Multics. According to some stories, after hearing too many comments about “Eunuchs”, the spelling was changed to Unix.
On the PDP-7 it eventually supported two simultaneous users.
To get financial support from Bell Labs, Thompson and Ritchie promised to add support for text-processing in Unix. They received a PDP-11 machine to continue their work and write roff and a text-editor. roff was based on the runoff text-formatter from Multics and before that CTSS, and survives until today as the GNU version groff.
In 1971 The UNIX Programmer’s Manual was published using troff, an evolution of roff for typesetters.
To be continued… ]]> http://underpop.online.fr/n/nielshorn/2008/10/slackwarelinuxunix-pre-history-part-1-the-origins/feed/ 0