Parallelism VS COncurrency
Concurrency IS NOT Parallelism
Concurrency is the ability to run in parallel
Parallelism is really in parallel execution
CONCURRENCY Problem
The main problem of concurrency model is
MUTABLE STATE
Lets to be more accurate. Problem is
MUTABLE SHARED STATE
And then add some LOCKING mechanism there.
What is a Value?
The VALUE is something that doesn't change
42, "Name", "07/22/2014", etc.
WHAT IS An Identity?
A stable logical entity
associated with a series of different
VALUES over time
What is a state?
Specific IDENTITY has a particular point in time with associated set of VALUES.
If IDENTITY has different VALUES in different timeframes then this IDENTITY has a STATE.
Any Problems?
IDENTITY & VALUE should be separate from each other in scope of state.
Known Solutions
So we need to new level of abstraction
- Shared State Concurrency (Common sync techniques)
-
Software Transactional Memory (Managed References)
-
Message-Passing Concurrency (Actors Model)
-
Dataflow Concurrency (Dataflow-based processes)