Saturday, June 30, 2007

Supercomputing Course: Introduction to Unix, Part I

Back in the dinosaur era of computer science (I can say that since it's before even I was born!), computers were little more than gigantic calculators. They were gigantic because they used vacuum tubes (the transistor had not yet been invented). A computer would be the size of a medium-sized house, yet could perform fewer operations than the calculator on your cheapo digital watch. (Okay, maybe you don't have a watch like that, but I'm sure that somebody reading here does. If I wore a watch, I would totally have one with a calculator. [Yes, I am that nerd-tastic, and proud of it!] But I don't wear a watch.)

Anyhow, the point is, computers in the 1940's and early 1950's were simply gigantic calculators. They had no means of being programmed, except to physically rewire the machine. Eventually punch cards were introduced and that was when you could actually begin to program. The problem was that each computer, even computers built by the same vendor, was different, so if you wrote a program for one computer, you'd have to completely start over for the next computer.

Another problem was the fact that these gigantic calculators cost millions of dollars (for example, the Iliac IV, built by Burroughs and the University of Illinois in 1965, cost $31 million, a princely sum even today), so companies and universities would want to get their money's worth by keeping the computer busy at all times. There were no operating systems to manage users, so what would happen was usually one of two things: 1, You would be assigned a time, let's say 2-4 a.m. on Saturday morning (a particularly inconvenient time that would probably be given to a grad student), during which the computer was all yours; or 2, You would submit your stack of cards, and whenever the operator got around to it, he or she would run your program and you'd get your output several days later.

Well, the thing is that if the computer could automate resource sharing, nobody would have to be hanging around running it at odd hours of the night, or even hanging around the machine much at all. Ken Thompson and Dennis Richie at Bell Labs were kind of annoyed about this inefficient method of resource sharing, so they decided to create an operating system that could handle multiple users on one computer. After a few failures, they developed the UNIX operating system. They freely gave away their code and UNIX became the industry standard operating system on mainframe computers.

In 1991, a Finnish college student by the name of Linus Torvalds decided to create a UNIX-like operating system for personal computers, just for fun. Linux, which started out as simply a hobby, has become a very important operating system in the computing industry. It is used on many servers, clusters, office computers, and even home PCs. Even Microsoft uses Linux for its servers from which you download Windows patches and the like. I have Linux on my desktop machine at work, and my laptop is a Mac running OSX, which is built on top of UNIX.

The vast majority of supercomputers run some flavor of *nix1; at SC04 (the supercomputing industry conference), we saw that Microsoft was trying to get into the HPC world, but I haven't seen or heard anything about a Windows-based supercomputer. My then-officemate quipped that Microsoft was probably partnering with IBM to make a new supercomputer called "BlueScreen." (This was particularly hilarious because IBM's flagship machine, BlueGene, had just been introduced.)

Anyhow, the point of this whole discussion is that learning *nix commands is necessary before you can use a supercomputer. You don't have to be a *nix whiz kid or anything, but you have to be comfortable getting around and doing what needs to be done. In the next part, I will talk about some important commands in *nix.


1 The * character is a wildcard character in computer science, so when I say *nix, what I really mean is any word that ends in "nix"; in this case, Linux or Unix. (Yes, I realize that the last vowel in Linux is a u rather than an i, but a lot of people pronounce Linux and Unix as if they rhyme. I am not the originator of this convention so don't blame me!)

Resources:
I got the pictures of Grace Hopper and the punch cards from Lexicon's History of Computing, and the picture of Dennis Ritchie and Ken Thompson from the UNIX/Linux picture gallery.

3 comments:

Mr. Lucchese said...

A nice beginning to this series, Rebecca. Thank you

Doctor Pion said...

That picture of Ritchie and Thompson sure takes me back. I actually used that computer, or one very much like it. I'll say more down below.

Very nice article. One gap in your story is that you failed to mention the important role of CS departments and, in particular, Berkeley, in popularizing Unix(TM) and C. They (really AT+T) gave it away and Berkeley really developed it by using it in their CS program. As a result, their students, and lots of others, learned C and Unix (because Unix was written in C, a language evolved from AT+T's B specifically to write Unix). Those students carried it into the micro world, thence into supercomputers.

The "a machine" in that 3rd photo is a Digital Equipment Corporation (DEC) PDP computer. It looks like the PDP-9 I once used (my 4th computer and possibly the first I ever booted up from a cold start).

The front panel (partly obscured by the table) had switches that told the hardware boot a few details. We booted off of paper tape (the reader is directly above the unused TTY). That program then read the operating system or data acquisition system off of a DEC tape (the small round tapes at top center), and away you went. The big tapes on top were probably 9-track that is behind the guy on the left. That is where the data was stored. There was no disk drive, just the 9-track and DEC Tapes.

By the way, I wonder if I have hearing loss from those noisy teletypes. Before video displays, that was state of the art for interactive terminals.

Rebecca said...

Doctor Pion, thank you for bringing up the university connection. You are correct that there was a lot of work on Unix going on at Berkeley. That's where vi was developed, for one, and also where a lot of the security features of Unix were developed, if I remember correctly.

And I'm glad you could tell us about the machine in the third photo. I love old machines but I can't identify them very well.