Thursday, February 21, 2008

Multithread: the new era


Multi-threading is not new. This is, for instance, natively supported in Java since the beginning in 1996.

What is new started with this very popular article that appeared in Dr. Dobb's Journal, 30(3), March 2005. Basically the heat produced by the CPU doubles when the clock is 20% faster. Usual fans and radiators are saturated with CPU around 4GHz. It means the clock race is over. But processor manufacturers are smart. If they slow down the CPU by 20%, it produces half the heat, so let's put two of them in the same chip! The dual core is born. Same thermal envelope, 2 cores, 20% slower than mono core version. Moore's law still hold if we consider each core as a contributor of the total machine speed.

By the end of 2007, almost all new machines are equipped with multi-core processors.

From the software point of view, it has 2 major impacts:
  • Customers are now running your applications in true multi-threaded environment.
  • The multi-core hardware speeds up performance only if the application is multi-threaded.
We are still correcting bugs coming from first point. Even Java made mistakes, for example the famous single thread rule of Swing happens to fail on multi-core machines.

We are only starting to tackle the second point. And we have very few tools and theory background to help us so far.

After the Recursivity and the Object Oriented Languages, now comes the Multi-Threading.

No comments: