Preface

This book serves as the script for the lecture 'Advanced Systems Programming' taught at the University of Applied Sciences in Darmstadt. 'Advanced Systems Programming' is part of the curriculum of the computer science bachelor degree course. It is aimed at students in their last semesters and is an optional course. Prerequisites are the basic 'Introduction to Programming' courses (PAD1&2) as well as the introductory course on operating systems (Betriebssysteme).

What is Advanced Systems Programming about?

The main focus of the Advanced Systems Programming course and this book is to teach students how to develop systems software using a modern programming language (Rust). Within this course, students will learn the basics of what systems programming is with many hands-on examples and exercises to get them familiar with the modern systems programming language Rust. Students are expected to be decently proficient in C++, so one of the cornerstones of this course is the continuous comparison of common aspects of systems software in the C++-World and the Rust-World. These aspects include:

  • Data (memory and files, ownership)
  • Runtime performance (zero-overhead abstractions, what makes C++ & Rust fast or slow?)
  • Error Handling
  • Communication between processes and applications
  • Observability (debugging, logging, configuring software)
  • The development ecosystem (IDEs, compilers, debuggers, analyzers, linters etc.)

To give the students hands-on experience with these topics, the course has an extended lab part. Here, students will implement the learned aspects within real systems software. In the first part of the lab, this is done through a series of exercises, which include translating concepts from C++ code to the Rust world and extending small programs with new features. The second part of the lab will be a larger project in which students will implement a system of their choice (for example a web-server, game-engine, or a compiler for a scripting language) using the concepts that they have learned in this course. All lab sessions will also include a small analysis of an existing piece of (open-source) software. This way, students will familiarize themselves with reading foreign code and will get experience from real-world code.

What is Advanced Systems Programming not about?

Systems programming is a very large discipline that covers areas from all over the computer science field. As such, many of the concepts that students will learn and use in this course might warrant a course on their own (and sometimes already have a course on their own). As such, Advanced Systems Programming is not a course that goes into the cutting edge research of how to write blazing fast code on a supercomputer or writing an operating system from scratch. While this course does cover many details that are relevant to systems programming, it is much more focused on the big picture than a deep-dive into high-performance software.

Additionally, while this course uses Rust as its main programming language, it will not cover all features that Rust has to offer, nor will it teach all Rust concepts from the ground up in isolation. Rust is well known for its outstanding documentation and students are expected to use this documentation, in particular the Rust book, to extend their knowledge of Rust beyond what is covered in this course. This course also is not a tutorial on how to use Rust. Students will learn systems programming using Rust, but Rust as a general-purpose language has many more areas of application than just systems programming. A lot of focus on the practical aspects of using the Rust language will be put in the lab part of this course, as it is the authors firm believe that one learns programming by doing, and not so much by reading.

Supplementary material

This book comes with lots of code examples throughout the text. In addition, the following text-books are a good start for diving into the concepts taught in this course:

  • Bryant, Randal E., O'Hallaron David Richard, and O'Hallaron David Richard. Computer systems: a programmer's perspective. Vol. 2. Upper Saddle River: Prentice Hall, 2003. [Bryant03]
  • Klabnik, Steve, and Carol Nichols. The Rust Programming Language (Covers Rust 2018). No Starch Press, 2019. [Klabnik19]
  • Also available online: https://doc.rust-lang.org/book/
  • Stroustrup, Bjarne. "The C++ programming language." (2013). [Stroustrup00]

An comprehensive list of references can be found at the end of this book.