Virtual Memory and the Kernel Boundary
The first lesson had you deciding whether an address is on the stack or the heap. The interviewer's follow-up is the machinery underneath: what actually happens when the program touches that address. Candidates who answer "the CPU reads the memory" have run out of lesson; the real sequence has three places where microseconds hide, and low-latency work is largely the craft of not visiting them.
Translation, and the cache that makes it survivable
Every address your program uses is virtual. The hardware translates it to a physical frame through the page table, a per-process tree the kernel maintains, typically mapping in 4KB pages with a four-level walk. Four dependent memory reads per access would be absurd, so the processor caches recent translations in the TLB, a buffer of a few thousand entries at most.
The rest of this lesson is for subscribers
Unlock every lesson in Systems Programming for Trading, and every other premium course.
Subscribe to continueTest your knowledge
Keep reading Systems Programming for Trading
19 lessons in this course, and every other premium course, on one subscription.
- Every lesson in every course, with the worked examples and interactive simulators
- Graded questions on every lesson, with explanations for the wrong answers as well as the right one
- The trainers, timed assessments and brainteaser library that go with them