When I was in my third year at the University of Waterloo, I took a course on concurrency. It started off a little slow, but by the end we were architecting some pretty large systems composed of chunks that communicated asynchronously with each other.
And I was hooked. This was damned cool stuff.
Ever since then, I’ve been fascinated by parallel programming. I started to get really stoked when I saw how much press parallel computing was getting, as a result of the power wall that processor designers started to run into some years ago now. A computer architecture course that I took at the University of British Columbia focused on this problem, and throughout the term I devoured all of the literature that I could find on engineering software systems for parallel architectures. The whole class was forced to read the 2006 Berkeley landscape paper, but I careened off into all sorts of other things from there, such as skeleton languages (ocamlp3l ftw), elite hacks like RapidMind, and even some really old lisp machines with arrays of 1-bit processors. My final project involved writing some middleware in Java for transparently parallelizing some patterns of parallel computation (or ‘dwarves’) described in the aforementioned Berkeley paper. I started by trying to use aspect-oriented programming to tease out these patterns, but decided that this would only work if I could declare join-points at the granularity of program statements (like you could in the original lisp conception of AOP, described in the original paper — except that lisp has expressions, not statements, but close enough). It took some hacking, but I was pretty happy with how it turned out, and I was excited to be working in an area that was really starting to heat up.
The parallel computing scene is getting even noisier now that serious money is being poured into it. Berkeley and the University of Illinois both received hefty grants this week, with the aim of “reinventing modern computing” to cope with these parallel architectures.
But you know, the more that I think about this ‘crisis’, the more I start to wonder if it is really a problem at all.
Here’s an experiment to try. Go find a computer running Windows 3.1. Play around with it for a while. Now, compare what you’re seeing to, say, a modern Mac running OS/X. I don’t know about you, but I feel like the software on my MacBook is a fair sight better than what was available on Windows 3.1. You can get the same experience by using one of the desktop packages for linux (like KDE) from circa 2000, and comparing it to what those puppies can do now. It’s pretty wild to see how far they’ve come.
So, let’s assume for the moment that the software that I’m using now is quite a lot better than the software I was using then.
How much of that quality increase can actually be attributed to Moore’s law?
This isn’t me trying to goad you, honest. I really can’t answer this question. The common wisdom is that software shops used to be able to add more features and more complexity to their products, comfortable in the knowledge that hardware improvements would supply performance increases without having to worry too much about software optimizations. The thing is, though, that for most user applications that I can think of, the real limiting factor in the production of this software must certainly be the engineering and design process that is required to produce it, not the hardware it is running on. OS/X is a fantastic piece of software, and it’s much better today than it was when it was first released. However, the hardware it’s running on today isn’t really a heck of a lot better than when it launched.
Also, when I look at the software I use in my daily life now, the trend seems to be moving towards using a ton of small, lean, simple applications that are targeted at specific tasks, instead of trying to find one product with a million features that can do everything. I hinted at this in my recent post about WriteBoard (which I’m using to write this post right now). Witness: I now edit documents in more editors than I can count on one hand. I use vim for writing programs in languages that don’t have good IDEs. I use eclipse for writing Java. Emacs is for lisp. WriteBoard has suddenly become my blogging tool of choice. Pages is for when I need to write something that I’m going to be printing. OmniOutliner is for maintaining my gtd documents. And so on.
This trend is getting even bigger on the web. The profusion of solid web frameworks is encouraging developers and designers to cut wildly at the long tail of niche services that have long been considered unprofitable to pursue. With something like Django, all of a sudden it takes me a day to write a web application that used to take weeks, and it’s more robust to boot. So now you’re seeing web applications for summertime Hindu wedding registries on odd-numbered years, and other things of this ilk, because it costs almost nothing in terms of equipment and time to build such an application.
Do these sorts of programs really need fine-grained parallelism?
Of course, one could argue that I’ve got my causation all messed up, and that the reason we’re seeing a shift towards simplicity is because we’ve hit this computing wall and simple is all we can do. But I don’t think so. I think we’re moving towards simplicity because simple apps are fun and satisfying to use.
There’s a third reason why I think all of this might be an academic point. A little while ago, one of my teammates brought an Asus eePC to one of our meetings and let me play with it. I was really stoked about this, first because I love the idea of hacking some ocaml on a wee deck with only 12 rows and 50 columns on the display, and second because I was researching this sort of thing in an operating systems course project when I was in grad school (which resulted in the stuff I posted here). While I was tinkering with it, I was astonished at how snappy the response times were. I was trying to open a terminal and not succeeding, so finally I hit the key sequence that lets you escape to the console in KDE, and I borked the machine. So, I powered the little guy off, and switched him back on.
The machine booted in less than 5 seconds.
The reason for this was immediately obvious — the eePCs use flash memory as permanent storage. Flash drives are a heck of a lot faster than hard drives.
Now, think about how much time you spend on a Windows machine listening to it thrash the swap. Imagine if that process was orders of magnitude faster. Would you perceive this as a monumental performance increase? I think so.
So maybe peripheral technology advances are actually going to be more important than core processor technology advances from hereon in. I think I’m cool with that, mostly because I’m not much interested in fields where writing cpu-bound programs is the norm. And you know what — maybe most of us aren’t.
Of course, this bodes poorly for chipmakers. Since the dawn of the computing age, their formula for making money was pretty static: Double the numbers every 18 months, and then have the marketers convince everyone that they need all this extra processing power to keep up with software advances. Now, young avid gamers in the 90s who were strapped for cash quickly figured out that this was untrue, because you could get away for an astonishingly long time without upgrading your processor as long as you maxed out on RAM and had a decent video card. While it was true that it usually didn’t cost that much to buy a new processor, usually if you wanted a decent boost in clock rate you’d need to buy another motherboard as well, since your current board would not likely support the new round of processors. So you found ways around it.
So maybe this “emergency” isn’t really such a big threat to the future of computing at large, but is rather an immediate and very dangerous threat to a handful of very big companies — which would explain all of the racket being made. Of course, if Intel and AMD were suddenly to become catastrophically devalued because no one had a reason to buy new processors anymore, we’d all be profoundly affected in one way or another. At least for a little while.
So yeah, I think parallel computing is cool. And I think it’s probably kinda important too. But will the discipline of computing implode if we can’t find a good way to write parallel programs? Will the programs we use now stagnate and cease to evolve into more elegant and more useful tools?
My suspicion is no.
But what do I know, really.