Madhav Khosla

Backend and systems engineer.

Five years building backend and payments systems at HighLevel, BharatPe and Trackk. Now working full-time on the Linux kernel and networking stack.

This is where I write up what I build and learn.

Writing a Mutex in C: Atomics and x86

Writing a spin mutex with C11 atomics, testing it with 16 threads, and looking at the x86-64 assembly.

Writing ARP From Scratch and My Learnings

Implementing Address Resolution Protocol and Sharing My Learnings on network programming.

Functional Programming in Rust 2: Iterators

Creational design patterns aid in the instantiation of objects by providing suitable abstractions and make the systems independent of how objects are created composed and represented.

Functional Programming in Rust 1: Closures

It is a Programming Paradigm where you use functions to solve what you are building. The most common features that you might have used FP in any language will be Map and Reduce. Where you pass in a function what iterates in the collection you run map or reduce on.

Creational Design Patterns: My lessons on it

Creational design patterns aid in the instantiation of objects by providing suitable abstractions and make the systems independent of how objects are created composed and represented.

Caching: My lessons on it

Caching is a cheap way to scale a system’s performance in very less time. Being cheap and easy it also brings some problems such as invalidation and infrastructure for setting up the cache itself. Here I plan to talk about some lessons on caching that I’ve learnt in a few months.