Operating Systems Intermediate
Lesson Promise
By the end of this lesson, you will understand how system calls bridge user and kernel mode, how locks and semaphores prevent race conditions, and how the OS manages concurrent threads and virtual memory.
Narration Draft
Part 1 — System Calls (6:00) What a syscall is, the mode switch cost, common patterns (fork/exec, open/read/write), file descriptors, and zero-copy optimizations.
Part 2 — Process Management (5:00) How the kernel tracks processes via PCBs. The five process states and transitions. Context switching cost.
Part 3 — Concurrency (8:00) Race conditions, mutexes, semaphores, condition variables. The producer-consumer pattern. Deadlock conditions.
Part 4 — Virtual Memory (6:00) How the OS gives each process its own address space. Page tables, TLB, page faults. Demand paging.
Part 5 — Threads (5:00) How threads share memory, creation cost vs processes, the thread-pool pattern.
Visual Sequence
- User mode → kernel mode → user mode (syscall trap)
- Process state transition diagram
- Context switch: save registers A, restore registers B
- Race condition: two threads writing to shared variable
- Mutex lock/unlock: one thread in critical section, others blocked
- Page table: virtual address → physical address
- Page fault: TLB miss → kernel → load page from disk
Companion Material
Related articles
Concurrency Basics: Locks and Semaphores
How threads share memory safely using mutexes, semaphores, condition variables, and the race conditions they prevent.
Deadlocks: Conditions and Prevention
How deadlocks form under four necessary conditions, and the strategies (prevention, avoidance, detection) to manage them.
System Calls: The User-Kernel Boundary
How applications request kernel services through system calls, the cost of mode switching, and common syscall patterns.
More in Operating Systems
Operating Systems Advanced: Scheduling, Deadlocks, and Concurrency
Deep dive into CPU scheduling algorithms, deadlock prevention and detection, and advanced concurrency patterns for reliable systems.
DetailsOperating Systems Foundations
A beginner walkthrough of what an OS does, how processes work, and how processes differ from threads.
DetailsWhat Happens During a read() System Call
A planned trace separates the userspace wrapper, kernel entry, descriptor lookup, cached data, I/O wait, and return value.
DetailsNew lessons by email
Get new articles and notes on the systems behind everyday software.
One technical dispatch per week. No noise.
Not started
Sign in to save your learning progress.