Message Passing Concurrency

Message passing concurrency is concurrency among two or more processes (here, a process is a flow of control; rather than a particular type of kernel object) where there is no shared region between the two processes. Instead they communicate by passing messages (not to be confused with Smalltalk-80 messages, which have little to do with concurrency, but see AlanKayOnMessaging). Note that there are several different types of message-passing semantics (reliable/unreliable; asynchronous/synchronous with rendezvous/RemoteProcedureCall). Contrast with SharedStateConcurrency.

ActorsModel is an example of a message passing concurrency model, with reliable messages and supporting both asynchronous and synchronous calls.

MessagePassingConcurrency has the following advantages:

... and disadvantages


The above "disadvantages" should be considered strongly disputed:


Hmm.. Global consensus is impossible whether communication is reliable or not. It depends on whether the upper bound on communication delays is considered known (synchronous) or unknown (asynchronous).

http://csdl2.computer.org/persagen/DLAbsToc.jsp?resourcePath=/dl/proceedings/&toc=comp/proceedings/icdcs/2005/2331/00/2331toc.xml&DOI=10.1109/ICDCS.2005.57 In the latter case, if processes can crash, global consensus is impossible (if termination guarantees must be deterministic).



Some languages allow only MessagePassingConcurrency. ErlangLanguage is based on a model similar to ActorsModel; OccamLanguage is based on CommunicatingSequentialProcesses. These don't allow shared state as such, but both allow ports (actor names, references) to be passed in messages, which means that two different actors (processes, objects) can share a port to the same third actor.


See also ConceptsTechniquesAndModelsOfComputerProgramming.


CategoryConcurrency


EditText of this page (last edited January 28, 2010) or FindPage with title or text search