Multi-Threading: The Nitrogen Narcosis of Programming

This post was originally published on blogs.rapidmind.com. RapidMind was acquired by Intel Corporation in August of 2009, and the RapidMind Multi-core Platform will merge with Intel Ct technology. Before joining Intel as part of the acquisition, Michael was a co-founder of RapidMind.

Explicit multi-threading is like the delusional thinking one has diving at a depth of 100 feet with too much nitrogen in the blood stream. You stumble, you misread your gages, everything takes longer to do. It can happen even to experienced divers.

The remedy is to ascend and the delusional thinking goes away immediately.



It’s not the bends, but nitrogen narcosis is dangerous and completely avoidable. And so is multi-threading.

You can manually multi-thread an application to take advantage of multiple cores, but these projects are time consuming and error prone. Multi-threaded applications are more difficult to develop and test than single-threaded applications. Even experienced software developers find multi-threading challenging and multi-threaded applications hard to debug. Did you misread your gage again? Are you really sure you have air left in your tank?
Like a nitrogen-inebriated diver, you need help to ascend. Otherwise you’ll be stuck at the bottom thinking everything is just fine. Meanwhile, the truth is that multi-threading doesn’t scale well as the number of cores increases. And it can’t leverage the use of accelerators. More importantly, it doesn’t address the issue of memory management (a crucial factor in performance).

RapidMind helps you ascend. The RapidMind platform manages memory, does per-core parallelization as well as multi-core parallelization, transparently enables the use of accelerators (if present), and avoids the debugging challenges of multi-threading.

As a developer you work with a single thread of execution. You write code in standard C++ and use your existing skills, tools and processes. The RapidMind platform then parallelizes the application across multiple cores and manages its execution.
When you ascend, suddenly everything is manageable again.


In the next posts, I’ll discuss some of the specific problems with multi-threading and the advantages of using the RapidMind platform.
Теги:
Пожалуйста, обратитесь к странице Уведомление об оптимизации для более подробной информации относительно производительности и оптимизации в программных продуктах компании Intel.