Operating Systems
About
- Module: Operating Systems (CO-562)
- Semester: Fall 2024
- Prerequisites: Algorithms and Data Structures (CH-231)
- Instructor: Jürgen Schönwälder
- Office Hours: Monday, 11:15-12:30 (Research I, Room 87)
- TA (Group A): Borsos, Matheas-Roland
- TA (Group B): Dominguez Ham, Santiago
- TA (Group C): Jovanoska, Dora
- TA (Group D): Kenesbek, Serzhan
- TA (Group E): Murza, Dmytro
- Lecture: Tuesday, 14:15-15:30 (ICC-East Wing)
- Tutorial: Tuesday, 15:45-17:00 (ICC-East Wing)
- Lecture: Thursday, 15:45-17:00 (RLH-172)
- TA Tutorial: Thursday, 19:30-20:30 (West Hall 2)
- 1st Module Exam: Thursday, 2024-12-12, 17:00-19:00, IRC Eastwing + Conference Hall
- 2nd Module Exam: Thursday, 2025-01-30, 17:00-19:00, TBD
Content and Educational Aims
This module introduces concepts and principles used by operating systems to provide programming abstractions that enable an efficient and robust execution of application programs. Students will gain an understanding of how an operating system kernel manages hardware components and how it provides abstractions such as processes, threads, virtual memory, file systems, and inter-process communication facilities. Students learn the principles of event-driven and concurrent programming and the mechanisms that are necessary to solve synchronization and coordination problems, thereby avoiding race conditions, deadlocks, and resource starvation. The Linux kernel and runtime system will be used throughout the course to illustrate how key ideas and concepts have been implemented and how application programs can use them.
Intended Learning Outcomes
By the end of this module, students will be able to
- explain the differences between processes, threads, application programs, libraries, and operating system kernels;
- describe well-known mutual exclusion and coordination problems;
- use semaphores to achieve mutual exclusion and solve coordination problems;
- use mutual exclusion locks and condition variables to solve synchronization and coordination problems;
- illustrate how deadlocks can be avoided, detected, and resolved;
- summarize the different mechanisms to realize virtual memory and their trade-offs;
- solve basic inter-process communication problems using signals and pipes;
- use socket inter-process communication primitives;
- multiplex I/O activities using suitable system calls and libraries;
- describe file system programming interfaces and the design of file systems at the operating system kernel level;
- explain how memory mapping can improve I/O performance;
- restate the functionality of a linker and the difference between static linking and dynamic linking;
- outline how different device types are supported by Unix-like kernels;
- discuss virtualization mechanisms such as containers or virtual machines.
Resources
Literature
- Abraham Silberschatz, Peter B. Galvin, Greg Gagne: "Applied Operating System Concepts", John Wiley, 2000
- Andrew S. Tanenbaum, Herbert Bos: "Modern Operating Systems", Prentice Hall, 4th edition, Pearson, 2015
- William Stallings: "Operating Systems: Internals and Design Principles", 8th edition, Pearson, 2014
- Robert Love: "Linux Kernel Development", 3rd edition, Addison Wesley, 2010
- Robert Love: "Linux System Programming: Talking Directly to the Kernel and C Library", 2nd edition, O'Reilly, 2013
- Allen B. Downey: "The Little Book of Semaphores", Version 2.2.1, Green Tea Press, 2016
- Sandra Loosemore et al.: The GNU C Library Reference Manual, Free Software Foundation, 2023
Schedule
Tue 14:15 | Thu 15:45 | Topics |
---|---|---|
2024-09-03 | 2024-09-05 | Introduction, Library Calls vs System Calls |
2024-09-10 | 2024-09-12 | Architectures, Hardware, Memory Segments |
2024-09-17 | 2024-09-19 | Processes, Threads |
2024-09-24 | 2024-09-26 | Synchronization (Mutual Exclusion, Semaphores) |
2024-10-01 | Synchronization (Condition Variables, Monitors) | |
2024-10-08 | 2024-10-10 | Synchronization (Examples), Deadlocks |
2024-10-15 | 2024-10-17 | Scheduling, Linking |
2024-10-22 | 2024-10-24 | Memory Management (Segmentation, Paging, Working Sets) |
2024-10-29 | Local Communication (Signals, Pipes) | |
2024-11-05 | 2024-11-07 | Global Communication (Sockets) |
2024-11-12 | 2024-11-14 | Communication Programming (Event Loops) |
2024-11-19 | 2024-11-21 | File Systems |
2024-11-26 | 2024-11-28 | Block and Character Devices |
2024-12-03 | 2024-12-05 | Virtualization, Virtual Machines, Container |
Assignments
Date/Due | Name | Topics |
---|---|---|
2024-09-13 | Sheet 01 | system vs library calls, system call errors, env (coding - exec) |
2024-09-20 | Sheet 02 | xargs (coding - fork/exec/wait) |
2024-09-27 | Sheet 03 | perfect digital invariant numbers (coding - pthreads, mutexes) |
2024-10-04 | Sheet 04 | 100 prisoners problem (coding - pthreads, mutexes) |
2024-10-11 | Sheet 05 | energy drinks (semaphores, coding - pthreads, mutexes, condition variables) |
2024-10-18 | Sheet 06 | safe states, deadlock detection, scheduling strategies |
2024-10-25 | Sheet 07 | positioning algorithms, buddy system, replacement algorithms |
2024-11-01 | Sheet 08 | address spaces, paging and page tables, word count (coding - mmap) |
2024-11-08 | Sheet 09 | multiple-choice quiz on computer science (coding - pipes, signals) |
2024-11-15 | Sheet 10 | word guessing game server (coding - sockets, blocking, forking, threaded) |
2024-11-22 | Sheet 11 | word guessing game server (coding - siockets, event-driven) |
2024-11-29 | ||
2025-01-15 | extra sheet for students who did not manage to obtain 50/120 points |
Rules
The grade is determined by the final exam (100%). To attend the final exam, it is necessary to collect 50 points in weekly assignments. There are ten regular assignments and two bonus assignments during the semester and there is another bonus assignment before the second module exam. Each assignment is worth 10 points. Hence, students have to obtain 50/120 points during the semester to qualify for the first module exam or 50/130 points to qualify for the second module exam. Once a module achievement has been obtained, it remains valid for all subsequent module exams.
Electronic submission is the preferred way to hand in homework solutions. Please submit documents (plain ASCII/UTF-8 text or PDF, no Word) and your source code (packed into a tar or zip archive after removing all binaries and temporary files) via the online submission system. If you have problems, please contact one of the TAs. Solutions for assignments may need to be defended in an oral interview.
Late submissions will not be accepted. In case you are ill, you have to follow the procedures defined in the university policies to obtain an official excuse. If you obtain an excuse, the new deadline will be calculated as follows:
- Determine the number of days you were excused until the deadline day, not counting excused weekend days.
- Determine the day of the end of your excuse and add the number of day you obtained in first step. This gives you the initial new deadline.
- If the period between the end of your excuse and the new deadline calculated in the second step includes weekend days, add them as well to the new deadline. (Iterate this step if necessary.)
For any questions stated on assignment sheets or exam sheets, we by default expect a reasoning for the answer given, unless explicitly stated otherwise.
Students must submit individual solutions. If you copy material verbatim from the Internet or other sources, you have to provide a proper reference. If we find your solution text on the Internet without a proper reference, you risk to lose your points. Any cheating cases will be reported to the registrar. In addition, you will lose the points (of course). These rules also apply to any generative AI tool, such as ChatGPT.
- You are discouraged from using AI tools UNLESS under direct instruction from your instructor to do so.
- If AI is permitted to be used, you must clearly state how AI was used in completing the assignments. No more than 25% of an assignment should be created with AI if the instructor gives permission for its use.
- Note that the material generated by AI programs may be inaccurate, incomplete, or otherwise problematic. Their use may also stifle your own independent thinking and creativity. Accordingly, reduction in the grade is likely when using AI. Rather use your own brain.
Any programs, which have to be written, will be evaluated based on the following criteria:
- correctness including proper handling of error conditions
- proper use of programming language constructs
- clarity of the program organization and design
- readability of the source code and any output produced
Source code must be accompanied by a README file providing an overview of the source files and giving instructions how to build the programs. A suitable Makefile (or CMakeLists.txt) is required if the build process involves more than a single source file. Source files must be submitted in a format understood by compilers.
If any part of these rules are confusing or uncertain, please reach out to your instructor for a conversation before submitting your work.
If you are unhappy with the grading, please report immediately (within one week) to the TAs. If you can't resolve things, contact the instructor. Problem reports which come late, that is after the one-week period, are not considered anymore.