Practically Correct, Just-in-Time Shell Script Parallelization
Konstantinos Kallas, Tammam Mustafa, Jan Bielak, Dimitris Karnikis, Thurston H. Y. Dang, Michael Greenberg, Nikos Vasilakis
Abstract
Recent shell-script parallelization systems enjoy mostly automated speedups by parallelizing scripts ahead-of-time. Unfortunately, such static parallelization is hampered by dynamic behavior pervasive in shell scripts-e.g., variable expansion and command substitution-which often requires reasoning about the current state of the shell and filesystem.
We present a just-in-time (JIT) shell-script compiler, PASH-JIT, that intermixes evaluation and parallelization during a script's run-time execution. JIT parallelization collects runtime information about the system's state, but must not alter the behavior of the original script and must maintain minimal overhead. PASH-JIT addresses these challenges by (1) using a dynamic interposition framework, guided by a static preprocessing pass, (2) developing runtime support for transparently pausing and resuming shell execution; and (3) operating as a stateful server, communicating with the current shell by passing messages-all without requiring modifications to the system's underlying shell interpreter.
When run on a wide variety of benchmarks, including the POSIX shell test suite, PASH-JIT (1) does not break scripts, even in cases that are likely to break shells in widespread use; and (2) offers significant speedups, whenever parallelization is possible. These results show that PASH-JIT can be used as a drop-in replacement for any non-interactive shell use, providing significant speedups without any risk of breakage.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
8 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- PaSh: light-touch data-parallel shell processing cites POSH: A Data-Aware Shell
- Controlling Opaque-Component Effects with Semisolates and Try cites Incr: Faster Re-Execution via Bolt-On Incrementalization
- Incr: Faster Re-Execution via Bolt-On Incrementalization cites Controlling Opaque-Component Effects with Semisolates and Try
- Controlling Opaque-Component Effects with Semisolates and Try cites POSH: A Data-Aware Shell
- Controlling Opaque-Component Effects with Semisolates and Try cites SysXCHG: Refining Privilege with Adaptive System Call Filters
- Controlling Opaque-Component Effects with Semisolates and Try cites The Koala Benchmarks for the Shell: Characterization and Implications
- Incr: Faster Re-Execution via Bolt-On Incrementalization cites PaSh: light-touch data-parallel shell processing
- Incr: Faster Re-Execution via Bolt-On Incrementalization cites POSH: A Data-Aware Shell
- Incr: Faster Re-Execution via Bolt-On Incrementalization cites DiSh: Dynamic Shell-Script Distribution
- Incr: Faster Re-Execution via Bolt-On Incrementalization cites The Koala Benchmarks for the Shell: Characterization and Implications
- DiSh: Dynamic Shell-Script Distribution cites PaSh: light-touch data-parallel shell processing
- DiSh: Dynamic Shell-Script Distribution cites POSH: A Data-Aware Shell
- The Koala Benchmarks for the Shell: Characterization and Implications cites PaSh: light-touch data-parallel shell processing
- The Koala Benchmarks for the Shell: Characterization and Implications cites POSH: A Data-Aware Shell
- The Koala Benchmarks for the Shell: Characterization and Implications cites DiSh: Dynamic Shell-Script Distribution
Cited by top-tier papers8
- The Koala Benchmarks for the Shell: Characterization and ImplicationsEvangelos Lamprou, Ethan Williams, Georgios Kaoukis, Zhuoxuan Zhang et al.USENIX ATC 2025 · 12 citations
- DiSh: Dynamic Shell-Script DistributionTammam Mustafa, Konstantinos Kallas, Pratyush Das, Nikos VasilakisNSDI 2023 · 11 citations
- SysXCHG: Refining Privilege with Adaptive System Call FiltersAlexander J. Gaidis, Vaggelis Atlidakis, Vasileios P. KemerlisCCS 2023 · 9 citations
- Controlling Opaque-Component Effects with Semisolates and TryEvangelos Lamprou, Tianyu (Ezri) Zhu, Di Jin, Grigoris Ntousakis et al.OSDI 2026 · 4 citations
- Incr: Faster Re-Execution via Bolt-On IncrementalizationYizheng Xie, Evangelos Lamprou, Jerry Xia, Nikos VasilakisOSDI 2026 · 4 citations
Builds on4
- POSH: A Data-Aware ShellDeepti Raghavan, Sadjad Fouladi, Philip Alexander Levis, Matei ZahariaUSENIX ATC 2020 · 33 citations
- Preventing Dynamic Library Compromise on Node.js via RWX-Based Privilege ReductionNikos Vasilakis, Cristian-Alexandru Staicu, Grigoris Ntousakis, Konstantinos Kallas et al.CCS 2021 · 27 citations
- Perspective: A Sensible Approach to Speculative Automatic ParallelizationSotiris Apostolakis, Ziyang Xu, Greg Chan, Simone Campanoni et al.ASPLOS 2020 · 19 citations
- PaSh: light-touch data-parallel shell processingNikos Vasilakis, Konstantinos Kallas, Konstantinos Mamouras, Achilles Benetopoulos et al.EuroSys 2021 · 12 citations
Related papers
- hS: Speculative Script Reordering at Subprocess GranularityGeorgios Liargkovas, Di Jin, Tianyu (Ezri) Zhu, Dan Liu et al.OSDI 2026 · 3 citations
- Partial Evaluation, Whole-Program CompilationChris Fallin, Maxwell BernsteinPLDI 2025 · 1 citation
- Ahead-of-Time Analysis of Shell Program EffectsLukas Lazarek, Evangelos Lamprou, George Kapetanakis, Anirudh Narsipur et al.SOSP 2026
- Executable formal semantics for the POSIX shellMichael Greenberg, Austin J. BlattPOPL 2020 · 21 citations
- Formally Verified Native Code Generation in an Effectful JIT: Turning the CompCert Backend into a Formally Verified JIT CompilerAurèle Barrière, Sandrine Blazy, David PichardiePOPL 2023 · 27 citations
