NBBS: A Non-blocking Buddy System for Multi-core Machines

Romolo Marotta, Mauro Ianni, Andrea Scarselli, Alessandro Pellegrini, and Francesco Quaglia

Published in: Proceedings of the 19th International Symposium on Cluster, Cloud and Grid Computing
pdf Download PDF

Common implementations of core memory allocation components, like the Linux buddy system, handle concurrent allocation/release requests by synchronizing threads via spinlocks. This approach is not prone to scale, a problem that has been addressed in the literature by introducing layered allocation services or replicating the core allocators—the bottom most ones within the layered architecture. Both these solutions tend to reduce the pressure of actual concurrent accesses to each individual core allocator. In this article we explore an alternative approach to scalability of memory allocation/release, which can be still combined with those literature proposals. We present a fully non-blocking buddy-system, where threads performing concurrent allocations/releases do not undergo any spin-lock based synchronization. Our solution allows threads to proceed in parallel, and commit their allocations/releases unless a conflict is materialized while handling the allocator metadata. Conflict detection relies on atomic Read-Modify-Write (RMW) machine instructions. Beyond improving scalability and performance, our solution can also avoid wasting clock cycles for spin-lock operations by threads that could in principle carry out their memory allocations/releases in full concurrency.

BibTeX Entry:

author = {Marotta, Romolo and Ianni, Mauro and Scarselli, Andrea and Pellegrini, Alessandro and Quaglia, Francesco},
booktitle = {Proceedings of the 19th International Symposium on Cluster, Cloud and Grid Computing},
title = {NBBS: A Non-blocking Buddy System for Multi-core Machines},
year = {2019},
month = may,
pages = {11--20},
publisher = {IEEE Computer Society},
series = {CCGrid},
doi = {10.1109/CCGRID.2019.00011},
location = {Larnaca, Cyprus}