ABSTRACT
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.
- Allan, E., Chase, D., Luchango, V., Maessen, J., Ryu, S., Steele Jr., G., Tobin-Hochstadt, S. The Fortress language specification, version 0.618. Sun Microsystems Technical Report, April 2005.Google Scholar
- Berger, E. D., McKinley, K. S., Blumofe, R. D., and Wilson, P. R. 2000. Hoard: a scalable memory allocator for multithreaded applications. In Proceedings of the Ninth international Conference on Architectural Support For Programming Languages and Operating Systems (Cambridge, Massachusetts, United States). ASPLOS-IX. ACM Press, NewYork, NY, 117--128. DOI= http://doi.acm.org/10.1145/378993.379232 Google ScholarDigital Library
- Charles, P., Donawa, C., Ebcioglu, K., Grothoff, C., Kielstra, A., von Praun, C., Saraswat, V., Sarkar, V. X10: An object oriented approach to non-uniform cluster computing, OOPSLA, October 2005. Google ScholarDigital Library
- Cray Inc. The Chapel language specification, version 0.4. Technical Report, Cray Inc. Feb 2005.Google Scholar
- Ennals, R. Cache sensitive software transactional memory. Technical Report.Google Scholar
- Gray, J. and Reuter A. Transaction processing: concepts and techniques. Google ScholarDigital Library
- M. Greenwald. Non-blocking Synchronization and System Design. Ph.D. Thesis July 1999. Also available as Stanford University Technical Report STAN-CS-TR-99-1624 Google ScholarDigital Library
- Harris, T.L. and Fraser, K. Language support for light weight transactions. In Proceedings of the 18th Annual ACM SIGPLAN Conference on Object-Oriented Programing, Systems, Languages, and Applications (Anaheim, California, USA, October 26 - 30, 2003). OOPSLA '03. ACM Press, New York, NY, 388--402. DOI= http://doi.acm.org/10.1145/949305.949340 Google ScholarDigital Library
- Harris, T. L., Marlow, S., Peyton Jones, S., Herlihy, M. Composable memory transactions. Proceedings of the Principles and Practice of Parallel Programming, PPoPP, June 2005. Google ScholarDigital Library
- Herlihy, M., Luchangco, V., and Moir, M. 2002. The Repeat Offender Problem: A Mechanism for Supporting Dynamic-Sized, Lock-Free Data Structures. In Proceedings of the 16th international Conference on Distributed Computing (October28 - 30, 2002). D. Malkhi, Ed. Lecture Notes In Computer Science, vol. 2508. Springer-Verlag, London, 339--353. Google ScholarDigital Library
- Michael, M. M. 2004. Scalable lock-free dynamic memory allocation. In Proceedings of the ACM SIGPLAN 2004 Conference on Programming Language Design and Implementation (Washington DC, USA, June 09 - 11, 2004). PLDI '04. ACM Press, New York, NY, 35--46. Google ScholarDigital Library
- Johnstone, M. S. and Wilson, P. R. 1998. The memory fragmentation problem: solved?. In Proceedings of the 1st international Symposium on Memory Management(Vancouver, British Columbia, Canada, October 17 - 19, 1998). ISMM '98. ACM Press, New York, NY, 26--36. DOI= http://doi.acm.org/10.1145/286860.286864 Google ScholarDigital Library
- Rajwar, R., Herlihy, M., and Lai, K. Virtualizing transactional memory. Proceedings of the International Symposium on Computer Architecture, June 2005. Google ScholarDigital Library
- Rattner, J. Multicore to the masses. Parallel Architectures and Compilation Techniques, Keynote. September 2005. Google ScholarDigital Library
- Marathe, V. J., Scherer, W. N., and Scott, M. L. 2004. Design tradeoffs in modern software transactional memory systems. In Proceedings of the 7th Workshop on Workshop on Languages, Compilers, and Run-Time Support For Scalable Systems (Houston, Texas, October 22 - 23, 2004). LCR '04, vol. 81. ACM Press, New York, NY, 1--7. DOI= http://doi.acm.org/10.1145/1066650.1066660 Google ScholarDigital Library
- Michael, M. M. Safe memory reclamation for dynamic lock-free objects using atomic reads and writes. Proceedings of the 21 st Annual ACM Symposium on Principles of Distributed Computing, page 21--30, July 2002. Google ScholarDigital Library
- Saha, B., Adl-Tabatabai, A., Hudson, R., Minh, C., Hertzberg, B., A High Performance Software Transactional Memory System For A Multi-Core Runtime. In Proceedings of the Principles and Practice of Parallel Programming, PPoPP, New York, NY, March 2006. Google ScholarDigital Library
Index Terms
- McRT-Malloc: a scalable transactional memory allocator
Recommendations
TxLinux: using and managing hardware transactional memory in an operating system
SOSP '07TxLinux is a variant of Linux that is the first operating system to use hardware transactional memory (HTM) as a synchronization primitive, and the first to manage HTM in the scheduler. This paper describes and measures TxLinux and discusses two ...
TxLinux: using and managing hardware transactional memory in an operating system
SOSP '07: Proceedings of twenty-first ACM SIGOPS symposium on Operating systems principlesTxLinux is a variant of Linux that is the first operating system to use hardware transactional memory (HTM) as a synchronization primitive, and the first to manage HTM in the scheduler. This paper describes and measures TxLinux and discusses two ...
CAR-STM: scheduling-based collision avoidance and resolution for software transactional memory
PODC '08: Proceedings of the twenty-seventh ACM symposium on Principles of distributed computingTransactional memory (TM) is a key concurrent programming abstraction. Several software-based transactional memory (STM) implementations have been developed in recent years. All STM implementations must guarantee transaction atomicity but different STM ...
Comments