Malthusian Locks

Malthusian Locks

01 August 2016

Applications running in modern multithreaded environments are sometimes overthreaded. The excess threads do not improve performance, and in fact may act to degrade performance via scalability collapse. Often, such software also has highly contended locks. We opportunistically leverage the existence of such locks by modifying the lock admission pol- icy so as to intentionally limit the number of distinct threads circulating over the lock in a given period. Specifically, if there are more threads circulating than are necessary to keep the lock saturated (continuously held), our approach will selectively cull and passivate some of those excess threads. We borrow the concept of swapping from the field of memory management and impose concurrency restriction (CR) if a lock is oversubscribed. The resultant admission order is un- fair over the short term but we explicitly provide long-term fairness by periodically shifting threads between the set of passivated threads and those actively circulating. Our approach is palliative, but often effective, and in the worst case does no harm.


Venue : PPoPP 2017

File Name : ppopp17-dice.pdf