Operating Systems: A Linux Kernel-Oriented Perspective

Smruti R. Sarangi

(The full version of the book is to be released in mid 2025)

Creative Commons CC-BY-ND 4.0  license  
Please contact me for translating the book into other languages.


Slides Link
Introduction
Basics of Computer Architecture
Processes
System calls, Interrupts and Signals
Scheduling and Synchronization
Memory Systems
The I/O Systems, Storage Devices and Device Drivers
Security and Virtualization

Homeworks/Lab Assignments:

  Easy Hard
A1 Link Link
A2 Link Link
A3 Link Link

Guide to Linux kernel hacking by Abhishek Safui.

Lectures and Slides:

Chapter
Topics
Details
1 Introduction What is an OS?
Overview of the Linux kernel's codebase
Overview of the book
2 Basics of Computer Architecture

1. Privileged and non-privileged registers; system calls, exceptions and inerrupts; context switching

2. Timer chips and basic x86 assembly
3. x86 memory addressing, compiling, linking and loading
4. Virtual memory and paging
5. Segmentation and I/O
3 Processes 1. Process states
2. Kernel stack + process priorities
3. mm_struct, B+ tree, maple tree, anonymous and file-backed virtual memory
4. Pids and namespaces
5. Creating and destroying processes
6. Overview of the Context Switch Process
7. Details of the Context Switch Process

References

  Static and dynamic linking Static and dynamic linking
Links: link1, link2, link3 [very detailed]
  Processes and related data structures pids, namespaces, pid structure, radix trees, and bitmaps
  Interrupt handling and signals IRQs, LAPIC, I/O APIC, IRQ domains, the irq_desc data structure link
  Spin locks and Mutexes Additional reference: pointer to the paper on ticket locks and MCS locks
[Paper] Algorithms for Scalable Synchronization on Shared-Memory Multiprocessors
John M. Mellor-Crummey, Michael L. Scott, ACM TOCS, 1991 [link]
  Introduction to Scheduling Youtube video
  Real Time Systems

EDF
Proof of the optimality of EDF

RMS
[Paper] Scheduling Algorithms for Multiprogramming in a Hard-Real-Time Environment, Liu and Layland, Journal of the ACM, 1973

[Paper] The Rate Monotonic Scheduling Algorithm: Event Characterization and Average Case Behavior, Lehoczky, Sha, and Ding. IEEE Real Time Systems Symposium, 1989

DMS
[Paper] Deadline Monotonic Scheduling, Audsley, 1990
  Security

Code for the buffer overflow attack: link
Code reuse attack: link
Stuxnet worm: link

Linux page directory and page access

  I/O Systems: Introduction I/O Protocols Youtube Video
 

Storage devices
Youtube video

  Kernel memory allocators Youtube Video Slab, Slub, and Buddy allocation