SeriesOperating Systems15 / 16

Distributed Shared Memory

Module 15 of CS 6200 - Graduate Introduction to Operating Systems @ Georgia Tech.

What is Distributed Shared Memory?#

Overview#

Distributed Shared Memory (DSM) refers to a combined memory system in which components of memory are stored on separate machines. Since any distributed service involves similar concepts, much of the previous discussion on distributed file systems (DFS) is relevant here.

DSM is particularly useful in the context of scaling. Instead of scaling up a single machine to improve memory capacity, DSM systems rely on horizontal scaling to increase memory. This allows us to bypass the memory limitations of a single machine, often in a more cost-effective manner!

Peer DSM Systems#

In this lesson, we will focus on the case of peer distribution - recall this implies each machine in the system both hosts and accesses at least a portion of the distributed service.

As part of peer DSM, each machine in the system owns some portion of memory and provides services (read / write) to access memory from anywhere in the system.

Implementation#

DSM can be implemented at the hardware or software level:

DSM design strategies must account for sharing granularity, which refers to the level of shared memory refresh across the entire system. Lower-level granularity (ex: cache line, variable) tends to require too much overhead; instead, higher-level granularity (ex: page, object) better suits DSM systems.

DSM Access and Consistency#

Access by Application Type#

DSM implementations should consider the typical expected use case to maximize performance. Use cases are grouped into three major application types:

Performance Considerations#

The primary performance metric used to evaluate DSM systems is Access Latency. Since accessing local memory is much faster than accessing remote memory, it would be ideal to maximize local memory over remote memory accesses.

There are a few strategies used to maximize local accesses in distributed memory systems:

Consistency Management#

Recall that shared memory microprocessors (SMPs) maintain Cache Coherence to ensure each local cache in the system has proper and consistent state (relative to state across the entire system). SMPs use write-invalidate or write-update mechanisms, which are triggered by write operations.

Coherence operations triggered on each write would require too much overhead in the case of distributed memory. Instead, DSM may utilize…

The exact mechanism(s) which occur on a trigger operation depend on the Consistency Model, which guarantees memory (state) changes will happen in an expected manner so long as the accessing applications follow a predefined set of rules.

DSM Architecture#

Given our discussion of implementation considerations, how is DSM typically organized? A page-based distributed memory system has multiple independent nodes (machines) which contribute a portion of main memory pages to DSM. This system requires local caches for performance (latency), and a designated home node per page to drive coherence operations. Replication strategies may be used on-demand for load balancing, performance, and reliability.

dsm-architecture

DSM must maintain metadata to index + locate pages. Each page object has an address (node ID + page frame number). A global map maps each page to its home node, and is replicated across all nodes in the system.


(all images obtained from Georgia Tech GIOS course materials)

License

CC BY-NC-SA 4.0 This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Related Posts