What is the difference between "network RAM" and "distributed shared memory" (DSM)? Basically, I know that both of them provide a shared storage on RAM among all the systems in a cluster. So, what is the difference?
Network RAM is effectively a remote RAM disk for swapping out pages. As such, the home node for the address of the page of memory is different from the node providing the RAM storage (when the page has been swapped out). The primarily intent of network RAM is to balance utilization of memory capacity, especially when some nodes are idle. The node providing the RAM would not be able to address that memory at the application level (at least not as memory associated with that storage-providing node).
By using the swap interface, implementing Network RAM would be substantially simpler than implementing a more general migration mechanism. Network RAM also uses a single moderate message size, so transfers would be more friendly to non-RDMA-capable networks than, e.g., cache line sized transfers.
In distributed shared memory, the memory for the address space associated with a node is entirely contained at that node, but any node that is part of the same partitioned global address space can address that memory. Distributed shared memory provides a basis for distributed computation by allowing other nodes to address remote memory.
To confuse matters, a DSM system can perform optimizations to reduce network traffic and latency such as replication and migration of memory.
Network RAM is effectively migration of memory based on low temporal locality to a node with excess capacity and can be implemented for a DSM system, a message-passing system, or even a cluster of nodes running fully independent workloads. Network RAM by itself does not provide any means for other nodes to address remote active memory, so it cannot be used as a basis for distributing computation.