This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
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.