# Distributed memory

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/Distributed_memory
> Markdown URL: https://mediated.wiki/source/Distributed_memory.md
> Source: https://en.wikipedia.org/wiki/Distributed_memory
> Source revision: 1328312739
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

Multiprocessing memory architecture

This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed. Find sources: "Distributed memory" – news · newspapers · books · scholar · JSTOR (February 2024) (Learn how and when to remove this message)

An illustration of a distributed memory system of three computers.

In [computer science](/source/Computer_science), **distributed memory** refers to a [multiprocessor computer system](/source/Multiprocessing) in which each [processor](/source/Central_processing_unit) has its own private [memory](/source/Computer_memory).[1] Computational tasks can only operate on local data, and if remote data are required, the computational task must communicate with one or more remote processors. In contrast, a [shared memory](/source/Shared_memory_architecture) multiprocessor offers a single memory space used by all processors. Processors do not have to be aware where data resides, except that there may be performance penalties, and that race conditions are to be avoided.

In a distributed memory system there is typically a processor, a memory, and some form of interconnection that allows programs on each processor to interact with each other. The interconnect can be organised with [point to point links](/source/Network_topology#Point-to-point) or separate hardware can provide a switching network. The [network topology](/source/Network_topology) is a key factor in determining how the multiprocessor machine [scales](/source/Scalability). The links between nodes can be implemented using some standard network protocol (for example [Ethernet](/source/Ethernet)), using bespoke network links (used in for example the [transputer](/source/Transputer)), or using [dual-ported memories](/source/Dual-ported_RAM).

## Programming distributed memory machines

The key issue in programming distributed memory systems is how to distribute the data over the memories. Depending on the problem solved, the data can be distributed statically, or it can be moved through the nodes. Data can be moved on demand, or data can be pushed to the new nodes in advance.

As an example, if a problem can be described as a pipeline where data *x* is processed subsequently through functions *f*, *g*, *h*, etc. (the result is *h*(*g*(*f*(*x*)))), then this can be expressed as a distributed memory problem where the data is transmitted first to the node that performs *f* that passes the result onto the second node that computes *g*, and finally to the third node that computes *h*. This is also known as [systolic computation](/source/Systolic_array).

Data can be kept statically in nodes if most computations happen locally, and only changes on edges have to be reported to other nodes. An example of this is simulation where data is modeled using a grid, and each node simulates a small part of the larger grid. On every iteration, nodes inform all neighboring nodes of the new edge data.

## Distributed shared memory

Similarly, in [distributed shared memory](/source/Distributed_shared_memory) each node of a cluster has access to a large shared memory in addition to each node's limited non-shared private memory.

## Shared memory vs. distributed memory vs. distributed shared memory

- The advantage of (distributed) shared memory is that it offers a unified address space in which all data can be found.

- The advantage of distributed memory is that it excludes race conditions, and that it forces the programmer to think about data distribution.

- The advantage of distributed (shared) memory is that it is easier to design a machine that scales with the algorithm

Distributed shared memory hides the mechanism of communication, it does not hide the latency of communication.

## See also

- [Memory virtualization](/source/Memory_virtualization)

- [Distributed cache](/source/Distributed_cache)

## References

1. **[^](#cite_ref-pama21_1-0)** Pardo, David; Matuszyk, Paweł J.; Puzyrev, Vladimir; Torres-Verdín, Carlos; Nam, Myung Jin; Calo, Victor M. (2021). "Parallel implementation". *Modeling of Resistivity and Acoustic Borehole Logging Measurements Using Finite Element Methods*. Elsevier. [doi](/source/Doi_(identifier)):[10.1016/C2019-0-02722-7](https://doi.org/10.1016%2FC2019-0-02722-7). [ISBN](/source/ISBN_(identifier)) [978-0-12-821454-1](https://en.wikipedia.org/wiki/Special:BookSources/978-0-12-821454-1). Distributed memory refers to a computing system in which each processor has its memory. Computational tasks efficiently operate with local data, but when remote data is required, the task must communicate (using explicit messages) with remote processors to transfer data. This type of parallel computing is standard on supercomputers equipped with many thousands of computing nodes.

v t e Parallel computing General Distributed computing Parallel computing Parallel algorithm Massively parallel Cloud computing High-performance computing Multiprocessing Manycore processor GPGPU Computer network Systolic array Levels Bit Instruction Thread Task Data Memory Loop Pipeline Multithreading Temporal Simultaneous (SMT) Simultaneous and heterogenous Speculative (SpMT) Preemptive Cooperative Clustered multi-thread (CMT) Hardware scout Theory PRAM model PEM model Analysis of parallel algorithms Amdahl's law Gustafson's law Cost efficiency Karp–Flatt metric Slowdown Speedup Elements Process Thread Fiber Instruction window Array Coordination Multiprocessing Memory coherence Cache coherence Cache invalidation Barrier Synchronization Application checkpointing Programming Stream processing Dataflow programming Models Implicit parallelism Explicit parallelism Concurrency Non-blocking algorithm Hardware Flynn's taxonomy SISD SIMD Array processing (SIMT) Pipelined processing Associative processing MISD MIMD Dataflow architecture Pipelined processor Superscalar processor Vector processor Multiprocessor symmetric asymmetric Memory shared distributed distributed shared UMA NUMA COMA Massively parallel computer Computer cluster Beowulf cluster Grid computer Hardware acceleration APIs Ateji PX Boost Chapel HPX Charm++ Cilk Coarray Fortran CUDA Dryad C++ AMP Global Arrays GPUOpen MPI OpenMP OpenCL OpenHMPP OpenACC Parallel Extensions PVM pthreads RaftLib ROCm UPC TBB ZPL Problems Automatic parallelization Cache stampede Deadlock Deterministic algorithm Embarrassingly parallel Parallel slowdown Race condition Software lockout Scalability Starvation Category: Parallel computing

---
Adapted from the Wikipedia article [Distributed memory](https://en.wikipedia.org/wiki/Distributed_memory) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/Distributed_memory?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
