Roadmap › 0. Fundamentals › Step 1
CPU
How Computers Work — CPU, Memory, OS, Processes and Threads
What happens inside a computer when your program runs — bits and bytes, the CPU and instruction cycle, the memory hierarchy (registers, cache, RAM, disk), stack vs heap, virtual memory and paging, the operating system, processes and threads, scheduling, concurrency problems, compilation vs interpretation, and how all of it shows up in .NET and SQL Server.
Quick revision for interview day. Print it or save it as a PDF.
Speed ladder (approx.)
Register < 1 ns · L1 ~1 ns · L3 ~10–20 ns · RAM ~100 ns · SSD ~50 µs · HDD ~5 ms · same-DC network ~0.5 ms · cross-continent ~150 ms.
Stack vs heap
Stack: per thread, frames, locals, fast, auto-freed, ~1 MB, overflow on deep recursion. Heap: shared, objects, GC-managed in .NET, leaks = still referenced.
Process vs thread
Process = own address space, isolated. Thread = path inside a process, shares heap, own stack. Context switch = save/restore thread state.
Concurrency problems
Race → lock / Interlocked / immutability. Deadlock → same lock order, short locks, timeouts, no .Result. Starvation → fair scheduling, async.
Code to execution
C# → Roslyn → IL → JIT (tiered) → machine code; OS loads process, CLR manages memory with GC; I/O via system calls.