RSSAmplifier

Blog

protty

kprotty.meRSS feed ↗8 posts

Latest posts

Batched Critical Sections

Critical sections don’t have to be scheduler-bottlenecked.

Sync Primitives are Functionally Complete

You can use any thread synchronization primitive to build any other one. Here’s how:

Intuiting TLS

How do you speak privately in a public setting? Think about it.

libuv, but multi-threaded, but not really

What gained popularity as a LIGMA joke on Twitter morphed into a project I’ve begun to really consider.

Simple Scalable Unbounded Queue

The thing I love most about programming over the years has always been design and optimization work. This is what got me into compilers, garbage collectors, runtimes, schedulers, and eventually databases. Nothing gets me more excited than tag-teaming with someone to research, test, benchmark, and go down various rabbit holes with the goal of making something cool. In this case, I’ve decided to…

Building a Tiny Mutex

Lets say you’re writing your own synchronization primitives for whatever reason and you need a small, fast Mutex.

Resource efficient Thread Pools with Zig

I’d like to share what I’ve been working on for the past 2 years give or take. It’s a thread pool that checks a bunch of boxes: lock-free, allocation-free* (excluding spawning threads), supports batch scheduling, and dynamically spawns threads while handling thread spawn failure.

Understandnig Atomics and Memory Ordering

Atomics and Memory Ordering always feel like an unapproachable topic. In the sea of poor explanations, I wish to add another by describing how I reason about all of this mess. This is only my understanding so if you need a better/formal explanation, I recommend reading through the memory model for your given programming language. In this case, it would be the C11 Memory Model described at…