Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Algorithms

 
Brian Lester
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Posts: 67
Debian Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
- 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.
 
Sergey Babkin
author
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 67
Debian Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Marshal
Pie
Posts: 4260
227
Chrome Eclipse IDE Google App Engine IntelliJ IDE jQuery Postgres Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Sergey Babkin
author
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Gentlemen,

thank you both.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic