Safety in Systems Programming
1 Module Summary
This class is focused on safety and robustness in systems programming: Where do things often go wrong in computer systems? How can we avoid common pitfalls? We will use the Rust programming language as a vehicle to deliver mental models and paradigms that have been shown to be helpful in preventing errors, and we will look at how these features have made their way back into C++. The first 7 lectures will focus on preventing many of the types of problems that you encountered in CS107: how can we prevent buffer overflows, memory leaks, use-after-free bugs, and other sorts of memory errors? Then, we will focus on preventing common mistakes that arise in the programming settings CS110 covers: how do we write safe code when multiprocessing and multithreading are involved? Check out the module syllabus to see an overview of the course material.
2 Module Resources
Recordings (recommended Spring 2021)
-
[Lecture 3]
-
[Lecture 4]
-
[Lecture 5]
-
[Lecture 6]
-
[Lecture 7]
-
[Lecture 8]
-
[Lecture 9]
-
[Lecture 10]
-
[Lecture 11]
-
[Lecture 12]
-
[Lecture 13]
-
[Lecture 14]
-
[Lecture 15]
-
[Lecture 16]
-
[Lecture 17]
-
[Lecture 18]
-
[Lecture 19]
-
[Lecture 20]
3 Dev Environment
3.1 Software
If you would like to follow along on your personal computer, you may install the Rust toolchain on your computer by following the instructions here.
3.2 Textbooks and Resources
This class has no textbook. However, if you are interested in additional readings, Programming Rust and the free, online Rust book are both excellent resources.
3.3 Projects and Assignments
I used Spring 2020 starter code from the public repo of the lecturer’s GitHub account.
GitHub starter code
MyRepo pending…