Advertisement

WFR-TM: Wait-Free Readers without Sacrificing Speculation of Writers

  • Panagiota Fatourou
  • Eleni Kanellou
  • Eleftherios Kosmas
  • Md Forhad Rabbi
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 8878)

Abstract

Transactional Memory (TM) is a promising concurrent programming paradigm which employs transactions to achieve synchronization in accessing common data known as transactional variables. A transaction may either commit by making its updates to transactional variables visible or abort by discarding all its changes.

We introduce WFR-TM, a TM algorithm which attempts to combine the advantages of pessimistic and optimistic TM. In a pessimistic TM, no transaction ever aborts; however, update transactions are executed sequentially, thus decreasing the degree of achieved parallelism. In optimistic TM, transactions are executed concurrently and they commit if they have not encountered any conflict during their execution.

In WFR-TM, read-only transactions are wait-free and they never execute expensive synchronization operations, like CAS, Fetch&Increment, Swap, etc. This is achieved without sacrificing the parallelism between update transactions. Update transactions synchronize pessimistically with concurrently executed read-only transactions and they synchronize optimistically with each other.

Keywords

shared memory software transactional memory read-only wait-free 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Afek, Y., Matveev, A., Shavit, N.: Pessimistic software lock-elision. In: Aguilera, M.K. (ed.) DISC 2012. LNCS, vol. 7611, pp. 297–311. Springer, Heidelberg (2012)CrossRefGoogle Scholar
  2. 2.
    Attiya, H., Hillel, E.: A single-version stm that is multi-versioned permissive. Theory of Computing Systems 51(4), 425–446 (2012)CrossRefzbMATHMathSciNetGoogle Scholar
  3. 3.
    Attiya, H., Hillel, E., Milani, A.: Inherent limitations on disjoint-access parallel implementations of transactional memory. In: Proceedings of the 21st Symposium on Parallelism in Algorithms and Architectures, SPAA 2009, pp. 69–78. ACM Press, New York (2009)Google Scholar
  4. 4.
    Bushkov, V., Guerraoui, R., Kapalka, M.: On the liveness of transactional memory. In: Proceedings of the 31st ACM Symposium on Principles of Distributed Computing, PODC 2012, pp. 9–18. ACM, New York (2012)CrossRefGoogle Scholar
  5. 5.
    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)CrossRefGoogle Scholar
  6. 6.
    Fatourou, P., Kanellou, E., Kosmas, E., Rabbi, M.F.: Wfr-tm: Knowledge of past, understanding of future, and perseverance in present. Tech. Rep. ICS-FORTH TR 449, Institute of Computer Science, Foundation of Research and Technology, Heraklion, Crete (November 2014)Google Scholar
  7. 7.
    Felber, P., Fetzer, C., Marlier, P., Riegel, T.: Time-based software transactional memory. IEEE Transactions on Parallel and Distributed Systems 21, 1793–1807 (2010)CrossRefGoogle Scholar
  8. 8.
    Felber, P., Fetzer, C., Riegel, T.: Dynamic performance tuning of word-based software transactional memory. In: PPoPP ’08: Proceedings of the 13th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, PPoPP 008, pp. 237–246. ACM, New Yor (2008)CrossRefGoogle Scholar
  9. 9.
    Fernandes, S.M., Cachopo, J.A.: Lock-free and scalable multi-version software transactional memory. In: Proceedings of the 16th ACM Symposium on Principles and Practice of Parallel Programming, PPoPP 2011, pp. 179–188. ACM, New York (2011)Google Scholar
  10. 10.
    Fraser, K., Harris, T.: Concurrent programming without locks. ACM Trans. Comput. Syst. 25(2) (May 2007)Google Scholar
  11. 11.
    Gramoli, V., Harmanci, D., Felber, P.: Toward a theory of input acceptance for transactional memories. In: Baker, T.P., Bui, A., Tixeuil, S. (eds.) OPODIS 2008. LNCS, vol. 5401, pp. 527–533. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  12. 12.
    Guerraoui, R., Henzinger, T.A., Singh, V.: Permissiveness in transactional memories. In: Taubenfeld, G. (ed.) DISC 2008. LNCS, vol. 5218, pp. 305–319. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  13. 13.
    Guerraoui, R., Kapalka, M.: On the correctness of transactional memory. In: Proceedings of the 13th ACM Symposium on Principles and Practice of Parallel Programming, PPoPP 2008, pp. 175–184. ACM, New York (2008)Google Scholar
  14. 14.
    Guerraoui, R., Kapalka, M.: The semantics of progress in lock-based transactional memory. SIGPLAN Not 44(1), 404–415 (2009)CrossRefGoogle Scholar
  15. 15.
    Herlihy, M., Luchangco, V., Moir, M., Scherer III, W.N.: Software transactional memory for dynamic-sized data structures. In: Proceedings of the 22nd ACM Symposium on Principles of Distributed Computing, PODC 2003, pp. 92–101. ACM, New York (2003)Google Scholar
  16. 16.
    Herlihy, M., Moss, J.E.B.: Transactional memory: architectural support for lock-free data structures. SIGARCH Comput. Archit. News 21(2), 289–300 (1993)CrossRefGoogle Scholar
  17. 17.
    Keidar, I., Perelman, D.: On avoiding spare aborts in transactional memory. In: Proceedings of the 21st Symposium on Parallelism in Algorithms and Architectures, SPAA 2009, pp. 59–68. ACM, New York (2009)Google Scholar
  18. 18.
    Matveev, A., Shavit, N.: Towards a fully pessimistic stm model. In: 7th ACM SIGPLAN Workshop on Transactional Computing (TRANSACT) (2012)Google Scholar
  19. 19.
    Perelman, D., Byshevsky, A., Litmanovich, O., Keidar, I.: SMV: Selective multi-versioning STM. In: Peleg, D. (ed.) DISC 2011. LNCS, vol. 6950, pp. 125–140. Springer, Heidelberg (2011)Google Scholar
  20. 20.
    Perelman, D., Fan, R., Keidar, I.: On maintaining multiple versions in stm. In: Proceedings of the 29th ACM Symposium on Principles of Distributed Computing, PODC 2010, pp. 16–25. ACM, New York (2010)Google Scholar
  21. 21.
    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)CrossRefGoogle Scholar
  22. 22.
    Shavit, N., Touitou, D.: Software transactional memory. In: Proceedings of the 14th ACM Symposium on Principles of Distributed Computing, PODC 1995, pp. 204–213. ACM, New York (1995)Google Scholar
  23. 23.
    Tabba, F., Moir, M., Goodman, J.R., Hay, A.W., Wang, C.: Nztm: Nonblocking zero-indirection transactional memory. In: Proceedings of the 21st Symposium on Parallelism in Algorithms and Architectures, SPAA 2009, pp. 204–213. ACM, New York (2009)Google Scholar

Copyright information

© Springer International Publishing Switzerland 2014

Authors and Affiliations

  • Panagiota Fatourou
    • 1
  • Eleni Kanellou
    • 2
  • Eleftherios Kosmas
    • 1
  • Md Forhad Rabbi
    • 3
  1. 1.FORTH-ICS & University of CreteHeraklion (Crete)Greece
  2. 2.FORTH-ICS & IRISAUniversité de RennesRennes CedexFrance
  3. 3.FORTH-ICSGreece

Personalised recommendations