On a Model of Virtual Address Translation

Tomasz Jurkiewicz, Kurt Mehlhorn · DOI

TL;DR

Modern computer performance is significantly impacted by virtual address translation (VAT), a cost often ignored by traditional computational models like RAM and EM. This paper introduces the VAT model to accurately account for this overhead and demonstrates that it better predicts real-world performance for several algorithms. The authors also show how cache-oblivious algorithms can be analyzed within this new framework.

What Problem Does This Paper Address?

Traditional models of computation, such as the Random Access Machine (RAM) and External Memory (EM) models, simplify how computers access memory. While useful, they fail to capture the significant overhead introduced by virtual address translation (VAT) in modern systems. This overhead arises because virtual memory addresses must be translated into physical addresses, a process involving multiple memory accesses to traverse page tables. This discrepancy leads to a mismatch between theoretical predictions and actual running times for many algorithms, particularly those involving random memory access or complex data structures. The authors aim to bridge this gap by proposing a new computational model that explicitly accounts for VAT costs.

Methods

The core contribution of this paper is the introduction of the Virtual Address Translation (VAT) model. This model extends existing computational models by incorporating the cost of translating virtual addresses to physical addresses. The VAT model views address translation as a tree walk through a hierarchical page table structure. The cost is then analyzed based on the number of cache faults incurred during this walk, considering a translation cache (TC) that stores recently used page table entries.

The authors analyze several algorithms (random scan, binary search, heapsort, quicksort, permutation) within the VAT model and compare their predictions to experimental measurements. They also investigate the behavior of cache-oblivious algorithms within the VAT framework, showing how their performance relates to their EM-model complexity. A significant portion of the paper is dedicated to exploring various replacement strategies for the translation cache (TC), including LRU, ISLRU, MIN, and ISMIN, and their theoretical properties.

Datasets

Not discussed in the paper. The paper focuses on theoretical analysis and experimental validation using custom-written programs.

Key Insights and Ideas

  • VAT is a significant cost: The paper convincingly demonstrates that virtual address translation is not a negligible overhead and can drastically alter the performance characteristics of algorithms compared to simpler models.
  • RAM/EM models are insufficient: The experimental results highlight that traditional models fail to predict the observed running times for algorithms involving random access or complex memory patterns.
  • VAT model provides predictive power: The proposed VAT model, by accounting for page table walks and cache faults, offers predictions that align much better with empirical measurements.
  • Cache-oblivious algorithms benefit from VAT analysis: The paper shows that even algorithms designed to be independent of cache parameters can be analyzed within the VAT model, providing insights into their practical performance.
  • Translation cache replacement strategies matter: The theoretical analysis of TC replacement strategies reveals trade-offs and optimality conditions, similar to traditional cache replacement policies.

Key Results

  • Experimental results show that algorithms like random scan and repeated binary search exhibit running times that grow faster than predicted by RAM or EM models, with VAT being the primary culprit. For instance, random scan's running time grows as O(n log n) and repeated binary search as O(n log² n) in practice, deviating from simpler model predictions.
  • The VAT model's predictions for these algorithms show good agreement with measured running times.
  • The paper provides theoretical bounds for the VAT cost of various algorithms, including sequential access (O(d + n/P)), random access (O(τd logκ(n/PW))), and binary search (O(τ logκ n log(n/PW))).
  • Theorem 7.1 establishes an upper bound for the VAT-complexity of cache-oblivious algorithms in terms of their EM-complexity, suggesting that many such algorithms will also perform well in the VAT model, provided certain conditions are met.

Limitations and Future Work

  • Model Complexity: The authors acknowledge that the VAT model, particularly in its proofs, can appear complex. They suggest that future work could simplify some of the arguments and analyses.
  • Parameter Sensitivity: While the paper suggests that the exact value of K (fan-out of the translation tree) might not always matter, it notes that for certain algorithms like matrix transpose, K's value is visibly impactful. Further investigation into the impact of K and other parameters is warranted.
  • Lower Bounds for Random Access and Heapsort: The paper leaves the lower bound analysis for the VAT cost of random access and heapsort as open problems.
  • Hashing vs. Trees: The authors briefly discuss the possibility of replacing tree-based address translation with hashing, concluding that trees are likely more suitable due to hardware support and predictable performance. However, further exploration of hashing-based approaches for specific components (like caches) is mentioned.
  • Virtual Machines: The paper touches upon the double address translation overhead in virtual machines, suggesting it's a significant issue for cloud computing and warrants further study.
  • Cache-Oblivious Algorithms with Tall-Cache Assumptions: While the paper shows that cache-oblivious algorithms with stringent tall-cache assumptions perform well in the VAT model, it poses the question of whether this stringent assumption is always necessary.

Summary updated

BibTeX
@inproceedings{jurkiewicz2013model,
  author = {Tomasz Jurkiewicz and Kurt Mehlhorn},
  title = {{On a Model of Virtual Address Translation}},
  booktitle = {ALENEX},
  year = {2013},
  doi = {10.1137/1.9781611972931.13},
}
Figure