Operating Systems
About
- Module: Operating Systems (CO-562)
- Semester: Fall 2021
- Instructor: Jürgen Schönwälder
- Office Hours: Monday, 11:15-12:30 (Research I, Room 87)
- TA (Group A): Biehl, Jose Ignacio
- TA (Group B): Karki, Aabishkar
- TA (Group C): Merkaj, Edli
- Class: Tuesday, 15:45-17:00 (RLH-172 CNLH)
- Class: Tuesday, 17:15-18:30 (RLH-172 CNLH)
- Class: Thursday, 15:45-17:00 (RLH-172 CNLH)
- Tutorial: Monday, 20:45-22:15 (TAs, Teams)
- 1st Module Exam: Thursday, 2021-12-16, 16:00-18:00 (SCC Halls 1+2)
- 2nd Module Exam: Thursday, 2022-01-27, 14:00-16:00 (ICC-West Wing Conference Hall)
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
Books
- 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
Links
Schedule
Tue 15:45 | Thu 15:45 | Topics |
---|---|---|
2021-09-02 | Introduction | |
2021-09-07 | 2021-09-09 | Libraries, Function Call, System Calls, Tools |
2021-09-14 | 2021-09-16 | Hardware, Memory Segments, Processes, Threads |
2021-09-21 | 2021-09-23 | Synchronization (Mutual Exclusion, Semaphores) |
2021-09-28 | 2021-09-30 | Synchronization (Condition Variables, Monitors) |
2021-10-05 | 2021-10-07 | Synchronization (Examples), Deadlocks |
2021-10-12 | 2021-10-14 | Scheduling, Linking |
2021-10-19 | 2021-10-21 | Memory Management (Segmentation, Paging, Working Sets) |
2021-10-26 | 2021-10-28 | Local Communication (Signals, Pipes) |
2021-11-02 | 2021-11-04 | Global Communication (Sockets) |
2021-11-09 | 2021-11-11 | Communication Programming (Event Loops) |
2021-11-16 | 2021-11-18 | File Systems |
2021-11-23 | 2021-11-25 | Block and Character Devices |
2021-11-30 | 2021-11-02 | Virtualization, Virtual Machines, Container |
Distributed Systems |
Assignments
Date/Due | Name | Topics |
---|---|---|
2021-09-16 | Sheet #01 | library and system calls, process environment (env) |
2021-09-23 | Sheet #02 | memory segments, processes (xargs) |
2021-09-30 | Sheet #03 | fork, semaphores (some old exam questions) |
2021-10-07 | Sheet #04 | multi-threaded 100 prisoners problem (pthreads and mutexes) |
2021-10-14 | Sheet #05 | deadlock prevention, avoidance, detection |
2021-10-21 | Sheet #06 | scheduling strategies, linking |
2021-10-28 | Sheet #07 | positioning algorithms, buddy system, replacement algorithms |
2021-11-04 | Sheet #08 | pipes and signals (math quiz program) |
2021-11-11 | Sheet #09 | sockets (word guessing game server, blocking, forking, threaded) |
2021-11-18 | Sheet #10 | sockets (word guessing game server, event-driven) |
2021-11-25 | Sheet #11 | file system semantics, basic permissions, index node file systems |
2021-12-02 | Sheet #12 | redundant arrays of independent disks, logical volume management |
2022-01-15 | Sheet #13 | extra sheet for students who did not manage to obtain 50/120 points |
Rules
The grade is determined by the final exam (100%). In order to sit for the final exam, it is necessary to have 50% of the regular assignments correctly solved. There are 10 regular assignments and 2-3 bonus assignments.
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.
Late submissions will not be accepted. Homeworks may need to be defended in an oral interview. 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 solutions individually. 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).
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 is required if the build process involves more than a single source file.
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.