[CWC logo] Computer Creators: Ritchie and Thompson


Dennis Ritchie and Ken Thompson

When the personal computer made computing power available to almost anyone who wanted it there was an explosion of creative talent. It was as if a dam had been opened and word processors, spreadsheets and a myriad of other software had tumbled out. Even now, if you have a good idea and the talent to go with it, there's little to stop you creating the program that will change the world. Today's software innovator is characterised as a free-thinking maverick, a youthful entrepreneur - and it all depends on the low cost of computer hardware. Amazingly, there was one very clear example of this sort of software innovation back in the days of the mainframe and the minicomputer. Deep in the hidden corners of the mighty Bell communications company, Dennis Ritchie and Kenneth Thompson were given the freedom to play with some expensive hardware, and produced Unix and the C language just for their own amusement!


[PHOTO]

Name:
Dennis Ritchie
Born:
1941
Country:
USA
Specialism:
Software
Theories:
None
Products:
Unix, C and more
Companies:
None

Name:
Kenneth Thompson
Born:
1943
Country:
USA
Specialism:
Software
Theories:
None
Products:
Unix, C and more
Companies:
None


Like all good teams, Ritchie and Thompson have different but complementary qualities. Ritchie studied physics and then moved on to pure computer science via maths. His PhD thesis was on recursive functions but he soon got bored and never submitted it. Thompson, meanwhile, was an electronics enthusiast in the days when the transistor was new and there were still things worth building! He was also keen on chess, a fact which we will return to. Although Thompson originally studied electrical engineering, he soon discovered that computing was just as interesting: "Computing is an addiction. Electronics is a similar addiction but not as clean. Much dirtier. Things burn out!"

It would be too much of a simplification to say that Ritchie was the theoretician and Thompson was the practical partner, but the difference in their back- grounds must have helped rather then hindered their working together. The fates brought them together around 1968 at the Bell Laboratories, famous for being the home of the transistor and many other basic research projects. Ritchie and Thompson were given the brief to "investigate interesting problems in computer science". The pair decided to implement an operating system, but unfortunately for them Bell had just had a bad experience with the Multics operating system. This had been another of those multi-company attempts at a time-sharing operating system, but as the bill for the project spiralled, Bell pulled out. The two had not chosen the ideal time to suggest another operating system project.

Thompson found an obsolete PDP 7 mini computer (even in those days the pace of things was fast enough for machines to become obsolete while they were still usable!) He added a fancy graphics terminal to it which had been discarded from a mainframe (see what I mean about him being the practical one?) and the pair then started work on their operating system. It wasn't exactly easy because the PDP 7 wasn't self-sufficient, so they had to use a PDP 7 cross assembler that Thompson wrote for a GE mainframe. Most of the actual work on the operating system was done by Thompson, but Ritchie contributed the theoretical ideas that helped shape the form of the filing system.

After two years of work (what story they were telling Bell is anyone's guess!), the operating system had outgrown the PDP 7 and they had their eye on a PDP 11. This could be regarded as the fore-runner of the personal computer, having a small but neat architecture which had enough power to run interactive software. However, they couldn't propose that Bell give them a PDP 11 to develop an operating system because the memory of the Multics failure was still in the air. Instead they suggested what today we would call an offce automation system for the patent department. Bell must have been either naive or very far-sighted, because it passed the proposal and Thompson and Ritchie got a PDP 11 of their very own.

The first stage of the office automation system was to implement Unix, as it was called by then. With the experience that Ritchie and Thompson already had, this didn't take long. They soon had a working system and their first users, and the operating system became increasingly popular at Bell. The quick acceptance of Unix was mainly because the PDP 11 was a good machine, but the software it came with was fairly useless. This was pretty much the same set of reasons that caused CP/M to become a popular operating system some 10 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 within the confines of Bell for a long time, so 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 . However, the long and gentle settling-in period may have worked to the operating system's advantage, helping it achieve a higher objective than the pressures of making money or even meeting a deadline.


On the move

The next step in the Unix saga is a strangetale. 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. Thus 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 this conferred. Not only did an operating system seem to need an assembly language, it also meant getting deep into the workings of the machine's hardware. It's dilficult to think of a program that's intrinsically less portable than an operating system!

The pair 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. Then they would rewrite Unix with the highly machine-dependent and speed-critical parts together.

Ritchie set to work on the language problem, basing his design on another language called BCPL a systems implementation language invented in the UK in 1967. Thompson had already 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 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 he made 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 a new name - and after B comes C!

From being a language running under Unix, C turned into 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 percent - 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 diffficult 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...


Making it big

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 transferability made possible by its design. It had the advantage that Bell Labs didn't really see any market potential in the product, which made it 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. 10 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 also its internals. Unix was part of the curriculum, and 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; the 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, it's a logical environment and you can get a lot done in a few keypresses. On the other hand, as any Unix beginner will tell you, Unix is logical even at the cost of usability, so working out which keys to press is often difficult! With this in mind it seems strange that Unix - a now 20-year-old operating system - is still being touted as the way of the future. When you analyse the reasons for this it turns out to have more to do with commercial interests and the continuing software vacuum, rather than the initial technical brilliance of the design.

In 1983 Dennis Ritchie and Kenneth Thompson received the Turing Award from the ACM. The citation read: "The success of the Unix system stems from its tasteful selection of a few key ideas and their elegant implementation. The model of the Unix system has led a generation of software designers to new ways of thinking about programming. The genius of the Unix system is its framework, which enables programmers to stand on the work of others."

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


Playing Around

There's a sideline to the career of Kenneth Thompson which has nothing to do with Unix, C or any of the types of program he is usually associated with. As a boy he enjoyed playing chess as well as electronics, so what could be more natural than to create chess- playing programs and machines? In 1972 Thompson started work on Belle, a chess-playing program that used traditional search techniques combined with a database of end games. Later, in 1976, he and Joe Condon developed a hardware prototype for a move generator for Belle - possibly the first dedicated chess-playing hardware. By 1980, this had developed from a 200 move-per-second machine to 120,000 moves per second. This fast machine used 1,700 chips and did all the work necessary to play top-class chess.

Earlier versions had used a PDP 11 as a host, but the 1980 version of Belle did everything itself and won three ACM computer chess championships (1980, 1981 and 1982). It made history for being the first program to be awarded the title of 'Master' in the US, and its creators were awarded 5,000 pounds by the Fredkin Foundation.

While working on Belle, Thompson even managed to get the rules of chess changed.The 50-move rule said that after 50 moves in which no pawn advanced and no piece was captured, the game should be declared a stalemate. As a result of using his end game database to analyse simple endings, he managed to show that there were games that could be won if allowed to go on beyond the 50 moves. As a result the 50-move rule was changed - but it was soon found to be unworkable and changed back!


The above article first appeared in Computer Shopper, June 1993, and was written by Mike James. Their kind permission to reproduce this article is gratfully acknowledged.


[Leicester University] [] Computer Centre
Information Suppliers: Richard Mobbs, Head of Information Services, Leicester University Computer Centre.
Last Updated: June 1996