2025-2026 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: cs5210598 AT iitd.ac.in
    • Kotikala Raghav: cs5210616 AT iitd.ac.in
    • Naman Garg: csy257544 AT iitd.ac.in
    • Sai Kaushik S: csz258470 AT iitd.ac.in
    • Sathya Pramod Batni: anz258217 AT iitd.ac.in
    • Subharshi Roy: anz258112 AT iitd.ac.in
    • Vedant Sharma: csy247553 AT iitd.ac.in
    • Parmohit Dev Singh: csy257548 AT iitd.ac.in
    • Dhruv Mishra: jcs252735 AT iitd.ac.in
  • Reading material:

Grading criteria

  • 20% quizzes
  • 30% lab exams
  • 25% minor exam
  • 25% major exam
  • Upto 10% 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%.
  • Bonus marks: In total, you can only get upto 10% of bonus marks. You can send pull requests to remove dead code, fix bugs and other grammatical mistakes, to receive upto 5% of bonus marks. You can also help transition more branches to our Rust rewrite, to receive upto 10% 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 Mon Tue Wed Thu Fri Other
1
02 Jan
LEC 1: Introduction
Resource management, high-level services, protection and isolation.
2
06 Jan
LEC 2: Introduction
Concurrency and data races, why study OS?
07 Jan
LEC 3: x86 ISA
General registers, eip, eflags, assembly.
09 Jan
LEC 4: x86 ISA
esp, ebp, gcc calling convention, objdump.
Sat: LEC 5: x86 ISA
ELF file format, loader, volatile keyword
3
13 Jan
LEC 6 cancelled
LEC 7 will be 2 hours
14 Jan
Makar Sankranti
16 Jan
LEC 7: Booting
PIO, MMIO, 16-bit mode, segmented and flat memory models, boot sequence, BIOS, Bootloader. Quiz 1
4
20 Jan
LEC 8: Booting
Code walkthrough
21 Jan
LEC 9: IO
Polling, interrupts, DMA, PICs, IDT.
23 Jan
LEC 10
Interrupt handling code walkthrough.
5
27 Jan
LEC 11: IO
Setting up IDT, HDD. Quiz 2
28 Jan
LEC 12: FS
Buffer cache code walkthrough. FS abstractions
30 Jan
LEC 13: FS
FAT, indexed file system
6
03 Feb
LEC 14: FS
04 Feb
Lab exam 1
06 Feb
LEC 15
7
10 Feb
LEC 16
11 Feb
LEC 17
13 Feb
LEC 18
8
17 Feb
LEC 19
18 Feb
LEC 20
20 Feb
Mid Term
9
24 Feb
Mid Term
25 Feb
Mid Term
27 Feb
Mid Term
10
03 Mar
LEC 21
04 Mar
Holi
06 Mar
LEC 22
11
10 Mar
LEC 23
11 Mar
LEC 24
13 Mar
LEC 25
12
17 Mar
LEC 26
18 Mar
LEC 27
20 Mar
LEC 28
13
24 Mar
LEC 29
25 Mar
LEC 30
27 Mar
LEC 31
14
31 Mar
Mahavir Jayanti
01 Apr
LEC 32
03 Apr
Good Friday
15
07 Apr
LEC 33
08 Apr
LEC 34
10 Apr
LEC 35
16
14 Apr
LEC 36
15 Apr
LEC 37
17 Apr
LEC 38
17
21 Apr
LEC 39
22 Apr
LEC 40
24 Apr
LEC 41