14 April 2010

Apollo 13 anniversary

This week marks the 40th anniversary of Apolo 13. This struck me as interesting for two reasons. One: When all the other kids wanted to be doctors, teachers, lawyers, and the like, I wanted to be an astronaut. And two: QNX Software Systems just celebrated its 30th anniversary.

While the first thought is pretty much moot since I probably won't make the leap from marketer to rocket scientist in my 40s, the latter lead me to wonder about what Apollo 13 had for computerized systems. I mean, if QNX - the first commercially available microkernel RTOS - came into existance some 10 years after Apollo 13 and one year before DOS, what could the space mission possibly have used?

I quickly learned some interesting facts about the Apollo guidance computer (AGC), the principle embedded system aboard the spacecraft:
  • The hardware weighed 29.5 kg
  • Memory cycle time was 11.7 microseconds with a single addition time of 23.4 microseconds
  • Fixed memory (ROM) had a capacity of 67.5K with an erasable memory (RAM) of 3.75K
  • Developing and verifying a software program required a full year
  • The operations plan document was close to 10-cm thick
Commands were entered numerically into the AGC calculator-like UI as two digit verb and noun.codes. A verb code described the type of action to be performed (primarily displaying and loading) and a noun code specified which data was affected.  For example: Verb, V16, Noun, N36, Enter = display current time.

The basic display and keyboard (DSKY) aboard Apollo 13 was the UI for 198 basic verb and noun codes, which were combined for typical "Verb, V1, V2, Noun, N1, N2, Enter" sequences.

Fixed memory was high density core rope; tiny nickel-iron cores woven together with thousands of copper wires. This required developers to create and verify their programs before the rope was woven because the program determined the weaving or wiring sequence. The erasable memory used iron cores as storage devices.

 The AGC used magnetic core rope memory to store its programs, what we now call ROM. It used magnetic core arrays to store its dynamic memory, or RAM. 

The introduction of the integrated circuit is what the Apollo guidance computer is best known for. The integrated circuit was a risky choice at the time as the technology was considered untested, but it was necessary for the computer's digital logic. The AGC used only one type of chip although it used 5,000 of them. Soon therafter, this chip went on to power calculators like the HP-35 by the millions, giving birth to the semi-conductor industry.

As for software, AGC software was written in assembly language. While it was based on a simple real-time executive and batch job-scheduling that could run only eight tasks at a time using cooperative multi-tasking, there was an interrupt-driven component that could schedule multiple timer-driven tasks.

It all sounds very simple, however, the AGC was anything but. I could write a book on it but it appears many others already have. The point is, NASA was on the leading edge of computer science 40 years ago ... as it is today. And today it uses systems based on QNX software. And, quite frankly, it's no wonder.

QNX Software Systems has repeatedly been on the leading edge of innovation throughout the past 30 years. Our industry firsts are too numerous to mention right here and now. The AGC interface alone makes me grateful that QNX introduced the world's first microkernel-based windowing system back in 1994. (Take a look at this video of the AGC interface and you'll be grateful too.) Today, the QNX Neutrino RTOS is the foundation upon which systems in the shuttle and the space station are based.

So while I never did become an astronaut, I can take solace in the fact that a little part of me did make it into space. Granted this is a stretch but I'm stickin' to it.