CMU-CS-20-124
Computer Science Department
School of Computer Science, Carnegie Mellon University



CMU-CS-20-124

User Level Page Faults

Qingyang Li

M.S. Thesis

December 2020

CMU-CS-20-124.pdf


Keywords: User level interrupt, TLB, page table, MMU, page fault

Memory management has always been a responsibility shared by the hardware and the operating system. The MMU (memory management unit) walks the kernel-managed page tables to ensure safety and isolation between data from different processes. While users can alter some aspects of the memory system they control (e.g., permissions) these operations come with a high overhead.

We propose User Level Page Tables as a hardware/software mechanism that offers a low overhead mechanism for users to manage their application memory permissions while still having hardware enforcing those permissions. Our mechanism allows users to modify page permissions with a single write in user space and without changing privilege levels. Users can also handle many types of page faults using handler functions that they install, without crossing into kernel space.

To realize this mechanism, we start with an architecture that has already been modified to support User-Level Interrupts and we modify components in its hardware address translation pipeline, specifically the MMU and TLB. We also modify the Linux kernel by adding a set of "shadow" user-level page tables.

We evaluate our approach of User Level Page Tables by using it to implement watchpoints and analyze the overhead. We evaluate our system using Gem5, a full system emulator, modified to implement User-Level Interrupts and User-Level Page Faults as an extension of the x86_64 architecture.

Our microbenchmarks show that, even with thousands of watchpoints, we incur a slowdown of only 3.25x compared to a 1,000,000x slowdown when using GDB software watchpoints. With the SPEC benchmarks, watching every dynamically allocated memory region, we see slowdowns range from 2.1x-15.8x. The latter slowdown suggests we need to improve our method of tracking active watchpoints.

62 pages

Thesis Committee:
Seth Copen Goldstein (Chair)
David A. Eckhardt

Srinivasan Seshan, Head, Computer Science Department
Martial Hebert, Dean, School of Computer Science


Return to: SCS Technical Report Collection
School of Computer Science

This page maintained by reports@cs.cmu.edu