Lightweight Preemptible Functions

Lamenting the lack of a natural userland abstraction for preemptive interruption and asynchronous cancellation, we propose lightweight preemptible functions, a mechanism for synchronously performing a function call with a precise timeout that is lightweight, e cient, and composable, all while being portable between programming languages. We present the design of libinger, a library that provides this abstraction, on top of which we build libturquoise, arguably the rst generalpurpose and backwards-compatible preemptive thread library implemented entirely in userland. Finally, we demonstrate this software stack’s applicability to and performance on the problems of combatting head-ofline blocking and time-based DoS attacks.

[1]  Butler W. Lampson,et al.  Hints for Computer System Design , 1983, IEEE Software.

[2]  Daniel P. Friedman,et al.  Engines build process abstractions , 1984, LFP '84.

[3]  Brian N. Bershad,et al.  Scheduler activations: effective kernel support for the user-level management of parallelism , 1991, TOCS.

[4]  Michael Hamburg,et al.  Meltdown , 2018, meltdownattack.com.

[5]  Martín Abadi,et al.  An Overview of the Singularity Project , 2005 .

[6]  C. J. Vanderwaart Static Enforcement of Timing Policies Using Code Certification , 2006 .

[7]  Christoforos E. Kozyrakis,et al.  Usenix Association 10th Usenix Symposium on Operating Systems Design and Implementation (osdi '12) 335 Dune: Safe User-level Access to Privileged Cpu Features , 2022 .

[8]  James H. Anderson,et al.  Bringing theory into practice: A userspace library for multicore real-time scheduling , 2013, 2013 IEEE 19th Real-Time and Embedded Technology and Applications Symposium (RTAS).

[9]  Luiz André Barroso,et al.  The tail at scale , 2013, CACM.

[10]  Srikanth Kandula,et al.  Speeding up distributed request-response workflows , 2013, SIGCOMM.

[11]  Brian D. Noble,et al.  Bobtail: Avoiding Long Tails in the Cloud , 2013, NSDI.

[12]  Jialin Li,et al.  Tales of the Tail: Hardware, OS, and Application-level Sources of Tail Latency , 2014, SoCC.

[13]  Jeffrey H. Meyerson,et al.  The Go Programming Language , 2014, IEEE Softw..

[14]  Miguel Castro,et al.  No compromises: distributed transactions with consistency, availability, and performance , 2015, SOSP.

[15]  Scott Shenker,et al.  NetBricks: Taking the V out of NFV , 2016, OSDI.

[16]  Hwanju Kim,et al.  TPC: Target-Driven Parallelism Combining Prediction and Correction to Reduce Tail Latency in Interactive Services , 2016, ASPLOS.

[17]  R. Sternberg,et al.  The fork in the road , 2017, Behavioral and Brain Sciences.

[18]  Kushagra Vaid,et al.  Azure Accelerated Networking: SmartNICs in the Public Cloud , 2018, NSDI.

[19]  David G. Andersen,et al.  Putting the "Micro" Back in Microservice , 2018, USENIX Annual Technical Conference.

[20]  Peter Druschel,et al.  ERIM: Secure and Efficient In-process Isolation with Memory Protection Keys , 2018, ArXiv.

[21]  Christoforos E. Kozyrakis,et al.  Shinjuku: Preemptive Scheduling for μsecond-scale Tail Latency , 2019, NSDI.

[22]  Michael Hamburg,et al.  Spectre Attacks: Exploiting Speculative Execution , 2018, 2019 IEEE Symposium on Security and Privacy (SP).

[23]  Sahil Malik Azure Functions , 2019 .