An asymmetric distributed shared memory model for heterogeneous parallel systems

Isaac Gelado, Javier Cabezas, Nacho Navarro, John E. Stone, Sanjay J. Patel, Wen-mei W. Hwu

Heterogeneous computing, particularly the use of GPUs as accelerators, has long been plagued by the complexity of manual memory management. This paper, originally presented at ASPLOS 2010, introduces Asymmetric Distributed Shared Memory (ADSM), a model designed to simplify programming without compromising performance by rethinking the traditional Distributed Shared Memory (DSM) architecture.

The Challenge of Explicit Memory Management

In traditional heterogeneous programming models like CUDA, developers must navigate two distinct memory spaces: the host (CPU) and the device (GPU). This requires explicit allocation on both sides and manual orchestration of data transfers using routines such as cudaMemcpy.

Figure 2: Traditional explicit memory management requires duplicated pointers and manual consistency checks.

As illustrated in Figure 2, this "explicit management" approach clutters code with infrastructure logic rather than core algorithms. It is error-prone, reduces portability, and often leads to performance pitfalls when programmers fail to optimize data transfers or overlap them with computation.

The ADSM Approach and GMAC

The authors propose ADSM to create a shared logical memory space. Unlike symmetric models that require complex, high-overhead coherence protocols on both the CPU and GPU, ADSM is asymmetric: the CPU acts as the master of coherence, while the accelerator remains simple and unaware of the CPU's memory.

Their implementation, GMAC (Global Memory for ACcelerators), leverages several key techniques:

  • Shared Address Space: Using virtual memory mapping (mmap), GMAC ensures data objects have identical virtual addresses on both the CPU and GPU, eliminating the need for duplicated pointers.
  • Lazy-update Protocol: Utilizing standard CPU hardware memory protection (mprotect), GMAC triggers page faults to fetch data only when needed, minimizing unnecessary transfers.
  • Rolling-update Protocol: A hybrid mechanism that prefetches data blocks in the background to overlap communication with computation.
Figure 4: The ADSM model simplifies code by using a single pointer and automated data object binding.

By adopting this model (Figure 4), developers can replace complex manual transfers with automated "Data Object Binding," significantly reducing code complexity and improving maintainability.

Performance and Impact

Evaluation using the Parboil benchmark suite demonstrated that GMAC achieves performance parity with hand-tuned CUDA code. In some cases, the automated protocols even outperformed manual management by more effectively overlapping data transfers. Porting existing applications to GMAC resulted in a net decrease in lines of code and required minimal developer effort (typically less than 8 hours per application).

While the 2010 implementation faced some software-level overheads due to driver limitations, the paper successfully argued that ADSM provides a scalable and programmable path forward for heterogeneous systems, moving the burden of memory management from the programmer to the system software.

Summary updated

BibTeX
@inproceedings{gelado2010asymmetric,
  author = {Isaac Gelado and Javier Cabezas and Nacho Navarro and John E. Stone and Sanjay J. Patel and Wen-mei W. Hwu},
  title = {{An asymmetric distributed shared memory model for heterogeneous parallel systems}},
  booktitle = {ASPLOS},
  year = {2010},
  doi = {10.1145/1736020.1736059},
}
Figure