Ritchie & Thompson
Ritchie & Thompson
Wednesday, 26 January 2011
Article Index
Ritchie & Thompson
Unix and C
Belle chess playing program

Implementing a portable Unix

Of course the first stage of the office automation system was to implement Unix, as it was now called. With the experience that they already had it didn't take long. Soon they had a working system and their first users. The operating system became increasingly popular at Bell. The reason was mainly that the PDP 11 was such a good machine but the software that it came with was fairly useless - hence the acceptance of Unix. This was pretty much the same set of reasons that caused CP/M to become a popular operating system some ten years later when the personal computers of the time offered hardware that couldn't be resisted. Both Unix and CP/M filled an operating system vacuum that existed in their own time.

Unix lived for a long time within the confines of Bell. Few outsiders knew about it at first. The most exposure it got was an airing at the 1973 symposium on operating systems held by IBM. Perhaps the long and gentle settling in period helped the operating system meet a higher objective than the pressures of making money or even meeting a deadline.

The next step in the Unix saga is a strange tale. Ritchie and Thompson tried to move their applications software to other machines but discovered that, while the translation was easy for the main body of the code, the operating system calls were more difficult. They came to the surprising conclusion that it would be easier to move the entire operating environment and then run the application under its own operating system. The idea of a portable Unix was born.

The question was how to do it? Operating systems had traditionally been written in assembly language because they needed the speed that this conferred. Not only did an operating system seem to need assembly language but they also got deep in to the workings of the machine's hardware. It is difficult to think of a program that is intrinsically less portable than an operating system!

They attacked the problem in two ways. First they decided to create a new high level language that would be close enough to the underlying machine architecture to be efficient. The second idea was to re-write Unix with the highly machine dependent and speed critical parts together.

Ritchie set off working on the language problem and the result, eventually, was C. He based his design on another language called BCPL which was a systems implementation language invented in the UK in 1967. Thompson had implemented an experimental language based on BCPL for the PDP 7 system running under the first version of Unix (1970). This was called B and it is best described as a stripped down version of BCPL.

The switch to the PDP 11 and the need for a system implementation language for the next version of Unix set Ritchie to work on converting and extending B. The main change was the addition of data typing to accommodate the broader range of storage types and operations available on the PDP 11. But the changes were large enough to merit and new name - and after B comes C!

The C language

From becoming a language running under Unix, C turned in to the language that Unix was written in. The machine dependent and other critical sections of the code were grouped together and written in assembler and known as the kernel. The rest of the operating system - around 90% - was written in C. This resulted in the first portable version of Unix and marked the start of its wider acceptance.

If you wanted to run Unix on a strange machine all you had to do was write a C compiler for it and implement the kernel in the machine's own assembly language. You might think that writing a compiler was a difficult job but Unix even gathered the necessary software tools around itself to make this easy. Given access to a working Unix system you could implement a cross C compiler for another machine, write the kernel and port the system in a reasonable amount of time. It almost sounds like a recipe for a virus!

Unix certainly spread itself onto other machines at a speed that was uncharacteristic for an operating system. However this wasn't just because of the easy transfer its design made possible. Bell Labs didn't really see any market potential in the product and so it was virtually free. Educational establishments took to it as a low cost and powerful operating system that could be used as a teaching tool but was also capable of doing real things.

Ten years after its release you had to look hard to find a University that didn't have Unix somewhere on campus! Generations of students grew up knowing Unix intimately - not only its outside appearance but its internals. Unix was part of the curriculum! This had two effects. The first was that there was a steady stream of graduates entering industry and being surprised that they didn't find Unix and second was that the Unix system grew as academic exercises turned into almost usable programs.

This academic breeding ground for Unix had a profound influence on its style and way of doing things. As any Unix disciple will tell you Unix is logical and you can get a lot done in a few key presses. As any Unix beginner will tell you, Unix is logical even at the cost of usability and working out which keys to press is often difficult!

In 1983 Dennis Ritchie and Kenneth Thompson received the Turing Award from the ACM. The citation read: 


In 1990 they were awarded the IEEE Hamming Medal "for the origination of the UNIX operating system and the C programming language".



They received the National Medal of Technology of 1998 from President Bill Clinton "for co-inventing the UNIX operating system and the C programming language which together have led to enormous advances in computer hardware, software, and networking systems and stimulated growth of an entire industry, thereby enhancing American leadership in the Information Age".

In 2011 were awarded the Japan Prize for their development of "the UNIX operating system which has significantly advanced computer software, hardware and networks over the past four decades, and facilitated the realization of the Internet."

I'd rather think of Ritchie and Thompson as precursors of the personal computer programmers of the 80s - not driven by profit but by fun and enthusiasm for ideas.



<ASIN: 0826464165>

<ASIN: 0596100299>



Last Updated ( Monday, 24 February 2014 )

RSS feed of all content
I Programmer - full contents
Copyright © 2016 i-programmer.info. All Rights Reserved.