Operating Systems Knowledge Base
A comprehensive reference covering OS fundamentals from first principles through to Linux internals, with a Java/JVM lens throughout.
📚 Topics Covered
| # | Topic | Key Concepts |
|---|---|---|
| 1 | Processes & Threads | PCB, fork/exec, IPC, Java threads, Virtual Threads |
| 2 | CPU Scheduling | FCFS, RR, SJF, Linux CFS, NUMA scheduling |
| 3 | Memory Management | Paging, TLB, demand paging, page replacement, JVM heap |
| 4 | Synchronization & Deadlocks | Mutex, semaphore, monitors, Coffman conditions, JUC |
| 5 | File Systems & I/O | Inodes, journaling, RAID, VFS, Java NIO |
| 6 | Linux Internals & Syscalls | Kernel architecture, epoll, signals, namespaces, cgroups |
| 7 | Virtual Memory Deep Dive | Address spaces, ASLR, huge pages, NUMA, OOM killer |
| 8 | Networking & IPC | TCP internals, sockets, epoll, zero-copy, Netty patterns |
| 9 | Interview Questions | Comprehensive Q&A across all topics |
🎯 Who This Is For
- Backend Engineers preparing for system design or technical interviews.
- Java/Spring Developers wanting to understand what happens under the hood.
- DevOps/SRE engineers diagnosing performance issues on Linux.
- CS Students needing a practical supplement to textbook theory.
🔑 Quick Reference
Processes
ps aux # All processes
pstree -p # Process tree
strace -p <pid> # Trace syscalls
lsof -p <pid> # Open files
Memory
free -h # Memory overview
cat /proc/meminfo # Detailed stats
pmap -x <pid> # Process memory map
vmstat 1 # Virtual memory stats
CPU
top -H # Per-thread CPU
mpstat -P ALL 1 # Per-CPU stats
perf stat ./program # Perf counters
Disk I/O
iostat -xz 1 # Disk utilization
iotop # I/O by process
Network
ss -tlnp # Listening sockets
tcpdump -i eth0 # Packet capture
💡 Each page includes both theory and practical Java/Linux examples, plus interview Q&A at the end.
Advanced Editorial Pass: Operating Systems as Performance and Reliability Foundation
Senior Engineering Focus
- Connect OS abstractions directly to service-level behavior: latency, throughput, and tail risk.
- Model each layer boundary (CPU, memory, I/O, network) as a potential bottleneck and failure source.
- Use Linux primitives as operational tools, not just interview topics.
Failure Modes to Anticipate
- Treating kernel behavior as black-box noise during production incidents.
- Optimizing application code while ignoring scheduler, memory, and I/O contention.
- Lack of repeatable diagnostics playbooks across teams.
Practical Heuristics
- Define an OS-level observability baseline for every backend service.
- Correlate JVM/application metrics with CPU scheduling, paging, and I/O telemetry.
- Document incident triage order: process, memory, disk, network, then app logic.