aspose file tools*
The moose likes Threads and Synchronization and the fly likes Algorithms Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "Algorithms" Watch "Algorithms" New topic
Author

Algorithms

Brian Lester
Greenhorn

Joined: Feb 18, 2006
Posts: 5

Mr. Babkin,

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?

Thank you,

Brian
Mike Peters
Ranch Hand

Joined: Oct 10, 2009
Posts: 67

- 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.


Mike Peters
Sergey Babkin
author
Ranch Hand

Joined: Apr 05, 2010
Posts: 50
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.
Mike Peters
Ranch Hand

Joined: Oct 10, 2009
Posts: 67

Dear Sergey,

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.

Sincerely,
Mike Peters
Devaka Cooray
ExamLab Creator
Saloon Keeper

Joined: Jul 29, 2008
Posts: 3090
    
  40

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.


Author of ExamLab ExamLab - a free SCJP / OCPJP exam simulator
What would SCJP exam questions look like? -- Home -- Twitter -- How to Ask a Question
Sergey Babkin
author
Ranch Hand

Joined: Apr 05, 2010
Posts: 50
Devaka Cooray wrote:No need to say sorry.
You are welcome to answer any of the questions here.


I could not say it any better :-)
Brian Lester
Greenhorn

Joined: Feb 18, 2006
Posts: 5
Gentlemen,

thank you both.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Algorithms