├── README.md └── slides ├── 00-introduction.pdf ├── 01-system_calls.pdf ├── 02-files.pdf ├── 02-fuse.pdf ├── 03-processes.pdf ├── 04-concurrency.pdf ├── 05-memory_management.pdf ├── 06-network_programming.pdf ├── 07-performance.pdf ├── 08-llvm.pdf └── preliminary_meeting.pdf /README.md: -------------------------------------------------------------------------------- 1 | # Practical course: Systems Programming -- SoSe 2025 2 | 3 | 13 | 14 | ## Chair website 15 | 16 | - The practical course is organized by the [Chair of Distributed Systems & Operating Systems](https://dse.in.tum.de/) at TU Munich. 17 | 18 | ## Course Information 19 | - Language: English 20 | - Type: Practical training 21 | - Module: IN0012, IN2106, IN2128 22 | - (_*This course is not offered to IN2397*_) 23 | - SWS: 6 24 | - ECTS Credits: 10 25 | - Prerequisites: 26 | - We don't have any compulsory prerequisites, but we prefer students to be proficient in the basic concepts of operating systems and systems programming (C/C++/Rust). 27 | - Preferred knowledge or equivalent to the lectures: 28 | - Fundamentals of Programming (IN0002) 29 | - Introduction to Computer Architecture (IN0004) 30 | - Basic Principles: Operating Systems and System Software (IN0009) 31 | - Course Material: 32 | - The Linux Programming Interface – Michael Kerrisk 33 | - Linux System Programming – Robert Love 34 | - TUM Online: You must register for this course in TUM Online before the course starts 35 | - Student note: Compulsory enrollment after two weeks of the matching outcome; students who fail to de-register in this period will be registered for the exam 36 | 37 | ## Course Details 38 | This course covers some of the most important aspects of systems programming. 39 | More specifically, we will cover the following topics through a set of programming assignments over the semester: 40 | 41 | - Kernel and system calls: How programs interact with the operating system, how to implement some system calls yourself in assembly 42 | - File I/O: Learn about file descriptors, direct i/o, memory mapped i/o, page cache etc. 43 | - Concurrency and synchronization: Learn about different threading primitives, i.e., mutexes, concurrent data structure design, and how they are implemented 44 | - Processes: Different system calls related to process handling like fork(), execve(), wait() 45 | - Memory management: How virtual memory, heap, stack, and how malloc() works 46 | - Networking: How to handle network protocols, efficient ways to implement servers 47 | - Performance: How to bring out the performance of the hardware (**C++ only**) 48 | - Compiler/LLVM: Hom to implement LLVM passes to improve compiler-generated codes (**C++ only**) 49 | 50 | 51 | This course consists of a set of modules related to different aspects of systems programming. 52 | 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. 53 | There is also a weekly Q&A meeting where we answer students' questions and discuss the specific goal of each assignment. 54 | The students will be required to perform tasks within a time frame (around 2-3 weeks, depending on the task) and submit their work in the online evaluation system. 55 | The submitted workpieces will then be evaluated, and based on that, a grade will be calculated for each assignment. 56 | 57 | ## Objectives 58 | - Introduction to a variety of operating system concepts 59 | - Techniques for debugging and optimization of low-level code 60 | - Good understanding of memory- and resource management 61 | 62 | ## Meeting place 63 | 64 | - Preliminary meeting: Tues, Feb 11th @ 1:00 PM CET (Zoom) 65 | - [Slide](./slides/preliminary_meeting.pdf) 66 | - [Zoom link](https://tum-conf.zoom-x.de/j/63152167759?pwd=Hs3ZTtXEJZDrWa9Wrq2BCQKpqIBTvm.1) 67 | - Q&A session: Weekly on Thursday from 03:00 PM to 03:30 PM CET online (zoom) 68 | - [Zoom link](https://tum-conf.zoom-x.de/j/65845310662?pwd=O0DprVOlaTl9sBdcLg70PKMdjqOqqQ.1) 69 | 70 | ## Tasks 71 | 72 | Please refer to the respective task repositories (that are released on the published date) for details. 73 | The schedule may change. **All deadlines are at 15:00 (CEST).** 74 | 75 | | Task | Organizer | Published on | Deadline | Points | Language | Slide | Video | 76 | |--------------------------------------------------------------------------|---------------------------------------------------------|--------------|----------------|--------|----------|------------------------------------------------|-------------------------------------------------------------------------------| 77 | | [Introduction](https://github.com/ls1-sys-prog-course/task0-sort) | [Francisco Romão](https://github.com/FranciscoRomao) | 29.04.2025 | 13.05.2025 | 0 | C/C++, Rust | [link](./slides/00-introduction.pdf) | [Lecture]( https://youtu.be/Kv8OgLs1crI) | 78 | | [System Calls](https://github.com/ls1-sys-prog-course/task1-syscalls) | [Ludovico Capiaghi](https://github.com/ludof63) | 06.05.2025 | 20.05.2025 | 30 | C/C++, Rust | [link](./slides/01-system_calls.pdf) | [Lecture](https://youtu.be/qO33G1od3Xo) | 79 | | [File I/O](https://github.com/ls1-sys-prog-course/task2-fileio) | [Ludovico Capiaghi](https://github.com/ludof63) | 13.05.2025 | 27.05.2025 | 30 | C/C++, Rust | [link](./slides/02-files.pdf), [FUSE](./slides/02-fuse.pdf) | [Lecture](https://youtu.be/wDPH8DYZwCg), [FUSE](https://www.youtube.com/watch?v=i3YJK3es-iQ) | 80 | | [Processes](https://github.com/ls1-sys-prog-course/task3-processes) | [Francisco Romão](https://github.com/FranciscoRomao) | 20.05.2025 | 03.06.2025 | 30 | C/C++, Rust | [link](./slides/03-processes.pdf) | [Lecture](https://youtu.be/qNzgterdPng) | 81 | | [Concurrency](https://github.com/ls1-sys-prog-course/task4-concurrency) | [Francisco Romão](https://github.com/FranciscoRomao) | 27.05.2025 | 10.06.2025 | 30 | C/C++, Rust | [link](./slides/04-concurrency.pdf) | [Lecture](https://youtu.be/Bj-1pFh8Bck) | 82 | | [Memory Management](https://github.com/ls1-sys-prog-course/task5-memory) | [Daniel Lipkin](https://github.com/DanieIL0) | 03.06.2025 | 17.06.2025 | 30 | C/C++, Rust | [link](./slides/05-memory_management.pdf) | [Lecture](https://youtu.be/1LxVzohqRx0) | 83 | | [Networking](https://github.com/ls1-sys-prog-course/task6-sockets) | [Daniel Lipkin](https://github.com/DanieIL0) | 10.06.2025 | 24.06.2025 | 30 | C/C++, Rust | [link](./slides/06-network_programming.pdf) | [Lecture](https://youtu.be/fDRaXnhjoDE) | 84 | | [Performance](https://github.com/ls1-sys-prog-course/task7-performance) | [Victor Trost](https://github.com/TrostV) | 17.06.2025 | 01.07.2025 | 40 | C++ | [link](./slides/07-performance.pdf) | [Lecture](https://youtu.be/o1SkOoCyHDI) | 85 | | [Compiler/LLVM](https://github.com/ls1-sys-prog-course/task8-llvm) | [Victor Trost](https://github.com/TrostV) | 24.06.2025 | 08.07.2025 | 30 | C++ | [link](./slides/08-llvm.pdf) | [Lecture](https://youtu.be/7SSkksFEKfk) | 86 | 87 | 88 | Note that 89 | - 100% points lost if private tests detect cheating or we find a solution tries to game the system (modifying test scripts, etc.) 90 | - 50% points lost if normal private tests fail 91 | 92 | 93 | ## Allowed Libraries 94 | 95 | In general, only standard libraries can be used. In addition to this, the following libraries are available for use. 96 | 97 | - Rust: [libc](https://crates.io/crates/libc), [nix](https://crates.io/crates/nix) 98 | - C++: [{fmt}](https://fmt.dev/latest/index.html), [range-v3](https://github.com/ericniebler/range-v3) 99 | - General argument parsing libraries, such as [clap](https://crates.io/crates/clap) 100 | - General error handling libraries, such as [anyhow](https://docs.rs/anyhow/latest/anyhow/) 101 | 102 | Depending on the task, the use of additional libraries may be allowed or the use of libraries (including standard libraries) may be restricted. Please refer to the task description for details. 103 | 104 | 105 | For a reference of the standard library, check out: 106 | - [cppreference](https://en.cppreference.com/w/) for C/C++ 107 | - [std](https://doc.rust-lang.org/std/) for rust 108 | 109 | ## Environment 110 | 111 | All executables must run on Linux, x86_64. Therefore, we strongly recommend having a local Linux x86_64 environment for development. 112 | Note that some tasks involve loading kernel modules and configuring kernel parameters, including cgroups, and some operations are not allowed in some container (docker) environments. 113 | While we only guarantee the execution of tasks in a local Linux 86_64 environment, if you are using different OSes, you can try to use a virtual machine. More specifically, 114 | 115 | - Windows: WSL2 would work. Also, Hyper-V, VirtualBox, and VMware are available. 116 | - Mac: If you use Intel Mac, Docker for Mac would work. If you use Arm mac (M1/M2), then you can try to use [utm](https://mac.getutm.app/) to emulate the entire x86_64 environment, though the overhead of full system emulation is huge, and some tests may not pass. So we recommend preparing other environments. 117 | 118 | Some tasks are doable in [Github Codespaces](https://github.com/features/codespaces), which are free for students. 119 | However, some tasks are not doable as they require the kernel's permission. 120 | 121 | Each task gives more details information on runnable environments. 122 | Note that only the test results on CI count toward grading. 123 | 124 | ## Grades 125 | 126 | Using [this script](https://gist.github.com/HE7086/87025cbcf622898558ba6674658719e3), grades are computed as follows: 127 | 128 | |From| To|Grade|Interval| 129 | |----|---|-----|-----| 130 | | 0 |100| 5.0 | 100 | 131 | |101 |112| 4.7 | | 132 | |113 |124| 4.3 | | 133 | |125 |148| 4.0 | | 134 | |149 |163| 3.7 | | 135 | |164 |178| 3.3 | | 136 | |179 |193| 3.0 | | 137 | |194 |205| 2.7 | 12 | 138 | |206 |217| 2.3 | | 139 | |218 |229| 2.0 | | 140 | |230 |238| 1.7 | 9 | 141 | |239 |245| 1.3 | 7 | 142 | |246 |250| 1.0 | 5 | 143 | 144 | ## Communication Medium 145 | 146 | We will use the official [Zulip chat](https://zulip.in.tum.de/) server hosted by TUM for all communication. 147 | 153 | 154 | ## Other resources 155 | 156 | - [Youtube playlist](https://www.youtube.com/playlist?list=PLfKm1-FQibbB3U8jBJ5-mF3jmH0aCiQ7V) 157 | - [Bugtracker](https://github.com/ls1-sys-prog-course/docs/issues) 158 | - [Docker image](https://github.com/orgs/ls1-courses/packages/container/package/ls1-runner) 159 | - [The previous semester (WiSe24)](https://github.com/ls1-sys-prog-course-archive-WiSe24/docs) 160 | - NOTE: The course material is being kept updated; therefore, the old version has differences. 161 | 162 | ## Contact 163 | 164 | We *strongly* prefer Slack for all communications. For any further questions/comments, please contact the course organizer(s): 165 | 166 | - [Anatole Lefort](https://anatolelefort.net/) 167 | - [David Schall](https://dhschall.github.io/) 168 | - [Prof. Bhatotia](https://dse.in.tum.de/bhatotia/) 169 | -------------------------------------------------------------------------------- /slides/00-introduction.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ls1-sys-prog-course/docs/6e17f983ee6ff2e2c69bd36f18f4b93ab9d76528/slides/00-introduction.pdf -------------------------------------------------------------------------------- /slides/01-system_calls.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ls1-sys-prog-course/docs/6e17f983ee6ff2e2c69bd36f18f4b93ab9d76528/slides/01-system_calls.pdf -------------------------------------------------------------------------------- /slides/02-files.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ls1-sys-prog-course/docs/6e17f983ee6ff2e2c69bd36f18f4b93ab9d76528/slides/02-files.pdf -------------------------------------------------------------------------------- /slides/02-fuse.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ls1-sys-prog-course/docs/6e17f983ee6ff2e2c69bd36f18f4b93ab9d76528/slides/02-fuse.pdf -------------------------------------------------------------------------------- /slides/03-processes.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ls1-sys-prog-course/docs/6e17f983ee6ff2e2c69bd36f18f4b93ab9d76528/slides/03-processes.pdf -------------------------------------------------------------------------------- /slides/04-concurrency.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ls1-sys-prog-course/docs/6e17f983ee6ff2e2c69bd36f18f4b93ab9d76528/slides/04-concurrency.pdf -------------------------------------------------------------------------------- /slides/05-memory_management.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ls1-sys-prog-course/docs/6e17f983ee6ff2e2c69bd36f18f4b93ab9d76528/slides/05-memory_management.pdf -------------------------------------------------------------------------------- /slides/06-network_programming.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ls1-sys-prog-course/docs/6e17f983ee6ff2e2c69bd36f18f4b93ab9d76528/slides/06-network_programming.pdf -------------------------------------------------------------------------------- /slides/07-performance.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ls1-sys-prog-course/docs/6e17f983ee6ff2e2c69bd36f18f4b93ab9d76528/slides/07-performance.pdf -------------------------------------------------------------------------------- /slides/08-llvm.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ls1-sys-prog-course/docs/6e17f983ee6ff2e2c69bd36f18f4b93ab9d76528/slides/08-llvm.pdf -------------------------------------------------------------------------------- /slides/preliminary_meeting.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ls1-sys-prog-course/docs/6e17f983ee6ff2e2c69bd36f18f4b93ab9d76528/slides/preliminary_meeting.pdf --------------------------------------------------------------------------------