Friday, December 24, 2004

The Concurrency Revolution

Herb Sutter, a C++ heavyweight, writes about the next evolution in programming in The Free Lunch is over: A fundamental turn toward concurrency in software. He acknowledges that Moore's law is going to (has already?) hit limitations and that old single threaded applications won't just magically gain performance as processor speeds increase. As a way to counter the limitations, processors will increasing turn to "parallelism", but apps will need to be tuned to enjoy the benefits.

One thing he mentions in the article is that it will be similar to the OOP shift during the 90s with a similar learning curve. I think that the learning curve is going to be much higher. I haven't really done multithreading programming, but I have read about multithreading in Java and .NET and was briefly introduced to it in one of my classes (I suppose OS will have a much more comprehensive coverage of it). Multi-threading is inherently extremely hard to get right. Our brains are designed to think sequentially. Programming for parallelism is really hard. Even with simple multithreaded programs there are SO many ways to mess up. And because there isn't a straight line to follow, debugging is anothing nightmare.

I think to become as wide spread as OOP, where everyone can easily adapt to the paradigm, it needs to be simplified. Java and .NET have threading built into the platform, which is a start. They have made it easier, but it's still a huge learning curve. Just like we have "Hello World" intro programs, we'll need to start having "Hello Parallel Worlds".

No comments: