Pidoku
3Computer Foundations
On this page

Computer Foundations

Module 311 lessons~11h 45m

Lessons, in order

3.a CPU ArchitectureA CPU (central processing unit) is a machine that repeatedly fetches an instruction from memory, decodes what it means, executes it, and writes the result. A modern core does these four … 1h 3.b Caches and the Memory HierarchyA computer's memory is not one thing. It is a hierarchy: a stack of memories, each larger and slower than the one above it, arranged so that the data a core uses most often sits closest to … 1h 15m 3.c RAM, DRAM, and NUMADRAM is main memory: cheap, large and slow compared with caches. NUMA (Non-Uniform Memory Access) is what you get on servers with more than one socket, or one very large socket split into … 1h 3.d SIMD and VectorizationSIMD = Single Instruction, Multiple Data. One instruction works on a whole vector of numbers at once instead of one number. 1h 3.e Threads, Processes, and Context SwitchingThree ideas from operating systems, defined plainly: 1h 3.f Memory Allocation and Virtual MemoryThis lesson is the conceptual ancestor of PagedAttention (12.l). Read it carefully; when you meet paged KV cache you will recognize every idea here. 1h 15m 3.g Storage and Model LoadingBefore a model can answer anything, its weights — tens to hundreds of gigabytes, over a terabyte for the largest MoE models — must travel from wherever they are stored into GPU memory. That … 1h 3.h OS SchedulingThe scheduler is the part of the operating system kernel that decides which thread runs on which core, and for how long. A thread is runnable when it has work to do and is only waiting for a … 45 min 3.i Linux for Inference EngineersThis is a practical command reference, organised by the question you are trying to answer. Work through it at a terminal, not by reading. Two terms used throughout: a PID is the number Linux … 1h 15m 3.j Containers, Namespaces, and cgroupsA container is not a virtual machine. A virtual machine runs its own operating system kernel; a container is just a normal Linux process on the host's kernel, with three things applied: 1h 3.k Syscalls and Profiling BasicsA syscall (system call) is how a program asks the kernel to do something it is not allowed to do itself: read a file, send network data, start a thread, wait on a lock, talk to the GPU … 1h 15m

About this module

The machine underneath the GPU: CPUs, caches, RAM and NUMA, SIMD, threads, virtual memory, storage and model loading, the OS scheduler, Linux, containers and profiling. Inference servers are ordinary programs on ordinary computers before they touch a GPU, and most mysterious slowdowns live here.

Lessons#

#LessonTime
3.aCPU Architecture60 min
3.bCaches and the Memory Hierarchy75 min
3.cRAM, DRAM, and NUMA60 min
3.dSIMD and Vectorization60 min
3.eThreads, Processes, and Context Switching60 min
3.fMemory Allocation and Virtual Memory75 min
3.gStorage and Model Loading60 min
3.hOS Scheduling45 min
3.iLinux for Inference Engineers75 min
3.jContainers, Namespaces, and cgroups60 min
3.kSyscalls and Profiling Basics75 min

Previous: The Physics of Inference · Next: GPU Architecture

↑↓ navigate↵ openesc close

100% drag to pan · scroll or pinch to zoom · double-click to zoom in