Shared Memory

A shared memory is memory that multiple Processes can access. It’s as simple as that.

This is an important system in Distributed Systems.

How do we actually implemented shared memory?

  • You can do this with Boost

The problem with Shared Memory

Shared memory doesn’t scale well as the number of processes that access it increases.

  • This is due to access time degradation: when several processors try to access the same memory location it causes contention. Trying to access nearby memory locations may cause false sharing. Source: Wikipedia

Resources

CUDA

See CUDA Shared Memory.

https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#shared-memory