Algorithmica

, Volume 58, Issue 2, pp 304–338

NBmalloc: Allocating Memory in a Lock-Free Manner

  • Anders Gidenstam
  • Marina Papatriantafilou
  • Philippas Tsigas
Open AccessArticle

DOI: 10.1007/s00453-008-9268-x

Cite this article as:
Gidenstam, A., Papatriantafilou, M. & Tsigas, P. Algorithmica (2010) 58: 304. doi:10.1007/s00453-008-9268-x

Abstract

Efficient, scalable memory allocation for multithreaded applications on multiprocessors is a significant goal of recent research. In the distributed computing literature it has been emphasized that lock-based synchronization and concurrency-control may limit the parallelism in multiprocessor systems. Thus, system services that employ such methods can hinder reaching the full potential of these systems. A natural research question is the pertinence and the impact of lock-free concurrency control in key services for multiprocessors, such as in the memory allocation service, which is the theme of this work. We show the design and implementation of NBmalloc, a lock-free memory allocator designed to enhance the parallelism in the system. The architecture of NBmalloc is inspired by Hoard, a well-known concurrent memory allocator, with modular design that preserves scalability and helps avoiding false-sharing and heap-blowup. Within our effort to design appropriate lock-free algorithms for NBmalloc, we propose and show a lock-free implementation of a new data structure, flat-set, supporting conventional “internal” set operations as well as “inter-object” operations, for moving items between flat-sets. The design of NBmalloc also involved a series of other algorithmic problems, which are discussed in the paper. Further, we present the implementation of NBmalloc and a study of its behaviour in a set of multiprocessor systems. The results show that the good properties of Hoard w.r.t. false-sharing and heap-blowup are preserved.

Keywords

Memory allocation Lock-free synchronization Non-blocking synchronization Multithreaded applications 
Download to read the full article text

Copyright information

© The Author(s) 2009

Authors and Affiliations

  • Anders Gidenstam
    • 1
  • Marina Papatriantafilou
    • 2
  • Philippas Tsigas
    • 2
  1. 1.Algorithms and ComplexityMax-Planck-Institut für InformatikSaarbrückenGermany
  2. 2.Computer Science and EngineeringChalmers University of TechnologyGöteborgSweden