Language Runtimes & Concurrency Models book cover

Your technical library

Language Runtimes & Concurrency Models

12 modules · 75 topics

About this book
Concepts · Language Runtimes & Concurrency Models

Language Runtimes & Concurrency Models

Why does a Python service not get faster with more threads? Why does a Go service's tail latency move when its heap grows, a Java service run slowly for its first minute, or a Node process stall while one handler parses a large JSON body? Each answer is a design decision inside the language runtime, with a cost that some other runtime chose not to pay. This course teaches those decisions on three axes — how code is executed, how memory is reclaimed, and how concurrent work is expressed and scheduled — with CPython, HotSpot, V8, Go, Rust and the BEAM (Erlang's virtual machine) as reference points, so you can place any runtime, even one you have never used, on the same map. It builds on Operating Systems and Data Structures, and starts where the kernel's mechanisms stop.

Execution comes first: interpreters and virtual machines, object models and inline caching, and just-in-time and ahead-of-time compilation. Then memory: garbage collection: foundations, generational and concurrent collection, and memory management without a tracing collector, which decides object lifetimes before the program runs — in the compiler, in the type system, or by grouping objects that die together. Then concurrency: runtime threads and schedulers, async/await and event loops, message passing, supervision and structured concurrency, and global interpreter locks. Language memory models ties the three axes together, and runtimes as points in the design space closes the course by placing each runtime on the map and choosing one for a workload.

75 of 75 topics are authored. Read in dependency order. Planned lessons are labelled and excluded from progress; references cover authored material.

Course map

Read at your own pace. Each topic is one continuous page; mark it done as you finish.

Start with 01.1 · Bytecode: flattening the tree into an instruction streamReview what you have finished