Blog
Posts, notes, and articles.

System Calls: The Gateway Between User Space and Kernel
2021-04-18An in-depth exploration of how applications communicate with the operating system kernel through system calls. Learn about the syscall interface, context switching, and how modern OSes balance security with performance.

Trusted Execution: Intel SGX Enclaves, AMD SEV-SNP, Attestation Protocols, and the Confidential Computing Promise
2021-03-25A deep exploration of trusted execution environments — how SGX and SEV encrypt computation, the attestation protocols that verify enclave integrity, and the promise of confidential computing that protects data even from the cloud operator.

Cache‑Friendly Data Layouts: AoS vs. SoA (and the Hybrid In‑Between)
2021-03-18How memory layout choices shape the performance of your hot loops. A practical guide to arrays‑of‑structs, struct‑of‑arrays, and hybrid layouts across CPUs and GPUs.

Capability-Based Security: CHERI Architecture, Hardware Capabilities, Spatial and Referential Safety, and Compartmentalization
2021-02-26A deep exploration of the CHERI capability architecture — how hardware-enforced capabilities provide spatial memory safety, referential integrity, and fine-grained compartmentalization at the instruction level.

Region-Based Memory Management: Tofte & Talpin's Region Inference, the ML Kit, Safety Proofs, and the Relationship to Rust's Lifetimes
2020-12-01A deep exploration of region-based memory management — how Tofte and Talpin's region inference eliminates garbage collection while preserving memory safety, and how their ideas echo through Rust's ownership and borrowing system.

Raft Fast‑Commit and PreVote in Practice
2020-11-09What fast‑commit and PreVote actually change in Raft, how they affect availability during leader changes, and where the footguns are.

Network Sockets and the TCP/IP Stack: How Data Travels Across Networks
2020-11-08A comprehensive exploration of network programming internals, from socket system calls through the TCP/IP protocol stack to the network interface. Understand connection establishment, flow control, and the kernel's role in networking.

Safe Rollback Strategies for Distributed Databases
2020-11-08A comprehensive guide to designing, executing, and validating rollbacks in distributed database environments without compromising data integrity or customer trust.

Garbage Collection Advanced: Incremental, Concurrent, Snapshot-at-the-Beginning, and Pauseless Collectors from Azul C4 to ZGC Colored Pointers
2020-10-31A deep exploration of advanced garbage collection algorithms that eliminate stop-the-world pauses — incremental marking, concurrent collection, the snapshot-at-the-beginning barrier, and the pauseless collectors that make Java viable for low-latency applications.

JIT Compilation: Tracing vs Method JITs, V8's Ignition+TurboFan Pipeline, HotSpot's C1/C2 Tiered Compilation, and Deoptimization
2020-10-28A deep exploration of just-in-time compilation — how V8 and HotSpot turn JavaScript and Java bytecode into native code through multi-tier compilation pipelines, and the art of deoptimization that makes speculative optimization safe.

Wasm Runtime Internals: V8's Liftoff and TurboFan, Wasmtime's Cranelift, Linear Memory Sandboxing, and the Stack Machine Model
2020-10-15A deep exploration of WebAssembly runtime internals — how V8 and Wasmtime compile and execute Wasm bytecode, the linear memory sandbox that enables secure execution, and the stack machine model at Wasm's core.

Container Internals: Linux Namespaces, cgroups v2, OverlayFS, and the OCI Runtime Spec Under the Hood
2020-09-28A deep exploration of the Linux kernel primitives that power container runtimes — the seven namespace types, cgroups v2 resource control, OverlayFS copy-on-write storage, and the OCI runtime specification that ties them together.

Compiler Optimizations: From Source Code to Fast Machine Code
2020-09-23A deep dive into how modern compilers transform your code into efficient machine code. Explore optimization passes from constant folding to loop vectorization, and learn how to write code that compilers can optimize effectively.

Merkle Trees and Content‑Addressable Storage
2020-08-17From Git to distributed object stores: how Merkle DAGs enable integrity, deduplication, and efficient sync.

Hypervisor Internals: VT-x, AMD-V/SVM, Nested Paging, and the Mechanics of Trap-and-Emulate
2020-07-25A deep exploration of hardware virtualization support — how Intel VT-x and AMD-V enable efficient hypervisors through VM control structures, nested paging, and the clever elimination of slow trap-and-emulate paths.

Unikernels: Specializing the OS for a Single Application, from MirageOS to IncludeOS and the Performance-Security Trade-offs
2020-05-26A deep exploration of unikernel architecture — how compiling an application directly into a specialized operating system kernel produces dramatic performance and security benefits while challenging decades of OS design orthodoxy.

Exokernels & Library OS: MIT's Radical Vision, Secure Multiplexing, and the Unikernel Lineage
2020-04-01A deep exploration of exokernel architecture from MIT's Aegis/XOK/ExOS stack through the secure multiplexing problem to the modern unikernel renaissance that vindicated the library OS philosophy.

Consistent Hashing: Distributing Data Across Dynamic Clusters
2020-03-28A deep dive into consistent hashing, the elegant algorithm that enables scalable distributed systems. Learn how it works, why it matters for databases and caches, and explore modern variations like jump consistent hashing and rendezvous hashing.

Tuning the Dial: Adaptive Consistency at Planet Scale
2020-03-11Inside the engineering of databases that adjust consistency on the fly without breaking user trust.

Microkernel vs Monolithic: The L4 Experience, IPC Optimization, seL4 Verification, and Zircon's Ascent
2020-02-24A deep exploration of microkernel design from L4's high-performance IPC through seL4's formal verification to Zircon's pragmatic reimagining for Fuchsia. Understand why the microkernel-monolithic debate refuses to die.

Integer Programming: Branch-and-Bound, Gomory Cuts, Lift-and-Project, and Solver Internals
2020-02-23An inside look at integer programming algorithms—branch-and-bound, cutting planes, lift-and-project hierarchies—and how Gurobi and CPLEX solve NP-hard problems.

Convex Optimization: Gradient Descent, Nesterov Acceleration, KKT Conditions, and the ML Stack
2020-02-18A deep investigation of convex optimization—the engine of modern machine learning—from gradient descent and Nesterov momentum to KKT conditions and interior-point methods.

Submodular Optimization: Diminishing Returns, the (1-1/e) Greedy Guarantee, and Machine Learning Applications
2020-02-01A comprehensive study of submodular functions—the discrete analog of convexity—the greedy algorithm's optimal approximation, and applications in active learning and summarization.

Matroid Theory: The Greedy Exchange Property, Matroid Intersection, and Applications in Spanning Trees and Matching
2020-01-19A thorough exploration of matroid theory—the algebraic abstraction that explains why greedy algorithms work—matroid intersection, and their applications in combinatorial optimization.