A loosely defined term. Here are some definitions:
“writing code that directly uses hardware resources, has serious resource constraints, or closely interacts with code that does” (“The C++ programming language”, Stroustrup)
““systems-level” work […] deals with low-level details of memory management, data representation, and concurrency” (“The Rust Programming Language”, Steve Klabnik and Carol Nichols)
“a systems programming language is used to construct software systems that control underlying computer hardware and to provide software platforms that are used by higher level application programming languages used to build applications and services” (from a panel on systems programming at the Lang.NEXT 2014 conference)
Systems Programming
A loosely defined term. Here are some definitions:
“writing code that directly uses hardware resources, has serious resource constraints, or closely interacts with code that does” (“The C++ programming language”, Stroustrup)
““systems-level” work […] deals with low-level details of memory management, data representation, and concurrency” (“The Rust Programming Language”, Steve Klabnik and Carol Nichols)
“a systems programming language is used to construct software systems that control underlying computer hardware and to provide software platforms that are used by higher level application programming languages used to build applications and services” (from a panel on systems programming at the Lang.NEXT 2014 conference)
Important aspects of systems programming
Systems software interacts closely with hardware
Systems programming is concerned with writing efficient software
Systems software is used by other software, as opposed to applications software, which is used by end users
Is a database systems software?
Systems vs. applications dichotomy?
As so often, the terms are ambiguous
Both terms are opposite ends of a scale
Do you agree that the compiler is lower than the game engine?
Take a piece of software running on your computer and put it on the systems/applications scale. Where do you put it and why?
Discuss for 5 minutes with your neighbor(s)
How do we write systems software?
We need a language that gives direct access to hardware resources
Examples of hardware resources:
Memory (RAM, disk)
CPU cycles (especially on multiple cores)
Network throughput
Coprocessor cycles (e.g. GPUs, TPUs)
Programming languages
Systems programming languages let us write systems software
e.g. C, C++, Rust, Go, Zig
Application programming languages let us write applications
e.g. Python, Java, Kotlin, C#, JavaScript
Most modern languages are general-purpose programming languages
Abstractions
If most programming languages are general-purpose, why bother?
Programming languages have different levels of abstraction over a machine’s underlying hardware architecture
Definition: Abstraction is the process of hiding information in order to simplify interaction with a system [Colburn, Shute 2007]
Abstraction can mean a loss of control
Another classification
We can classify languages using their level of (hardware) abstraction:
A conflict
For systems programming, we want lots of control over hardware
As programmers, we want abstractions for ease of development
Modern languages (Rust, Go, Zig etc.) aim to bridge this gap
Rust
A modern systems programming language, focus of this course
As powerful as C/C++, but safer and more convenient to use
Popular, great tooling, good documentation, easy to get started
…but a steep learning curve :/
Rust has a cute mascot:
A first look at Rust code
usestd::io;fn main() {println!("Guess the number!");println!("Please input your guess.");letmut guess =String::new();io::stdin().read_line(&mut guess).expect("Failed to read line");println!("You guessed: {guess}");}