Table of Contents
Fetching ...

DRust: Language-Guided Distributed Shared Memory with Fine Granularity, Full Transparency, and Ultra Efficiency

Haoran Ma, Yifan Qiao, Shi Liu, Shan Yu, Yuanjiang Ni, Qingda Lu, Jiesheng Wu, Yiying Zhang, Miryung Kim, Harry Xu

TL;DR

This work introduces DRust, a practical DSM system that leverages Rust's ownership model to expose single-writer/multiple-reader semantics to the runtime, enabling object-level concurrent access with minimal synchronization. By implementing a global, partitioned heap and extending pointers with ownership- and color-tracking fields, DRust achieves low-overhead coherence where writes move objects to the writer and reads fetch copies, all while maintaining sequential consistency for safe Rust code. The system adapts Rust standard libraries for distributed operation, adds affinity mechanisms (TBox, spawn_to), and provides per-node runtimes plus a global controller for load balancing and fault tolerance via heap replication. Empirically, DRust outperforms GAM and Grappa by up to $2.64\times$ and $29.16\times$ respectively (average improvements around $2.02\times$ and $9.48\times$), with modest single-node overhead and strong scalability across multiple applications and workloads, underscoring the practical viability of language-guided DSM.

Abstract

Despite being a powerful concept, distributed shared memory (DSM) has not been made practical due to the extensive synchronization needed between servers to implement memory coherence. This paper shows a practical DSM implementation based on the insight that the ownership model embedded in programming languages such as Rust automatically constrains the order of read and write, providing opportunities for significantly simplifying the coherence implementation if the ownership semantics can be exposed to and leveraged by the runtime. This paper discusses the design and implementation of DistR, a Rust-based DSM system that outperforms the two state-of-the-art DSM systems GAM and Grappa by up to 2.64x and 29.16x in throughput, and scales much better with the number of servers.

DRust: Language-Guided Distributed Shared Memory with Fine Granularity, Full Transparency, and Ultra Efficiency

TL;DR

This work introduces DRust, a practical DSM system that leverages Rust's ownership model to expose single-writer/multiple-reader semantics to the runtime, enabling object-level concurrent access with minimal synchronization. By implementing a global, partitioned heap and extending pointers with ownership- and color-tracking fields, DRust achieves low-overhead coherence where writes move objects to the writer and reads fetch copies, all while maintaining sequential consistency for safe Rust code. The system adapts Rust standard libraries for distributed operation, adds affinity mechanisms (TBox, spawn_to), and provides per-node runtimes plus a global controller for load balancing and fault tolerance via heap replication. Empirically, DRust outperforms GAM and Grappa by up to and respectively (average improvements around and ), with modest single-node overhead and strong scalability across multiple applications and workloads, underscoring the practical viability of language-guided DSM.

Abstract

Despite being a powerful concept, distributed shared memory (DSM) has not been made practical due to the extensive synchronization needed between servers to implement memory coherence. This paper shows a practical DSM implementation based on the insight that the ownership model embedded in programming languages such as Rust automatically constrains the order of read and write, providing opportunities for significantly simplifying the coherence implementation if the ownership semantics can be exposed to and leveraged by the runtime. This paper discusses the design and implementation of DistR, a Rust-based DSM system that outperforms the two state-of-the-art DSM systems GAM and Grappa by up to 2.64x and 29.16x in throughput, and scales much better with the number of servers.
Paper Structure (40 sections, 8 figures, 2 tables, 8 algorithms)

This paper contains 40 sections, 8 figures, 2 tables, 8 algorithms.

Figures (8)

  • Figure 1: State machine for Rust's ownership-based memory model.
  • Figure 2: Design overview of DRust.
  • Figure 3: The address space layout of DRust. The stack is private to each thread but they share an aligned address space to ease migration, while the heap is globally shared and partitioned across servers.
  • Figure 4: DRust repurposes Rust pointers and references to contain a global heap address and an extension field for its coherence protocol.
  • Figure 5: Application throughput when running with DRust, GAM, and Grappa, normalized to the throughput of their original implementation running on a single node. The number in the parenthesis is the original application's throughput on a single node.
  • ...and 3 more figures