Virtuoso: Enabling Fast and Accurate Virtual Memory Research via an Imitation-based Operating System Simulation Methodology
This repository provides all the necessary files and instructions to reproduce the results of our ASPLOS 2025 paper.
Konstantinos Kanellopoulos, Konstantinos Sgouras, F. Nisa Bostanci, Andreas Kosmas Kakolyris, Berkin K. Konar, Rahul Bera, Mohammad Sadrosadati, Rakesh Kumar, Nandita Vijaykumar, and Onur Mutlu, "Virtuoso: Enabling fast and accurate virtual memory research via an imitation-based OS simulation methodology," ASPLOS'25. Paper PDF
Please use the following citation if this repository is useful for your work:
@inproceedings{kanellopoulos2025virtuoso,
title={{Virtuoso: Enabling Fast and Accurate Virtual Memory Research via an Imitation-based Operating System Simulation Methodology}},
author={Konstantinos Kanellopoulos, Konstantinos Sgouras, F. Nisa Bostanci, Andreas Kosmas Kakolyris, Berkin K. Konar, Rahul Bera, Mohammad Sadrosadati, Rakesh Kumar, Nandita Vijaykumar, and Onur Mutlu},
year={2025},
booktitle={ASPLOS}
}- Please visit our website to find tutorials and documentation on how to use Virtuoso.
- Introduction
- Describes the motivation of this work and introduces Virtuoso
- Prerequisites
- Describes the prerequisites for running the experiments
- Running Experiments
- Provides instructions on how to run a test experiment using the provided scripts
- Datasets
- Provides information on the datasets
Virtuoso is a new simulation framework designed to enable fast and accurate prototyping and evaluation of virtual memory (VM) schemes. It employs a lightweight userspace kernel, MimicOS, which imitates the desired OS kernel code, allowing researchers to simulate only the relevant OS routines and easily develop new OS modules. Virtuoso's imitation-based OS simulation methodology facilitates the evaluation of hardware/OS co-designs by accurately modeling the interplay between OS routines and hardware components.
- Architecture: x86-64 system.
- Memory: 4–13 GB of free memory per experiment.
- Storage: 10 GB of storage space for the dataset.
- Python 3.8 or later (Virtuoso+Sniper can also work with Python 2.7 but we do not recommend it)
- libpython3.8-dev or later (make sure to install the correct version of libpython for your Python version)
- g++
We provide a script to install some potentially missing dependencies. The will also install Miniconda, which is a lightweight version of Anaconda so that you can create a virtual environment for Python 3.8 or later.
cd Virtuoso/simulator/sniper/
sh install_dependencies.sh
bash # start a new bash shell to make sure the environment variables are set
conda create -n virtuoso python=3.10
conda activate virtuoso # Python 3.10 will be your default Python version in this environmentDownload some traces from workloads that experienced high address translation overheads.
sh download_traces.shLet's first clean the Sniper simulator and then build it from scratch.
cd Virtuoso/simulator/sniper
make distclean # clean up so that we can build from scratch
make -j # build SniperMake sure the simulator is working by running the following command:
sh run_example.sh Let's now do something more interesting and run actual experiments. We will run the following experiment:
- Baseline MMU with a Radix page table and a reservation-based THP policy (similar to the one used in FreeBSD) with 4KB and 2MB pages.
- We will sweep the memory fragmentation ratio to observe the effect of memory fragmentation on the performance of address translation.
- We will run the experiment multiple translation-intensive workloads.
To run the experiments efficiently, we will use the Slurm job scheduler.
If you do not have Slurm installed, you can run the experiments by modifying the create_jobfile_virtuoso_reservethp.py script to run the experiments sequentially without sbatch and srun.
cd Virtuoso/scripts/virtuoso_sniper
python3 create_jobfile_virtuoso_reservethp.py ../../Virtuoso/ ../jobfiles/reservethp.jobfile
cd ../jobfiles
source reservethp.jobfile # This will run the experiments with Slurm-
Virtuoso Integration:
- [Sniper Multi-Core Simulator] (https://github.com/snipersim/)
-
MMU Models:
- MMU Baseline:
- Page Walk Caches
- Configurable TLB hierarchy.
- Configurable Page Walk Cache (PWC) hierarchy
- Large page prediction based on Papadopoulou et al.
- MMU Speculation: Speculative address translation as described in SpecTLB
- MMU Software-Managed TLB: Software-managed L3 TLB as described in POM-TLB
- MMU Utopia: Implements Utopia
- MMU Midgard: Implements Midgard
- MMU RMM (and Direct Segments): Implements RMM
- MMU Virtualized: Nested Paging and Nested Page Tables (NPT) for modern hypervisors
- MMU Baseline:
-
Page Table Designs:
- Page Table Baseline: Radix page table with configurable page sizes
- Range Table: B++ Tree-like translation table for virtual-to-physical address ranges
- Hash Don't Cache: Open-addressing hash-based page table
- Conventional Hash-Based: Chain-based hash table design
- ECH: Cuckoo hashing-based organization of the page table
- RobinHood: Open-addressing with element re-ordering
-
Memory Allocation Policies:
We welcome contributions! Please open an issue on GitHub to discuss potential changes or report bugs.
For questions please contact Konstantinos Kanellopoulos ([email protected]) and Konstantinos Sgouras ([email protected]).