mgreenblog

try and hs at osdi 2026

Along with the PaSh folks, I have two closely related papers at OSDI 2026: one about try and one about hs, which uses try extensively. These papers are the culmination of work we first talked about at HotOS XIX in our 2023 paper, "Executing Shell Scripts in the Wrong Order, Correctly".

try: a semisolate sandbox

try lets you run a command and capture its filesystem effects---which can then be analyzed, selectively applied, or rolled back. try is implemented using namespaces and overlayfs---the same ingredients as Docker, OrbStack, podman, and bubblewrap---but rearranged to offer a view of the host system itself with fully selective commit and rollback. Our paper "Controlling Opaque-Component Effects with Semisolates and Try" describes try as a new kind of container we call a semisolate (/ˈsɛm.ɪ.sə.lət/), in that it is semi-isolated from the system.

Many developers and systems today rely on opaque software components. When executing, these components affect each other and the broader environment in which they execute. Some of these effects are expected and desired; others not so. This paper introduces semisolates, an abstraction and corresponding subsystem for controlling and manipulating the effects of opaque components. Available as an unprivileged, higher-order, language-agnostic command, try interposes on a component’s execution to automatically capture and control its effects. Effect control includes introspection, optional application, effect stacking, and further manipulation—all driven by several real-world case studies. Today try is used in research and production applications across several organizations, mediating potentially undesired effects, maintaining full compatibility with real-world components, and incurring a modest performance overhead well within each case’s acceptable levels.

This paper is with Evangelos Lamprou, Ezri Zhu, Di Jin, Grigoris Ntousakis, Georgios Liargkovas, Calvin Eng, Konstantinos Kallas, and Nikos Vasilakis.

hs: out-of-order execution by speculation at the process level

Modern CPUs are fast (in part) due to out-of-order execution, which relies on two things that are pretty easy to do in hardware: selective commit/rollback (to drop bad speculations) and dependency tracking (to detect bad speculations). While it's hard to do these things within a program---surprisingly!---it's not so hard to do these things for UNIX processes!

CPUhs
selective commit and rollbackregister file virtualizationtry
perfect dependency trackingtrack register and memory dependenciesstrace

Instead of virtualizing the register file, we virtualize the filesystem. For dependency tracking, a tool like strace does just fine---though we have some interesting things in the works!

Something particularly exciting about hs is that its speedups are totally black-box: unlike our prior work on PaSh, you don't have to know anything about the program you're running. Our paper, "hS: Speculative Script Reordering at Subprocess Granularity" offers more details:

Shell scripts are pervasive, acting as the glue between commands and subprocesses that are written in a variety of languages and perform complex, system-wide effects. Given the black-box nature of these subprocesses, all work that optimizes script performance until now has relied on handwritten annotations that describe subprocess effects. In this paper we introduce hS, a system that brings out-of-order, speculative execution to scripts that invoke subprocesses without requiring any user input or annotations about them. hS speculatively executes command instances—typically simple commands, pipelines, or small synchronization regions—dynamically detecting their effects: blocking unsafe ones, like network accesses, and selectively committing independent effects, like file writes, given no conflicts. On a wide range of real-world scripts, hS offers up to 9.3× speedups compared to bash, and up to 7× speedups over PaSh—all while not requiring any developer involvement or command annotations.

This paper is with Georgios Liargkovas, Di Jin, Ezri Zhu, Dan Liu, A. Bolun Thompson, Anirudh Narsipur, Seong-Heon Jung, Siddhartha Prasad, Diomidis Spinellis, Konstantinos Kallas, and Nikos Vasilakis.

(You might wonder, why the name hs? Well... it's the shell---sh---out of order! As a bonus, the name annoys my PL friends who work on Haskell.)

More to look out for!

I want to call out two very cool things about this work.

First: there were many undergraduates involved in this research (Ezri, Dan, Bolun, Seong-Heon, and Calvin---and maybe Georgios, depending how you count). I'm really delighted to be getting undergraduates involved in advanced systems work---and I'm very impressed with the students.

Second: my colleague Nikos has two other papers at OSDI: "Incr: Faster Re-Execution via Bolt-On Incrementalization" and "RT: Regular Types for the Streaming Shell". That is, he's got four papers at OSDI 2026... look at him go!

See you at OSDI?