Atomicless Concurrency

from blog mcyoung, | ↗ original
↗ original
Let’s say we’re building an allocator. Good allocators need to serve many threads simultaneously, and as such any lock they take is going to be highly contended. One way to work around this, pioneered by TCMalloc, is to have thread-local caches of blocks (hence, the “TC” - thread cached). Unfortunately threads can be ephemeral, so book-keeping...