Snake: Control Flow Distributed Software Transactional Memory

  • Mohamed M. Saad
  • Binoy Ravindran
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6976)


Remote Method Invocation (RMI), Java’s remote procedure call implementation, provides a mechanism for designing distributed Java technology-based applications. It allows methods to be invoked from other Java virtual machines, possibly at different hosts. RMI uses lock-based concurrency control, which suffers from distributed deadlocks, livelocks, and scalability and composability challenges. We present Snake-DSTM, a distributed software transactional memory (D-STM) that is based on the RMI as a mechanism for handling remote calls and transactional memory for distributed concurrency control, as an alternative to RMI/locks. Critical sections are defined as atomic transactions, in which reads and writes to shared, local and remote objects appear to take effect instantaneously. The novelty of Snake-DSTM is in manipulating transactional memory by moving control to remote nodes, rather than remote nodes’ data being copied to the node at which the transaction runs. Transaction metadata is detached from the transactional context, and the dynamic two phase commitment protocol (D2PC) is employed to coordinate the voting process among participating nodes toward making distributed transactional commit decisions. We propose a simple programming model using (Java 5) annotations to define critical sections and remote methods. Instrumentation is used to generate code at class-load time, which significantly simplifies user-space end code. No changes are needed to the underlying virtual machine or compiler. We describe Snake-DSTM’s architecture and implementation, and report on experimental studies comparing it against competing models including RMI with mutual exclusion and read/write locks, distributed shared memory (DSM), and dataflow-based D-STM. Our studies show that Snake-DSTM outperforms competitors by up to 12× on different workloads using a 120-node system.


Virtual Machine Transactional Memory Remote Node Distribute Shared Memory Remote Object 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Partitioned Global Address Space, PGAS (2003)Google Scholar
  2. 2.
    Amza, C., Cox, A.L., Dwarkadas, S., Keleher, P., Lu, H., Rajamony, R., Yu, W., Zwaenepoel, W.: TreadMarks: Shared memory computing on networks of workstations. IEEE Computer (29) (1996)Google Scholar
  3. 3.
    Ansari, M., Kotselidis, C., Luján, M., Kirkham, C., Watson, I.: Investigating contention management for complex transactional memory benchmarks. In: MULTIPROG (2009)Google Scholar
  4. 4.
    Arnold, K., Scheifler, R., Waldo, J., O’Sullivan, B., Wollrath, A.: Jini Specification. Addison-Wesley Longman Publishing Co., Inc., Boston (1999)Google Scholar
  5. 5.
    Bocchino, R.L., Adve, V.S., Chamberlain, B.L.: Software transactional memory for large scale clusters. In: PPoPP 2008, NY, USA, pp. 247–258 (2008)Google Scholar
  6. 6.
    Cachopo, J.A., Rito-Silva, A.: Versioned boxes as the basis for memory transactions. Sci. Comput. Program. 63, 172–185 (2006)MathSciNetCrossRefzbMATHGoogle Scholar
  7. 7.
    Couceiro, M., Romano, P., Carvalho, N., Rodrigues, L.: D2STM: Dependable distributed software transactional memory. In: PRDC 2009 (2009)Google Scholar
  8. 8.
    Demmer, M.J., Herlihy, M.: The Arrow distributed directory protocol. In: Kutten, S. (ed.) DISC 1998. LNCS, vol. 1499, pp. 119–133. Springer, Heidelberg (1998)CrossRefGoogle Scholar
  9. 9.
    Guerraoui, R., Kapalka, M.: The semantics of progress in lock-based transactional memory. SIGPLAN Not. 44, 404–415 (2009)CrossRefzbMATHGoogle Scholar
  10. 10.
    Herlihy, M., Luchangco, V., Moir, M.: A flexible framework for implementing software transactional memory, pp. 253–262. ACM, NY (2006)Google Scholar
  11. 11.
    Herlihy, M., Moss, J.E.B., Eliot, J., Moss, B.: Transactional memory: Architectural support for lock-free data structures. In: ISCA 1993, pp. 289–300 (1993)Google Scholar
  12. 12.
    Herlihy, M., Sun, Y.: Distributed transactional memory for metric-space networks. In: Fraigniaud, P. (ed.) DISC 2005. LNCS, vol. 3724, pp. 324–338. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  13. 13.
    Johnson, T.: Characterizing the performance of algorithms for lock-free objects. IEEE Transactions on Computers 44(10), 1194–1207 (1995)CrossRefzbMATHGoogle Scholar
  14. 14.
    Kotselidis, C., Ansari, M., Jarvis, K., Luján, M., Kirkham, C., Watson, I.: DiSTM: A software transactional memory framework for clusters. In: ICPP 2008, Washington, DC, USA, pp. 51–58 (2008)Google Scholar
  15. 15.
    Korland, G., Shavit, N., Felber, P.: Noninvasive concurrency with Java STM. In: Third Workshop on Programmability Issues for Multi-Core Computers, MULTIPROG (2010)Google Scholar
  16. 16.
    Liskov, B., Day, M., Herlihy, M., Johnson, P., Leavens, G.: Argus reference manual. Technical report, Cambridge University, Cambridge, MA, USA (1987)Google Scholar
  17. 17.
    Moore, K.E., Bobba, J., Moravan, M.J., Hill, M.D., Wood, D.A.: LogTM: Log-based transactional memory. In: HPCA 2006 (2006)Google Scholar
  18. 18.
    Philippsen, M., Zenger, M.: Java Party transparent remote objects in Java. concurrency practice and experience (1997)Google Scholar
  19. 19.
    Raz, Y.: The Dynamic Two Phase Commitment (D2PC) Protocol. In: ICDT 1995, London, UK, pp. 162–176 (1995)Google Scholar
  20. 20.
    Reed, D.P.: Naming and synchronization in a decentralized computer system. Technical report, Cambridge, MA, USA (1978)Google Scholar
  21. 21.
    Reynolds, F.: An architectural overview of alpha: A real-time distributed kernel. In: Proceedings of the Workshop on Micro-kernels and Other Kernel Architectures, Berkeley, CA, USA, pp. 127–146 (1992)Google Scholar
  22. 22.
    Romano, P., Rodrigues, L., Carvalho, N., Cachopo, J.: Cloud-TM: harnessing the cloud with distributed transactional memories. SIGOPS Oper. Syst. Rev. 44, 1–6 (2010)CrossRefGoogle Scholar
  23. 23.
    Saad, M.M., Ravindran, B.: Hyflow: A high performance distributed software transactional memory framework. In: HPDC 2011 (2011)Google Scholar
  24. 24.
    Saad, M.M., Ravindran, B.: Supporting STM in Distributed Systems: Mechanisms and a Java Framework. In: TRANSACT 2011, San Jose, California, USA (2011)Google Scholar
  25. 25.
    Saad, M.M., Ravindran, B.: Transactional Forwarding Algorithm: Technical Report. Technical report, ECE Dept., Virginia Tech (2011)Google Scholar
  26. 26.
    Saad, M.M., Ravindran, B.: RMI-DSTM: Control Flow Distributed Software Transactional Memory: Technical Report. Technical report, ECE Dept., Virginia Tech (2011)Google Scholar
  27. 27.
    Scherer III, W.N., Scott, M.L.: Advanced contention management for dynamic software transactional memory. In: PODC 2005, New York, NY, USA, pp. 240–248 (2005)Google Scholar
  28. 28.
    Scherer III, W.N., Scott, M.L.: Contention management in dynamic software transactional memory. In: PODC 2004, NL, Canada (2004)Google Scholar
  29. 29.
    Shavit, N., Touitou, D.: Software transactional memory. In: PODC 1995, New York, USA, pp. 204–213 (1995)Google Scholar
  30. 30.
    Surdeanu, M., Moldovan, D.: Design and performance analysis of a distributed java virtual machine. IEEE Trans. Parallel Distrib. Syst. 13, 611–627 (2002)CrossRefGoogle Scholar
  31. 31.
    Tatsubori, M., Sasaki, T., Chiba, S., Itano, K.: A bytecode translator for distributed execution of legacy Java software. In: Lee, S.H. (ed.) ECOOP 2001. LNCS, vol. 2072, pp. 236–255. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  32. 32.
    Tilevich, E., Smaragdakis, Y.: J-Orchestra: Automatic Java application partitioning. In: Deng, T. (ed.) ECOOP 2002. LNCS, vol. 2374, pp. 178–204. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  33. 33.
    Veldema, R., Bhoedjang, R.A.F., Bal, H.E.: Distributed shared memory management for java. In: ASCII 2000, p. 256 (2000)Google Scholar
  34. 34.
    Yu, W., Cox, A.: Java/DSM: A platform for heterogeneous computing. Concurrency: Practice and Experience 9(11), 1213–1224 (1997)CrossRefGoogle Scholar
  35. 35.
    Zhang, B., Ravindran, B.: Brief announcement: Relay: A cache-coherence protocol for distributed transactional memory. In: OPODIS 2009, Berlin, Heidelberg, pp. 48–53 (2009)Google Scholar
  36. 36.
    Zhu, W., Wang, C.-L., Lau, F.: Jessica2: a distributed java virtual machine with transparent thread migration support. In: CC 2002 (2002)Google Scholar
  37. 37.
    Cao Minh, C., Chung, J., Kozyrakis, C., Olukotun, K.: STAMP: Stanford transactional applications for multi-processing. In: IISWC 2008 (2008)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2011

Authors and Affiliations

  • Mohamed M. Saad
    • 1
  • Binoy Ravindran
    • 1
  1. 1.ECE Dept.Virginia TechUSA

Personalised recommendations