McRT-Malloc: a scalable transactional memory allocator

Emerging multi-core processors promise to provide an exponentially increasing number of hardware threads with every generation. Applications will need to be highly concurrent to fullyuse the power of these processors. To enable maximum concurrency, libraries (such as malloc-free packages) would therefore need to use non-blocking algorithms. But lock-free algorithms are notoriously difficult to reason about and inappropriate for average programmers. Transactional memory promises to significantly ease concurrent programming for the average programmer. This paper describes a highly efficient non-blocking malloc/free algorithm that supports memory allocation and deallocation inside transactional code blocks. Thus this paper describes a memory allocator that is suitable for emerging multi-core applications, while supporting modern concurrency constructs.This paper makes several novel contributions. It is the first to integrate a software transactional memory system with a malloc/free based memory allocator. We present the first algorithm which ensures that space allocated in an aborted transaction is properly freed and does not lead to a space blowup. Unlike previous lock-free malloc packages, our algorithm avoids atomic operations on typical code paths, making our algorithm substantially more efficient.

[1]  Andreas Reuter,et al.  Transaction Processing: Concepts and Techniques , 1992 .

[2]  Bratin Saha,et al.  McRT-STM: a high performance software transactional memory system for a multi-core runtime , 2006, PPoPP '06.

[3]  Virendra J. Marathe,et al.  Design tradeoffs in modern software transactional memory systems , 2004 .

[4]  Maurice Herlihy,et al.  The Repeat Offender Problem: A Mechanism for Supporting Dynamic-Sized, Lock-Free Data Structures , 2002, DISC.

[5]  Maged M. Michael Scalable lock-free dynamic memory allocation , 2004, PLDI '04.

[6]  Keir Fraser,et al.  Language support for lightweight transactions , 2003, SIGP.

[7]  Kathryn S. McKinley,et al.  Hoard: a scalable memory allocator for multithreaded applications , 2000, SIGP.

[8]  C. H. Flood,et al.  The Fortress Language Specification , 2007 .

[9]  Justin R. Rattner Multi-Core to the Masses , 2005, IEEE PACT.

[10]  Maurice Herlihy,et al.  Virtualizing transactional memory , 2005, 32nd International Symposium on Computer Architecture (ISCA'05).

[11]  David R. Cheriton,et al.  Non-blocking synchronization and system design , 1999 .

[12]  Vivek Sarkar,et al.  X10: an object-oriented approach to non-uniform cluster computing , 2005, OOPSLA '05.

[13]  Simon L. Peyton Jones,et al.  Composable memory transactions , 2005, CACM.

[14]  Paul R. Wilson,et al.  The memory fragmentation problem: solved? , 1998, ISMM '98.

[15]  Maged M. Michael Safe memory reclamation for dynamic lock-free objects using atomic reads and writes , 2002, PODC '02.