Abstract
Read-write locks are one of the most prevalent lock forms in concurrent applications because they allow read accesses to locked code to proceed in parallel. However, they do not offer any parallelism between reads and writes.
This paper introduces pessimistic lock-elision (PLE), a new approach for non-speculatively replacing read-write locks with pessimistic (i.e. non-aborting) software transactional code that allows read-write concurrency even for contended code and even if the code includes system calls. On systems with hardware transactional support, PLE will allow failed transactions, or ones that contain system calls, to preserve read-write concurrency.
Our PLE algorithm is based on a novel encounter-order design of a fully pessimistic STM system that in a variety of benchmarks spanning from counters to trees, even when up to 40% of calls are mutating the locked structure, provides up to 5 times the performance of a state-of-the-art read-write lock.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Kapalka, M., Dragojevic, A., Guerraoui, R.: Stretching transactional memory. In: PLDI 2009: Proceedings of the 2009 ACM SIGPLAN Conference on Programming Language Design and Implementation, pp. 155–165. ACM, New York (2009)
Dice, D., Matveev, A., Shavit, N.: Implicit privatization using private transactions. In: Transact 2010, Paris, France (2010)
Shavit, N., Matveev, A.: Towards a fully pessimistic stm model. In: TRANSACT 2012 Workshop, New Orleans, LA, USA (2012)
Harris, T., Roy, A., Hand, S.: A runtime system for software lock elision. In: Proceedings of the 4th ACM European Conference on Computer Systems, EuroSys 2009, pp. 261–274. ACM, New York (2009)
Adl-Tabatabai, A., Welc, A., Saha, B.: Irrevocable transactions and their applications. In: SPAA 2008: Proceedings of the Twentieth Annual Symposium on Parallelism in Algorithms and Architectures, pp. 285–296. ACM, New York (2008)
Attiya, H., Hillel, E.: The Cost of Privatization. In: Lynch, N.A., Shvartsman, A.A. (eds.) DISC 2010. LNCS, vol. 6343, pp. 35–49. Springer, Heidelberg (2010)
Keidar, I., Perelman, D., Fan, R.: On maintaining multiple versions in stm. In: Proceeding of the 29th ACM SIGACT-SIGOPS Symposium on Principles of Distributed computing, PODC 2010, pp. 16–25. ACM, New York (2010)
Desnoyers, M., Stern, A., McKenney, P., Walpole, J.: User-level implementations of read-copy update. IEEE Transactions on Parallel and Distributed Systems (2009)
Dice, D., Shalev, O., Shavit, N.N.: Transactional Locking II. In: Dolev, S. (ed.) DISC 2006. LNCS, vol. 4167, pp. 194–208. Springer, Heidelberg (2006)
Attiya, H., Hillel, E.: Single-Version STMs Can Be Multi-version Permissive (Extended Abstract). In: Aguilera, M.K., Yu, H., Vaidya, N.H., Srinivasan, V., Choudhury, R.R. (eds.) ICDCN 2011. LNCS, vol. 6522, pp. 83–94. Springer, Heidelberg (2011)
Herlihy, M., Shavit, N.: The art of multiprocessor programming. Morgan Kaufmann (2008)
Intel. Intel architecture instruction set extensions programming reference – ch. 8. Document 319433-012A (2012)
Lev, Y., Luchangco, V., Marathe, V., Moir, M., Nussbaum, D., Olszewski, M.: Anatomy of a scalable software transactional memory. In: 4th ACM SIGPLAN Workshop on Transactional Computing, TRANSACT 2009 (2009)
Machens, H., Turau, V.: Avoiding Publication and Privatization Problems on Software Transactional Memory. In: Luttenberger, N., Peters, H. (eds.) 17th GI/ITG Conference on Communication in Distributed Systems (KiVS 2011), Dagstuhl, Germany. OpenAccess Series in Informatics (OASIcs), vol. 17, pp. 97–108. Schloss Dagstuhl–Leibniz-Zentrum fuer Informatik (2011)
Marathe, V., Spear, M., Scott, M.: Scalable techniques for transparent privatization in software transactional memory. In: International Conference on Parallel Processing, pp. 67–74 (2008)
Mellor-Crummey, J., Scott, M.: Algorithms for scalable synchronization on shared-memory multiprocessors. ACM Transactions on Computer Systems 9(1), 21–65 (1991)
Fetzer, C., Felber, P., Riegel, T.: Dynamic performance tuning of word-based software transactional memory. In: PPoPP 2008: Proceedings of the 13th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, pp. 237–246. ACM, New York (2008)
Rajwar, R., Goodman, J.: Speculative lock elision: enabling highly concurrent multithreaded execution. In: MICRO, pp. 294–305. ACM/IEEE (2001)
Shpeisman, T., Menon, V., Adl-Tabatabai, A., Balensiefer, S., Grossman, D., Hudson, R., Moore, K., Saha, B.: Enforcing isolation and ordering in stm. SIGPLAN Not. 42, 78–88 (2007)
Spear, M., Marathe, V., Dalessandro, L., Scott, M.: Privatization techniques for software transactional memory. In: Proceedings of the Twenty-Sixth Annual ACM Symposium on Principles of Distributed Computing, PODC 2007, pp. 338–339. ACM, New York (2007)
Rajwar, R., Harris, T., Larus, J.: Transactional Memory, 2nd edn. Morgan and Claypool Publishers (2010)
Riegel, T., Felber, P., Fetzer, C.: A Lazy Snapshot Algorithm with Eager Validation. In: Dolev, S. (ed.) DISC 2006. LNCS, vol. 4167, pp. 284–298. Springer, Heidelberg (2006)
Web. Intel tsx (2012), http://software.intel.com/en-us/blogs/2012/02/07/transactional-synchronization-in-haswell
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2012 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Afek, Y., Matveev, A., Shavit, N. (2012). Pessimistic Software Lock-Elision. In: Aguilera, M.K. (eds) Distributed Computing. DISC 2012. Lecture Notes in Computer Science, vol 7611. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-33651-5_21
Download citation
DOI: https://doi.org/10.1007/978-3-642-33651-5_21
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-33650-8
Online ISBN: 978-3-642-33651-5
eBook Packages: Computer ScienceComputer Science (R0)