A Versatile STM Protocol with Invisible Read Operations That Satisfies the Virtual World Consistency Condition
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.
KeywordsAtomic 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.
- 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.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
- 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
- 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.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
- 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
- 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.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.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
- 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.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