A Versatile STM Protocol with Invisible Read Operations That Satisfies the Virtual World Consistency Condition

  • Damien Imbs
  • Michel Raynal
Part of the Lecture Notes in Computer Science book series (LNCS, volume 5869)


The aim of a Software Transactional Memory (STM) is to discharge the programmers from the management of synchronization in multiprocess programs that access concurrent objects. To that end, a STM system provides the programmer with the concept of a transaction. The job of the programmer is to design each process the application is made up of as a sequence of transactions. A transaction is a piece of code that accesses concurrent objects, but contains no explicit synchronization statement. It is the job of the underlying STM system to provide the illusion that each transaction appears as being executed atomically. Of course, for efficiency, a STM system has to allow transactions to execute concurrently. Consequently, due to the underlying STM concurrency management, a transaction commits or aborts.

This paper first presents a new STM consistency condition, called virtual world consistency. This condition states that no transaction reads object values from an inconsistent global state. It is similar to opacity for the committed transactions but weaker for the aborted transactions. More precisely, it states that (1) the committed transactions can be totally ordered, and (2) the values read by each aborted transaction are consistent with respect to its causal past only. Hence, virtual world consistency is weaker than opacity while keeping its spirit. Then, assuming the objects shared by the processes are atomic read/write objects, the paper presents a STM protocol that ensures virtual world consistency (while guaranteeing the invisibility of the read operations). From an operational point of view, this protocol is based on a vector-clock mechanism. Finally, the paper considers the case where the shared objects are regular read/write objects. It also shows how the protocol can easily be weakened while still providing an STM system that satisfies causal consistency, a condition strictly weaker than virtual world consistency.


Atomic object Causal past Commit/abort Concurrency control Consistency condition Consistent global state Lock Read-from relation Regular Read/write object Serializability Shared memory Software transactional memory Vector clock Transaction 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Ahamad, M., Neiger, G., Burns, J.E., Kohli, P.: Hutto Ph.W., Causal Memory: Definitions, Implementation, and Programming. Distributed Computing 9(1), 37–49 (1995)MathSciNetCrossRefGoogle Scholar
  2. 2.
    Afek, Y., Attiya, H., Dolev, D., Gafni, E., Merritt, M., Shavit, N.: Atomic Snapshots of Shared Memory. Journal of the ACM 40(4), 873–890 (1993)CrossRefzbMATHGoogle Scholar
  3. 3.
    Attiya, H.: Needed: Foundations for Transactional Memory. ACM Sigact News, DC Column 39(1), 59–61 (2008)CrossRefGoogle Scholar
  4. 4.
    Attiya, H., Guerraoui, R., Ruppert, E.: Partial Snapshot Objects. In: Proc. 20th ACM Symposium on Parallel Algorithms and Architectures (SPAA 2008), pp. 336–343. ACP Press, ACM Press (2008)Google Scholar
  5. 5.
    Babaoğlu, Ö., Marzullo, K.: Consistent Global States of Distributed Systems: Fundamental Concepts and Mechanisms. In: Distributed Systems. Frontier Series, vol. 4, pp. 55–93. ACM Press, New York (1993)Google Scholar
  6. 6.
    Chandy, K.M., Lamport, L.: Distributed Snapshots: Determining Global States of Distributed Systems. ACM Transactions on Operating Systems 3(1), 63–75 (1985)CrossRefGoogle Scholar
  7. 7.
    Cooper, R., Marzullo, K.: Consistent Detection of Global Predicates. In: Proc. ACM/ONR Workshop on Parallel and Distributed Debugging, pp. 167–174. ACM Press, New York (1991)Google Scholar
  8. 8.
    Dice, D., Shalev, O., Shavit, N.: Transactional Locking II. In: Dolev, S. (ed.) DISC 2006. LNCS, vol. 4167, pp. 194–208. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  9. 9.
    Felber, P., Fetzer, C., Guerraoui, R., Harris, T.: Transactions are coming Back, but Are They The Same? ACM Sigact News, DC Column 39(1), 48–58 (2008)Google Scholar
  10. 10.
    Guerraoui, R., Kapałka, M.: On the Correctness of Transactional Memory. In: Proc. 13th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming (PPoPP 2008), pp. 175–184. ACM Press, New York (2008)Google Scholar
  11. 11.
    Harris, T., Cristal, A., Unsal, O.S., Ayguade, E., Gagliardi, F., Smith, B., Valero, M.: Transactional Memory: an Overview. IEEE Micro 27(3), 8–29 (2007)CrossRefGoogle Scholar
  12. 12.
    Herlihy, M.P., Luchangco, V.: Distributed Computing and the Multicore Revolution. ACM SIGACT News, DC Column 39(1), 62–72 (2008)CrossRefGoogle Scholar
  13. 13.
    Herlihy, M.P., Moss, J.E.B.: Transactional Memory: Architectural Support for Lock-free Data Structures. In: Proc. 20th ACM Int’l Symp. on Computer Architecture (ISCA 1993), pp. 289–300 (1993)Google Scholar
  14. 14.
    Herlihy, M.P., Wing, J.M.: Linearizability: a Correctness Condition for Concurrent Objects. ACM Transactions on Programming Languages and Systems 12(3), 463–492 (1990)CrossRefGoogle Scholar
  15. 15.
    Imbs, D., Raynal, M.: A Lock-based STM Protocol that Satisfies Opacity and Progressiveness. In: Baker, T.P., Bui, A., Tixeuil, S. (eds.) OPODIS 2008. LNCS, vol. 5401, pp. 226–245. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  16. 16.
    Imbs, D., Raynal, M.: Provable STM Properties: Leveraging Clock and Locks to Favor Commit and Early Abort. In: Garg, V., Wattenhofer, R., Kothapalli, K. (eds.) ICDCN 2009. LNCS, vol. 5408, pp. 67–78. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  17. 17.
    Imbs, D., Raynal, M.: Help When Needed, but No More: Efficient Read/Write Partial Snapshots. In: Keidar, I. (ed.) DISC 2009. LNCS, vol. 5805, pp. 142–156. Springer, Heidelberg (2009)Google Scholar
  18. 18.
    Imbs, D., Raynal, M.: On the Consistency Conditions of Transactional Memories. Tech Report #1917, 23 pages, IRISA, Université de Rennes, France (submitted to publication, 2009)Google Scholar
  19. 19.
    Imbs, D., Raynal, M.: A versatile STM protocol with invisible read operations that satisfies the virtual world consistency condition. Tech Report #1923, 20 pages, IRISA, Université de Rennes, France (2009)Google Scholar
  20. 20.
    Lamport, L.: On interprocess communication. Part 1: Models, Part 2: Algorithms. Distributed Computing 1(2), 77–101 (1986)MathSciNetCrossRefzbMATHGoogle Scholar
  21. 21.
    Papadimitriou, Ch.H.: The Serializability of Concurrent Updates. Journal of the ACM 26(4), 631–653 (1979)MathSciNetCrossRefzbMATHGoogle Scholar
  22. 22.
    Raynal, M., Thia-kime, G., Ahamad, M.: From serializable to causal transactions. In: BA. Proc. 20th ACM Symposium on Distributed Computing (PODC 1996), p. 310. ACM Press, New York (1996); Full version: From serializable to causal transactions for collaborative applications. In: Proc. 23th EUROMICRO Conference, pp. 314-321. IEEE Computer Press, Los Alamitos (1997)Google Scholar
  23. 23.
    Riegel, T., Fetzer, C., Felber, P.: Time-based Transactional Memory with Scalable Time Bases. In: Proc. 19th annual ACM Symposium on Parallel Algorithms and Architectures (SPAA 2007), pp. 221–228. ACM Press, New York (2007)Google Scholar
  24. 24.
    Shavit, N., Touitou, D.: Software Transactional Memory. Distributed Computing 10(2), 99–116 (1997)CrossRefGoogle Scholar
  25. 25.
    Shao, C., Pierce, E., Welch, J.: Multi-writer consistency conditions for shared memory objects. In: Fich, F.E. (ed.) DISC 2003. LNCS, vol. 2848, pp. 106–120. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  26. 26.
    Schwarz, R., Mattern, F.: Detecting Causal Relationship in Distributed Computations: in Search of the Holy Grail. Distributed Computing 7, 149–174 (1993)CrossRefzbMATHGoogle Scholar
  27. 27.
    Torres-Rojas, F., Ahamad, M.: Plausible Clocks: Constant Size Logical Clocks for Distributed Systems. Distributed Computing 12, 179–195 (1999)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2010

Authors and Affiliations

  • Damien Imbs
    • 1
  • Michel Raynal
    • 1
  1. 1.IRISA, Université de Rennes 1RennesFrance

Personalised recommendations