Operating Systems & Concurrency
Part of the Interview Prep Roadmap. Coverage ratings are explained there.
Operating Systems
Processes vs. threads, scheduling, memory management, and deadlocks.
Coverage: rich
Resources · OSTEP — Operating Systems: Three Easy Pieces — free textbook, the standard recommendation · Linux Journey
OS Fundamentals
- Role of the operating system
- Kernel space vs. user space
- System calls
Practice
- What an operating system is and does — Sonargaon University
- Kernels: monolithic vs. microkernel — Therap
- Virtualization vs. containers — Therap
- From source file to executable — Shanghai BD, with answer
- The major parts of a CPU — Shanghai BD, with answer
- DMA, byte order, coroutine, RISC, PCB — Shanghai BD, with answer
Processes & Threads
- Process lifecycle and states
- Process vs. thread
- Context switching
- Inter-process communication
Practice
- What a process is — Therap
- Context switching — Therap
- Monitoring a running process — Therap
CPU Scheduling
- Scheduling objectives
- FCFS, SJF, round robin, and priority scheduling
- Preemptive vs. non-preemptive scheduling
- Starvation and aging
Practice
- Why process scheduling exists — Shanghai BD
- Structure for round-robin CPU time-sharing — Brain Station 23
Memory Management
- Physical vs. virtual memory
- Paging and segmentation
- Page replacement algorithms
- Thrashing and locality
Practice
- Internal fragmentation — IUBAT
- The memory hierarchy — IUBAT
- How cache memory reduces misses — World University
Synchronization & Deadlocks
- Critical sections
- Mutexes and semaphores
- Deadlock conditions
- Prevention, avoidance, and detection
Practice
- Deadlocks, and how to prevent them — bKash
- A read-then-update race — Priyo, with answer
File Systems & I/O
- File system structure
- Inodes and directories
- Disk scheduling
Practice
- Hard links vs. soft links — Therap
- The Linux filesystem hierarchy — Therap
- File permissions — Therap
- chmod 777 but still cannot modify — Therap
Linux & the Shell
- Shells and common commands
- File permissions and ownership
- Users and processes
- Shell scripting
Practice
- What a shell is, and common shells — Therap
- cd, cp, ls, grep, mv — Therap
- Finding help on the command line — Therap
- Creating a user — Therap
- Creating a file — Therap
- Write a Bash script to find a directory — Therap, with answer
- Automate config updates across servers — Therap, with answer
Concurrency & Multithreading
Thread safety, race conditions, and synchronization — what can go wrong when multiple threads touch the same state.
Coverage: thin
Resources · Java Concurrency basics — Baeldung
Concurrency Fundamentals
- Concurrency vs. parallelism
- Thread lifecycle
- Shared mutable state
Practice
- When multithreading beats multiprocessing — Therap
- How single-threaded JavaScript stays async — Exabyting
- The event loop, and libuv underneath — Exabyting
Race Conditions & Synchronization
- Race conditions
- Mutual exclusion
- Locks, monitors, and atomic operations
- Designing a thread-safe class
Practice
- A read-then-update race on a field — Priyo, with answer
- Why naive Singleton is not thread-safe — Kite Games, with answer
Coordination Patterns
- Producer-consumer
- Reader-writer
- Thread pools
- Asynchronous and non-blocking patterns
Pitfalls
- Deadlock, livelock, and starvation
- Double-checked locking
- Performance cost of synchronization
Practice
- Deadlock, and how it is resolved — bKash