Predicatable/Deterministic Parallel Programs: Step One
Keeping your application predicatable and deterministic is the hardest part of writing a parallel program.
Step One, don't use raw threading packages.
Much of the blame has to be placed on the models we use to program, especially threading. The problems are so bad, that we need to use some form of abstraction higher than "raw native threads" (pthreads, Windows threads, boost threads, Java threads).
In a paper, "The Problem with Threads," Edward A. Lee at the University of California, Berkeley, makes a "Sky is Falling" argument for the end of the world because of threading. Perhaps I exaggerate a bit, but Ed exaggerates a bit too much in predicting the near destruction of life as we know it because of threading.
Ed says " [If] the next generation of programmers makes more intensive use of multithreading, then the next generation of computers will become nearly unusable."
I agree with Ed's central point: we need to stress understandability, predictability, and determinism in programming.
Are we in danger of losing our way?
Ed makes a case that the world is going to use multithreading so much that computers are useless.
But there are solutions, and they are getting adopted. Some try to be complete (functional languages), and others try to contain the problem (evolutionary approaches).
Either way, we need help.
The first step, use something other than raw threading packages.
My favorites so far: OpenMP, Threading Building Blocks and threaded libraries (many to choose from).
There is a lot more we can do - more on that later.

