COL331 Operating Systems
2023-2024 Sem II
This course introduces the design and implementation of operating systems. In particular, we will slowly build the xv6 OS from scratch. Students should feel comfortable with hacking through an OS after having done this course.
Course Information
- Prerequisites: COL106 and COP290.
Note: The course includes programming assignments and thus expects proficiency with systems programming and debugging.
- Credits: 3-0-4
- Slot: K, Tuesday 5-6pm, Wednesday 12-1pm, Friday 5-6pm
- Lecture hall: LH108
- TAs:
- Amaiya Singhal:
- Kotikala Raghav:
- Naman Garg:
- Sai Kaushik S:
- Sathya Pramod Batni:
- Satyam Jay: anz238224 AT iitd.ac.in
- Subharshi Roy:
- Vedant Sharma:
- Reading material:
- Operating systems: three easy pieces
- xv6 book
- Intel Software developer manuals
- Slides and the OS
- Lectures might link to more reading material.
Grading criteria
- 20% quizzes
- 30% lab exams
- 25% minor exam
- 25% major exam
- Upto 5% errata participation (bonus, optional)
Labs
- Lab 1: mouse driver, disk scheduling
- Lab 2: crash consistency, fsck
- Lab 3: system call and scheduling, valgrind
- Lab 4: page replacement
Policies
- Ethics: Please re-read IITD honour code. Academic dishonesty will earn you an F grade and will get a referral to the department’s plagiarism committee. Why should I not cheat?
- Labs: Labs need not be submitted. You can practice them in groups of your liking. Afterwards, we will take an in-person lab exam where you might implement small extensions to the lab/answer questions related to the lab. There will be no makeup lab exams, we will count the scores from your best (n-1) lab exams where n is the total number of lab exams.
- Attendance: Attendance will be through Acadly.
- Quizzes: Quizzes will be surprise, taken in class using Moodle. There will be no make up quizzes. We will count the scores from your best (n-1) quizzes where n is the total number of quizzes.
- Audit criteria: 60% or more marks in total. 60% or more marks in major+minor exams. Attendance over 75%.
- Errata participation: You can send pull requests to remove dead code, fix bugs and other grammatical mistakes, to receive upto 5% of bonus marks. These marks can only be used to improve grades D and above i.e, they cannot be used to move from grade F to grade D and they cannot be used to move from grade NF to NP.
- Discussions should be done exclusively on Piazza. Please don’t send individual mails.
- Makeup minor exam: For those who miss the minor exam, we will hold an extra minor towards the end of the course. Reminor will be much harder than the original minor exam.
Tentative topics
We will build an OS from scratch. We will learn topics as and when we add them to our OS. The topics will tentatively be covered in the following order:
- Booting: Bootloader, ELF format
- Input-output: Programmable interrupt controllers, traps, interrupt descriptor table
- File system: FS layout, buffer cache layer, name layer, crash consistency, devices as files
- Processes: memory segmentation, rings, process table, context switching, scheduling, system calls, exec system call
- Memory virtualization: memory hierarchy, address translation mechanism, demand paging, page replacement, thrashing, fork system call
- Concurrency and parallelism: data races, different types of locks
- Shell: pipes, IO redirection
Whenever we implement something, we will also study some alternate implementations. Following topics may be covered without seeing their implementations.
- Beyond OS: virtualization, shadow paging
- Glimpse into OS research: power management, unikernels, persistent memory, transparent huge pages, disaggregated OS
Disclaimer: Actual course contents may differ.
Schedule
| Week | Tuesday | Wednesday | Friday | Other |
|---|---|---|---|---|
| 1 | . | . | 2 Jan. LEC 1: Introduction Resource management, high-level services, protection and isolation. |
. |
| 2 | 6 Jan. LEC 2: Introduction Concurrency and data races, why study OS? |
7 Jan. LEC 3: x86 ISA |
9 Jan. LEC 4: x86 ISA |
10 Jan. LEC 5: |
| 3 | 13 Jan. LEC 6: |
16 Jan. LEC 7: |
. | |
| 4 | 20 Jan. LEC 8: |
21 Jan. LEC 9: |
23 Jan. LEC 10: |
. |
| 5 | 27 Jan. LEC 11: |
28 Jan. LEC 12: |
30 Jan. LEC 13: |
. |
| 6 | 3 Feb. LEC 14: |
4 Feb. LEC 15: |
6 Feb. LEC 16: |
. |
| 7 | 10 Feb. LEC 17: |
11 Feb. LEC 18: |
13 Feb. LEC 19: |
. |
| 8 | 17 Feb. LEC 20: |
18 Feb. LEC 21: |
Mid term |
. |
| 9 | Mid term |
Mid term |
Mid term |
. |
| 10 | 3 Mar. LEC 22: |
Holi |
6 Mar. LEC 23: |
. |
| 11 | 10 Mar. LEC 24: |
11 Mar. LEC 25: |
13 Mar. LEC 26: |
. |
| 12 | 17 Mar. LEC 27: |
18 Mar. LEC 28: |
20 Mar. LEC 29: |
. |
| 13 | 24 Mar. LEC 30: |
25 Mar. LEC 31: |
27 Mar. LEC 32: |
. |
| 14 | 1 Apr. LEC 33: |
. | ||
| 15 | 7 Apr. LEC 34: |
8 Apr. LEC 35: |
10 Apr. LEC 36: |
. |
| 16 | 14 Apr. LEC 37: |
15 Apr. LEC 38: |
17 Apr. LEC 39: |
. |
| 17 | 21 Apr. LEC 40: |
22 Apr. LEC 41: |
24 Apr. LEC 42: |
. |