I'm new to parallel programming. Should I look for and use (exclusively) algorithms that are developed for parallel? Also, I've used mostly C and most of what I've tried is embarrassingly parallel and serial in nature. Do you recommend a specific language?
- Read "introduction to parallel computing" (isbn 0201648652). It's not an easy read, but it covers most of the basic stuff.
- Experiment (with Java ), e.g. make a concurrent sorting algorithm, compute the mandelbrot fractal in parallel, study the dining philosophers problem.
I concur. Any language is good. The languages with classes can make the programs shorter by allowing more wrapping in the libraries, but the downside is the extra isolation, and having to look inside the libraries when things go wrong. The manual memory management requires some extra care with threads, but the modern tools lkie valgrind make this kind of errors easier to catch.
BTW, in the real programs we usually try to avoid the dining philosophers problem :-) This problem is really a study of deadlocks and their detection and resolution. If the deadlocks can be avoided in the first place, even better.
I just noticed that the original question was actually addressed to you personally. I replied to the question because I didn't notice that the first time. Sorry for intervening.
Mike Peters wrote:I just noticed that the original question was actually addressed to you personally. I replied to the question because I didn't notice that the first time. Sorry for intervening.
No need to say sorry.
You are welcome to answer any of the questions here.