Thursday, September 16, 2010

Shared-state versus message-passing

One of the most basic distinctions made in concurrency theory is between shared-state concurrency and message-passing concurrency. I'm finally getting around to reading John Reppy's book on Concurrent ML, and he has a succinct characterization of the two:
Shared-memory languages rely on imperative features ... for interprocess communication, and provide separate synchronization primitives. Message-passing languages provide a single unified mechanism for both synchronization and communication.

2 comments:

  1. Does this put STM into the message-passing bucket?

    ReplyDelete
  2. I suppose it does (and see this paper for further thoughts in that direction).

    You could say something similar about my hobby-horse, CAS: by this definition, it's a message passing primitive.

    One thing I'm not sure about is what Reppy counts as communication (e.g., synchronization is already a form of communication).

    ReplyDelete