I don't know how many of you have lived a real revolution. I did. 1989 I was in Romania when the revolution had started. And I still remember the feelings I had back then, even though I wasn't old enough to realize what was happening. Why am I telling you that? Because I do have the same felling now, like I had 20 years ago, meaning that a new revolution is coming. Only, this time people will not die, but some code(rs) might get "hurt" in the process of making this happen. If you haven't realize yet which revolution am I talking about, is the Multi-core revolution.
Why do I call it a revolution? As long as we had only one hardware thread, the life was very easy. But with the introduction of hyper-threading, and later on multi-core processors, the challenges we are facing as programmers are multiple. We are not guaranteed anymore the order of running our code, cached data might not be in cache anymore, as we are on another processor by the next time-slice, and so on. The challenges are multiple and different from what we are used to. So if this is not a revolution, I don’t know how to call it, then.
We are facing challenges in all the cycles of an application life. From conception to test of applications. Is not only the programmer facing this revolution, but the architect, the system designer, the tester, and even the IT manager. We all need to realize that the future is here, and we need to do something. And the big question is not anymore IF, but rather WHEN do we make the switch.
Just when we got used to think in objects, we have to readapt, again. We have now to start thinking in tasks. According to one of the definitions I found in dictionary, a task is "a piece of work that somebody is given to do, usually short in duration or with a deadline". Task oriented programming is the new black in the world of Software engineering, and as always the first ones will be the ones that have the biggest chance to get famous.
I will start this week a series of posts about different patterns for multi-core programming inspired from the following book: Patterns for Parallel Programming. So stay tuned.