Shared State Concurrency
is concurrency among two or more processes (here, a
is a flow of control; rather than a particular type of kernel object) which have some shared state between them; which both processes can read to and write from. See also
has the following advantages...
Much more difficult to model and prove a system correct.
Requires lots of synchronization primitives ( SynchronizationStrategies) to prevent race-conditions
Does not scale well to distributed systems, especially in the presence of unreliable connections between processes (i.e. over a network).
Criticisms of the "advantages" above:
It's not particularly useful for a system to be fast but incorrect, and in any case the speed advantage relative to message passing is small.
The point about GlobalConsensus is refuted at MessagePassingConcurrency. In a nutshell, this depends on the actual reliability of communications, not the concurrency model.
Passing ReferenceObject s is also easy in most message-passing models.
If you use MessagePassingConcurrency implemented in terms of shared state, then depending on how well the shared state is hidden:
its disadvantages leak into the message passing layer, or
its disadvantages don't leak, in which case it is an ImplementationDetail ? and you should describe the system as using message passing.
View edit of March 15, 2005
or FindPage with title or text search