Advanced Systems Programing in C/Rust

Course Information

  • Language: English
  • Type: Practical training
  • Module: IN0012, IN2106, IN2128
  • SWS: 6
  • ECTS Credits: 10
  • Prerequisites: Knowledge equivalent to the lectures:
    • Fundamentals of Programming (IN0002)
    • Introduction to Computer Architecture (IN0004)
    • Basic Principles: Operating Systems and System Software (IN0009)
  • TUM Online: We will enroll you before the lab starts. Do not forget to register in the matching system to obtain a seat in the lab!
  • Course Material:
    • The Linux Programming Interface – Michael Kerrisk
    • Linux System Programming – Robert Love
  • Time and Location:
    • Q&A session every week on Thursday starting from 16:00 on Zoom

Content

This course covers some of the most important aspects of systems programming. More specifically, we will cover the following topics through a set of programming assignments over the semester:

  • Kernel and system calls: How programs interact with the operating system, how to implement some system calls yourself in assembly
  • File I/O: Learn about file descriptors, direct i/o, memory mapped i/o, page cache etc.
  • Concurrency and synchronization: Learn about different threading primitives, i.e., mutexes, concurrent data structure design and how they are implemented
  • Memory management: Virtual memory, heap, stack and how malloc() works
  • Processes: Different system calls related to process handling like fork(), execve(), wait()
  • Sockets: Different socket types, efficient ways to implement servers (io_uring)
  • Performance profiling: Full system profiling with modern tools based on epbf and flamegraphs
  • Virtualization: Hypervisors (KVM), containers, cgroups

Objectives

  • Introduction to a variety of operating system concepts
  • Techniques for debugging and optimization of low-level code
  • Good understanding of memory- and resource management

Teaching and Learning Methods

Laboratory
This course consists of a set of modules related to different aspects of systems programming. For each of these modules, there is a dedicated assignment that will help students dig deeper into the concepts and get familiar with them with actual, useful, hands-on tasks. There is, also, one weekly meeting to cover the mandatory theoretical background which is required for the programming assignment. During this meeting, there will be time for answering students’ questions and discussing the specific goal of each assignment. The students will be required to perform tasks within a time frame (1 or 2 weeks depending on the difficulty level and the workload of each assignment) and submit their work in the system. The submitted workpieces will then be evaluated and based on that, a grade will be calculated for each assignment.

Preliminary meeting

Instructors