George Coulouris: Bits of History

This page is under construction. At present it consists only of some notes on my early involvement with UNIX development and a 'wish list' of other things I intend to write about one day. Comments and suggestions will be welcome.

The early days of UNIX

My interview for A Quarter Century of UNIX

[Notes from an interview with Peter Salus, published in A Quarter Century of UNIX, by Peter H. Salus, Addison-Wesley 1994.]

Sunil Das told me he thinks you were in the US in 75 and gave the em editor to Bill Joy. Has this any basis in fact?

I developed 'em' at QMC in the autumn of 1975, to enable us to exploit more effectively some vdu terminals that we had recently acquired. We had a background of experience in developing applications on graphical displays with both cursor-key and tablet-driven cursor positioning (this experience came to us with William Newman, who spent a year and half working with us between working at Utah and Xerox PARC - see Alan Kay's article in Sigplan notices March 1993 for more on the history of those places and the links between them). I concluded that Unix's 'raw' mode of terminal input, which was at that time almost totally unexploited, could be used to give some of the convenience and immediacy of feedback for text editing that we were used to in our single-user graphical systems, and this led me to develop 'em'.

Then I spent the summer of 1976 as a visitor to the CS Dept. at Berkeley. I worked in a room full of teletype terminals using the departmental Unix. I had brought 'em' with me on Dectape and installed it there for my own use. (Although 'em' was designed for vdu's, its single-character interaction could be used - painfully slowly - in TTY's - the current line being re-printed after each interaction!)

One day, sitting at the next terminal was this fairly frenzied hacker/PhD student (Bill Joy) who told me that he was writing a Pascal compiler. I showed him 'em', and he said "that's nice, the system support people might be interested in that". He took me and introduced me to them. They had a couple of PDP11's (I'm not sure which models) supporting several rooms full of vdu terminals connected at 9600 baud, an environment in which 'em' could really shine.

I explained that 'em' was an extension of 'ed' that gave key-stroke level interaction for editing within a single line, displaying the up-to-date line on the screen (a sort of single-line screen editor). I explained that this was achieved by setting the terminal mode to 'raw' so that single characters could be read as they were typed - an eccentric thing for a program to do in 1976.

The system support person (I don't recall his name, but I have a vague recollection that he went to Bell Labs later. Bill Joy might be able to tell you his name) said something like: "That's very nice, but if we made it available to all of our users the overheads associated with running in raw mode (a process swap on each key depression) would swamp the cpu".

I was rather depressed by this reaction, thinking "I guess I have been unrealistic in developing an editor that is so expensive to run - it's ok in our small system, but it's no use in the big Unix environment at Berkeley".

Nevertheless, Bill and the system support people took a copy of my source to see if they would use it. I then went to the East Coast for a week or so. When I returned, I found that Bill had taken my code as a starting point and had got a long way towards what was to become 'ex' and subsequently 'vi', and that the editor was installed on the service machines - of course it still required 'raw' mode, but clearly, the benefits had outweighed the objection.

By the way, 'em' stands for 'editor for mortals' - I christened it that after Ken Thompson visited our lab at QMC while I was developing it and said something like: "yeah, I've seen editors like that, but I don't feel a need for them, I don't want to see the state of the file when I'm editing".

[The above is the bare-bones story of how 'em' led to 'vi'. There is more that I could write about how 'em' was developed and what stimulated me to do it, but I'm not sure whether you need that level of detail].

How did you get UNIX v4 in 73?

William Newman was a Visiting Research Fellow in our Lab for a little over a year from about October 1971 (he then moved to Xerox PARC, and is now at Rank Xerox EuroPARC in Cambridge). We had discovered the value of interactive minicomputer systems with his guidance. He and Mike Cole developed a single-user interactive operating system (called MIFS) at QMC. MIFS ran on an Interdata computer and was loosely modelled on TENEX. It was developed to support two research projects, one by William to investigate the design of a graphical programming language and one by a group of us to investigate the design of a new machine architecture, using microprogrammed emulation. Like Unix, MIFS included a wide range of components and tools - a filing system, a systems programming language, a compiler-compiler, a line editor (with single-character interaction), a debugger, etc. Nearly all of these were developed by William and Mike.

We hadn't heard of Unix while MIFS was under development, but while William was still with us he made a visit to Bell Labs. When he came back he said "they seem to have developed something like MIFS at Murray Hill, but it supports multiple users and runs on PDP11s". Mike Cole obtained some documentation, studied it, and concluded that it could indeed bring us great benefits - it offered most of the facilities that we had found so useful in MIFS and went well beyond it.

QMC was the first UK site to get UNIX. Heriot-Watt was the second. I see in the first UKUUG newsletter that your configuration was a PDP11/40 but no RK05s. Did Ken [Thompson] give you 9-track?

No. I don't think we had a 9-track drive, just Dectape and a System Industries 10 Meg exchangeable drive (does your UKUUG newsletter confirm that configuration?) The real problem was that Ken didn't have a driver for the SI controller (and nor did anyone else in the world). Obviously, we couldn't develop a new driver using a Unix system with Dectape as the only peripheral - the swaps would have rendered the process horrendously slow! Mike Cole was our system guru, and he solved the problem. He picked up the v4 release from Ken on Dectape in the Summer of '73, on his way to spend a couple of months visiting Xerox PARC (William Newman was there by that time, and Mike went there to work with him). While at PARC he went to Bezerkeley, wrote and compiled a simple driver for the SI controller and built a kernel that included it. But Bezerkeley didn't have any SI disks, so he couldn't test it there! When he got back to QMC the Dectape was duly mounted, and hey presto! - fortunately Mike was a very good programmer!

A few comments from Mike Cole....

George's account is largely correct but there are a few points that unfortunately diminish my apparently legendary programming skills! My memory is a little hazy in places but I think the following was the sequence of events in the summer of '73.

I didn't pick up the tape from Bell Labs on my way to the West Coast. Rather, while at PARC I spent a few afternoons in Mike Stonebraker's group at Berkeley and obtained a copy of Unix and the documentation from them (having obtained the requisite AT&T; dispensations) in the process. I then set about learning sufficient C to write the SI disk driver and build a system using their 11/45 with LA30 Decwriters (a painful experience). As I recall they were in the throes of developing Ingres at that time. Since it was so critical that the system worked first time when I got back to QMC I decided to stop over at Bell Labs on my way back to the UK in Oct. Ken Thompson checked over my code, found a bug or two (almost certainly to do with using pointers in C incorrectly) and dumped the entire Unix software onto 7 or 8 Dectapes. Unix then entered the UK for the first time in a PanAm bag! I'm really surprised to discover that Heriot Watt was the second UK Unix site. I was always under the impression that it was either Kent via Steve Binns or UCL via Steve Wilbur. Being the first site in the UK I remember being invited to both Edinburgh and Cambridge in '74 to present what we were doing with this odd-ball operating system called Unix. I was struck by the very negative response, particularly from Neil Wiseman's and Charles Lang's people at Cambridge who just wouldn't contemplate adopting a system for which there was no support from the supplier (as I recall they were using RSX-11 at the time). Such are the disappointments of the early evangelists! Presumably Peter Salus's research has already established that Jim Curry brought Unix into Europe for the first time, installing it at IIASA in Austria. As I recall, Jim left PARC shortly after William went there. Jim visited us at QMC in the winter of '72/'73 and helped to convince me that we weren't entirely crazy to base our new teaching system on Unix.

More about the 'em' editor

At 5:21 pm +0100 3/9/98, Eric Fischer wrote: * I just discovered your web page on the history of the "em" text editor. * There are several things I'm curious to know more about so I hope you * don't mind if I ask you a few questions: * * * You mention that em was an extension of the standard ed text * editor; did it entirely replace the ed line-oriented interface * the way vi does, or was the character-oriented interaction * invoked by a particular ed command? Em was just a compatible upgrade to Ed which allowed visual editing wihin a single line. I used this approach partly because it could be implemented on any vdu (by sending a RETURN character followed by a new version of the line after each alteration) and partly because I didn't really know how to do a full-screen editor! In fact it could even be used on a TTY, although the interaction was painfully slow and the each successive version of the line was printed on a new line. * * * In the version of your account published in A Quarter Century * of Unix, you indicate that em did not use the same keys for * editing commands as for typing text, yet it also ran on ADM-3 * terminals and Teletypes, which have few special keys. Does this * mean that control-key sequences were used for the editing functions, * as in emacs, or was there another mechanism? On ADM-3s and most other contemporary vdus it used control keys. At QMC we modified some VDUs. We had some ITT 3210 vdus that had a block of blue 'arrow keys' on the right of the keyboard. These were only functional when the terminal was in 'full screen mode', when they could be used to move the cursor to a new screen position and overtype the character at that position. This was all local interaction; in 'full screen mode' the contents of the screen were transmitted only when the Send key was pressed. We modified the these terminals to send control codes when the 'arrow keys' were pressed in normal character input mode. This enabled the software to intepret them as editing codes. This enabled me to implement Em in a more usable manner. It also led to the development of 'ded', a full screen editor that was modeless,by my colleague Richard Bornat. Subsequently, we obtained a larger number of Hazeltine 1510 terminals. These were microprocessor controlled and we re-programmed them to provide a larger set of dedicated cursor control and character editing keys (move forward a word, move backward a word, delete character backward, delete character forward, delete word backward, delete word forward, etc.) This provided another huge step forward in usability and allowed us to maintain our modeless approach to screen editing, which was, we feel, superior to the Vi approach. * * * Do you remember any of the commands that em used, or still have * copies of any of the documentation or source code?

After the above correspondence, the following files became available:

Source code for 'em' (including Ken Thompson's origianl code for 'ed') and accompanying documentation files.

Hardcopy of the "em" manual page.

Other topics that I hope to get around to writing about:

(Please contact me if you have any queries about them)

Working on the CPL programming language

ICL's Content Addressed File Store (CAFS)

Computer Science at Imperial College in the late 1960s

John Iliffe and the Basic Language Machine Project at ICL

The QMW Text Terminal

[Back to George's home page]