Skip to content
academia.sh

Unit 02 of 02

Runtime and Performance

The global interpreter lock, threads and Ractors, scaling with forked worker processes and environment variables, object allocation and the garbage collector, finding the hot path by counting calls, content-digested assets and a release switch that can be rolled back.

Published Updated

Lessons

  1. 01 The Concurrency Model The same code with the same inputs giving different numbers is an order problem. The lesson measures how a switch between a read and a write loses a count, how a mutex lets the result come from the code, and how a Ractor removes shared state. 8 min read
  2. 02 Process-Based Scaling The worker count comes from the environment, not from the code. The lesson measures that the memory of a forked process does not reach its parent, that work can be sliced and collected through a pipe, and that the worker count is read from an environment variable and the core count. 9 min read
  3. 03 Memory Management While the same job runs with the same code, how many objects a block allocates is also a measurement question. The lesson measures allocation counts, the garbage collector's visible counters, and why the first run differs from the later ones. 3 min read
  4. 04 Profiling Which method of a program is the hot path is asked with call counts, and the call count belongs to the code. The lesson counts calls with TracePoint, measures how a fix changes the count, and shows why a ranking by time depends on the environment. 8 min read
  5. 05 Deployment What is inside a release that goes to production is asked with three separate questions. The lesson measures the asset name, the release directory, and the release manifest one by one, tests an atomic switch and a rollback with a symbolic link, and gathers the course's nine measurements in one table. 11 min read

Start typing to search.

↑↓ ↵ Esc navigate · open · close