The Runtime Theory
medium · 5h · 17 steps

Code to Machine: Execution Foundations

Connect algorithm choices to data representation, compilation, CPU memory behavior, operating-system services, and runtime scheduling.

Curriculum (17 steps)

1

Learn to connect an algorithm's correctness argument to the comparisons, branches, and memory accesses it performs.

Start→
2

Follow the invariant, midpoint calculation, comparison, and narrowed memory range in a lower-bound search.

Start→
3

Step through the invariant and branch decisions that shrink a sorted search range to one answer.

Start→
4

Compare arrays, hash tables, trees, heaps, and graphs by the operations they make cheap and the memory accesses they require.

Start→
5

Follow a key through hashing, bucket selection, collision handling, equality checks, and the returned value.

Start→
6

Follow compilation, linking, loading, address spaces, and the first instructions that turn a program into a running process.

Start→
7

Follow source through translation and linking, then watch the operating system create the process that begins execution.

Start→
8

Follow arguments, calling-convention state, a return address, a stack frame, and the return value across a native call.

Start→
9

Follow a small program through lexing, parsing, semantic checks, intermediate forms, code generation, and runtime execution.

Start→
10

Follow a small arithmetic expression from characters to tokens, syntax tree, checked representation, and executable form.

Start→
11

Follow an instruction through a pipelined processor and explain why cache locality often matters more than operation count.

Start→
12

Follow a processor load through cache tags, a lower-level lookup, a cache-line fill, and the instruction that was waiting.

Start→
13

Compare row-wise and column-wise matrix traversal and connect address order to cache-line reuse and measured misses.

Start→
14

Understand how processes, virtual memory, scheduling, files, and system calls let programs share a machine.

Start→
15

Follow a Linux read request through the C library boundary, file descriptor lookup, page cache, and returned byte count.

Start→
16

Separate JavaScript callbacks, event-loop scheduling, operating-system I/O, and worker-pool tasks in an asynchronous program.

Start→
17

Follow synchronous JavaScript, a pending promise, an I/O completion, and the queued continuation without treating await as a new thread.

Start→