A fine-grained data model organizes mutable state into independently updateable units. In a concurrent simulation, changing one value does not require replacing the surrounding structure, allowing control to be distributed across threads. section 8.2.2
Contrast the two update strategies:
- A coarse-grained map stores the whole map in one MVar; changing a value requires constructing and storing a new map. section 8.2.2
- A fine-grained structure stores a map of keys to individual MVars, so an update can alter the inner value without changing the outer map. section 8.2.2
- The distinction matters especially for STM-based concurrent models, where repeated updates to the same key can otherwise cause repeated outer-state updates. section 8.2.2
Figure 8.8 Data structure with two layers of concurrent mutability
Use the diagram to inspect the two layers of concurrent mutability represented by the outer map and inner values. section 8.2.2
