TY - GEN
T1 - The case for writing network drivers in high-level programming languages
AU - Emmerich, Paul
AU - Voit, Sebastian
AU - Carle, Georg
AU - Ellmann, Simon
AU - Bonk, Fabian
AU - Egger, Alex
AU - Sanchez-Torija, Esau Garcia
AU - Gunzel, Thomas
AU - Di Luzio, Sebastian
AU - Obada, Alexandru
AU - Stadlmeier, Maximilian
N1 - Publisher Copyright:
© 2019 IEEE.
PY - 2019/9
Y1 - 2019/9
N2 - Drivers are written in C or restricted subsets of C++ on all production-grade server, desktop, and mobile operating systems. They account for 66 % of the code in Linux, but 39 out of 40 security bugs related to memory safety found in Linux in 2017 are located in drivers. These bugs could have been prevented by using high-level languages for drivers. We present user space drivers for the Intel ixgbe 10 Gbit/s network cards implemented in Rust, Go, C#, Java, OCaml, Haskell, Swift, JavaScript, and Python written from scratch in idiomatic style for the respective languages. We quantify costs and benefits of using these languages: High-level languages are safer (fewer bugs, more safety checks), but run-time safety checks reduce throughput and garbage collection leads to latency spikes. Out-of-order CPUs mitigate the cost of safety checks: Our Rust driver executes 63 % more instructions per packet but is only 4 % slower than a reference C implementation. Go's garbage collector keeps latencies below 100 μs even under heavy load. Other languages fare worse, but their unique properties make for an interesting case study. All implementations are available as free and open source at https://githud.com/ixy-languages/ixy-languages.
AB - Drivers are written in C or restricted subsets of C++ on all production-grade server, desktop, and mobile operating systems. They account for 66 % of the code in Linux, but 39 out of 40 security bugs related to memory safety found in Linux in 2017 are located in drivers. These bugs could have been prevented by using high-level languages for drivers. We present user space drivers for the Intel ixgbe 10 Gbit/s network cards implemented in Rust, Go, C#, Java, OCaml, Haskell, Swift, JavaScript, and Python written from scratch in idiomatic style for the respective languages. We quantify costs and benefits of using these languages: High-level languages are safer (fewer bugs, more safety checks), but run-time safety checks reduce throughput and garbage collection leads to latency spikes. Out-of-order CPUs mitigate the cost of safety checks: Our Rust driver executes 63 % more instructions per packet but is only 4 % slower than a reference C implementation. Go's garbage collector keeps latencies below 100 μs even under heavy load. Other languages fare worse, but their unique properties make for an interesting case study. All implementations are available as free and open source at https://githud.com/ixy-languages/ixy-languages.
KW - C#
KW - Go
KW - Haskell
KW - Java
KW - JavaScript
KW - OCaml
KW - Python
KW - Rust
KW - Swift
UR - http://www.scopus.com/inward/record.url?scp=85075713731&partnerID=8YFLogxK
U2 - 10.1109/ANCS.2019.8901892
DO - 10.1109/ANCS.2019.8901892
M3 - Conference contribution
AN - SCOPUS:85075713731
T3 - 2019 ACM/IEEE Symposium on Architectures for Networking and Communications Systems, ANCS 2019
BT - 2019 ACM/IEEE Symposium on Architectures for Networking and Communications Systems, ANCS 2019
PB - Institute of Electrical and Electronics Engineers Inc.
T2 - 2019 ACM/IEEE Symposium on Architectures for Networking and Communications Systems, ANCS 2019
Y2 - 24 September 2019 through 25 September 2019
ER -