This articleneeds additional citations forverification. Please helpimprove this article byadding 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) |

Incomputer science,distributed memory refers to amultiprocessor computer system in which eachprocessor has its own privatememory.[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, ashared memory 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 withpoint to point links or separate hardware can provide a switching network. Thenetwork topology is a key factor in determining how the multiprocessor machinescales. The links between nodes can be implemented using some standard network protocol (for exampleEthernet), using bespoke network links (used in for example thetransputer), or usingdual-ported memories.
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 datax is processed subsequently through functionsf,g,h, etc. (the result ish(g(f(x)))), then this can be expressed as a distributed memory problem where the data is transmitted first to the node that performsf that passes the result onto the second node that computesg, and finally to the third node that computesh. This is also known assystolic computation.
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.
Similarly, indistributed 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.
Distributed shared memory hides the mechanism of communication, it does not hide the latency of communication.
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.