A shared resource is data or another resource that multiple threads or concurrent tasks can access. Threads in one process use the same address space, so one thread’s changes are available to the others. But concurrent access can produce inconsistent updates or deadlocks, and the order of access is not fully controlled by the developer. section 4.7 section 13.1
When tasks need shared data:
- Minimize shared resources and communication where practical; use synchronization when sharing cannot be avoided. section 9.10
- Account for synchronization costs: locks can delay access, add overhead, and hinder scalability. section 9.10
- Consider message-passing IPC instead of shared memory so tasks can work with their own data copies. section 9.10
MapReduce intermediate data
Map tasks can store intermediate data on a shared NAS volume for reduce tasks to access, even when tasks run on different machines. section 13.11


