About

Shared state between processes

Operations upon shared states are critical sections that must be mutually exclusive. Failure to obey this rule opens up the possibility of corrupting the shared state.

Method

Shared (Virtual) Memory (SHM) is shared data between process (not threads because threads are already sharing the same address space. For thread, we are talking of Shared Variable (data shared between threads).

Therefore:

  • Shared memory is a OS system implementation whereas
  • Shared variable management (ie concurrency management) is inside the language (synchronization, etc …)