Subtleties of transactional memory atomicity semantics

被引:58
作者
Department of Computer and Information Science, University of Pennsylvania, Philadelphia, PA, United States [1 ]
机构
[1] Department of Computer and Information Science, University of Pennsylvania, Philadelphia, PA
来源
IEEE Comput. Archit. Lett. | 2006年 / 2卷
基金
美国国家科学基金会;
关键词
Computer operating systems - Computer system recovery - Data storage equipment - Multiprogramming;
D O I
10.1109/L-CA.2006.18
中图分类号
学科分类号
摘要
Transactional memory has great potential for simplifying multithreaded programming by allowing programmers to specify regions of the program that must appear to execute atomically. Transactional memory implementations then optimistically execute these transactions concurrently to obtain high performance. This work shows that the same atomic guarantees that give transactions their power also have unexpected and potentially serious negative effects on programs that were written assuming narrower scopes of atomicity. We make four contributions: (1) we show that a direct translation of lock-based critical sections into transactions can introduce deadlock into otherwise correct programs, (2) we introduce the terms strong atomicity and weak atomicity to describe the interaction of transactional and non-transactional code, (3) we show that code that is correct under weak atomicity can deadlock under strong atomicity, and (4) we demonstrate that sequentially composing transactional code can also introduce deadlocks. These observations invalidate the intuition that transactions are strictly safer than lock-based critical sections, that strong atomicity is strictly safer than weak atomicity, and that transactions are always composable.
引用
收藏
相关论文
共 12 条
  • [1] Adve S.V., Gharachorloo K., Shared memory consistency models: A tutorial, IEEE Computer, 29, 12, pp. 66-76, (1996)
  • [2] Ananian C.S., Asanovic K., Kuszmaul B.C., Leiserson C.E., Lie S., Unbounded transactional memory, Proceedings of the 11th Symposium on High-Performance Computer Architecture, (2005)
  • [3] Blundell C., Lewis E.C., Martin M.M.K., Deconstructing transactional semantics: The subtleties of atomicity, Proceedings of Workshop on Duplicating, Deconstructing, and Debunking, (2005)
  • [4] Grossman D., Manson J., Pugh W., What do high-level memory models mean for transactions?, Proceedings of the 2006 Workshop on Memory System Performance and Correctness (MSPC), (2006)
  • [5] Hammond L., Et al., Transactional memory coherence and consistency, Proceedings of the 31th Annual International Symposium on Computer Architecture, pp. 102-113, (2004)
  • [6] Harris T., Fraser K., Language support for lightweight transactions, Proceedings of the 18th SIGPLAN Conference on Object-Oriented Programming, Systems, Languages and Application (OOPSLA), pp. 388-402, (2003)
  • [7] Harris T., Marlow S., Peyton-Jones S., Herlihy M., Composable memory transactions, Proceedings of the 10th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming (PPOPP), pp. 48-60, (2005)
  • [8] Herlihy M., Moss J.E.B., Transactional memory: Architectural support for lock-free data structures, Proceedings of the 20th Annual International Symposium on Computer Architecture, (1993)
  • [9] Moore K.E., Bobba J., Moravan M.J., Hill M.D., Wood D.A., LogTM: Log-based transactional memory, Proceedings of the 12th Symposium on High-Performance Computer Architecture, (2006)
  • [10] Rajwar R., Goodman J.R., Transactional lock-free execution of lock-based programs, Proceedings of the Tenth International Conference on Architectural Support for Programming Languages and Operating Systems, pp. 5-17, (2002)