3

I know a little about how to use message passing and shared memory, but I still don't know when to choose one or another.

Can you tell me about their traits (not the implementation)?

asked Oct 29, 2011 at 17:09
1
  • 4
    Anything specific? This is not a small subject. Commented Oct 29, 2011 at 17:11

2 Answers 2

5

The quick summary:

Shared memory parallelism (e.g., OpenMP) is strictly more powerful than message passing (e.g., MPI) as you can simulate message passing with a shared memory system but not vice versa. However, it's also much more difficult to scale up the shared memory model (it needs very elaborate and expensive hardware once you go to more than one system board) and it is also much more difficult to analyze due to the number of possible interactions. The message passing model is considerably simpler to understand — you just have a stream of messages coming in that you want to process — and it maps much more nicely to what is actually possible with networks so it obviously can scale up massively.

answered Oct 29, 2011 at 17:22
5

From the point of view of how you actually design systems with them, they are in some sense mathematical duals, as this adage by Joe Armstrong, one of the original designers of Erlang, nicely demonstrates:

With shared memory, you communicate by sharing data, with messaging, you share data by communicating.

answered Oct 29, 2011 at 17:38

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.