04 — Experiments
Experiments
Small tests, failed attempts, and measurements. The failures are documented as carefully as the successes.
- 01 Page fault latency measurement
Measuring the actual latency of a page fault on Linux using rdtsc. Results were more variable than expected.
- 02 Context switch overhead
How much time does a context switch actually take? Tested with getpid() + pipes, compared to thread switching.
- 03 Heap allocator fragmentation study
Testing how different allocation patterns affect malloc fragmentation. Tried to break glibc's allocator.
- 04 ELF section stripping impact
What happens to runtime behavior when you strip debug symbols and non-essential sections from an ELF?
- 05 Stack growth direction on Linux
Empirically confirming that stacks grow downward on x86-64, measuring guard page size and stack expansion.
- 06 Trying to build a lockless ring buffer
Attempted to build a lockless SPSC ring buffer. Failed twice due to subtle memory ordering issues. Notes on why.