10.1145/949305.949340acmconferencesArticle/Chapter ViewAbstractPublication PagessplashConference Proceedings
Article

Language support for lightweight transactions

ABSTRACT

Concurrent programming is notoriously difficult. Current abstractions are intricate and make it hard to design computer systems that are reliable and scalable. We argue that these problems can be addressed by moving to a declarative style of concurrency control in which programmers directly indicate the safety properties that they require. In our scheme the programmer demarks sections of code which execute within lightweight software-based transactions that commit atomically and exactly once. These transactions can update shared data, instantiate objects, invoke library features and so on. They can also block, waiting for arbitrary boolean conditions to become true. Transactions which do not access the same shared memory locations can commit concurrently. Furthermore, in general, no performance penalty is incurred for memory accesses outside transactions.We present a detailed design of this proposal along with an implementation and evaluation. We argue that the resulting system (i) is easier for mainstream programmers to use, (ii) prevents lock-based priority-inversion and deadlock problems and (iii) can offer performance advantages.

References

  1. Adve, S. V., and Gharachorloo, K. Shared memory consistency models: a tutorial. IEEE Computer 29, 12 (Dec. 1996), 66--76. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Agesen, O., Detlefs, D., Garthwaite, A., Knippel, R., Ramakrishna, Y. S., and White, D. An efficient meta-lock for implementing ubiquitous synchronization. In Proceedings of Object-Oriented Programming, Systems, Languages & Applications (Nov. 1999), vol. 34(10) of ACM SIGPLAN Notices, pp. 207--222. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Andrews, G. R. Concurrent Programming: Principles and Practice. Benjamin/Cummings Publishing Company, Inc., 1991. Bacon, J., and Harris, T. L. Operating Systems: Concurrent and Distributed Software Design, 3rd ed. Addison Wesley, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Brinch Hansen, P. Distributed processes: A concurrent programming concept. Communications of the ACM 21, 11 (Nov. 1978), 934--941. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Brinch Hansen, P. Edison -- a multiprocessor language. Software -- Practice and Experience 11, 4 (Apr. 1981), 325--361.Google ScholarGoogle Scholar
  6. Flanagan, C., and Qadeer, S. Types for atomicity. In Proceedings of the Workshop on Types in Language Design and Implementation (Mar. 2003), vol. 38(3) of ACM SIGPLAN Notices, pp. 1--12. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Harris, T. L., Fraser, K., and Pratt, I. A. A practical multi-word compare-and-swap operation. In Proceedings of the 16th International Symposium on Distributed Computing (Oct. 2002), pp. 265--279. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Harris, T. L. Design choices for language-based transactions. University of Cambridge Computer Laboratory Tech. Rep., Aug. 2003.Google ScholarGoogle Scholar
  9. Hennessy, J. L., and Patterson, D. A. Computer Architecture -- A Quantitative Approach, 3rd~ed. Morgan Kaufmann Publishers, San Francisco, CA, USA, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Herlihy, M., Luchangco, V., Moir, M., and Scherer, W. Software transactional memory for dynamic-sized data structures. In Proceedings of the 22nd Annual ACM Symposium on Principles of Distributed Computing (July 2003), pp. 92--101. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Herlihy, M., Luchangco, V., and Moir, M. Obstruction-free synchronization: Double-ended queues as an example. In Proceedings of the 23rd International Conference on Distributed Computing Systems (2003). Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Herlihy, M., Luchangco, V., and Moir, M. The repeat offender problem: A mechanism for supporting dynamic-sized, lock-free data structures. In Proceedings of the 16th International Symposium on Distributed Computing (Oct. 2002), pp. 339--353. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Herlihy, M., and Moss, J. E. B. Transactional memory: Architectural support for lock-free data structures. In Proceedings of the 20th Annual International Symposium on Computer Architecture (May 1993), IEEE Computer Society Press, pp. 289--301. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Hoare, C. A. R. Towards a theory of parallel programming. In Operating Systems Techniques (1972), vol. 9 of A.P.I.C. Studies in Data Processing, Academic Press, pp. 61--71.Google ScholarGoogle Scholar
  15. Liang, S., and Bracha, G. Dynamic class loading in the Java Virtual Machine. In Proceedings of Object-Oriented Programming, Systems, Languages & Applications (Oct. 1998), vol. 33(10) of ACM SIGPLAN Notices, pp. 36--44. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Lindholm, T., and Yellin, F. The Java Virtual Machine Specification, 2nd ed. Addison-Wesley, Reading, MA, USA, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Liskov, B., and Scheifler, R. Guardians and actions: linguistic aupport for robust, distributed programs. ACM Transactions on Programming Languages and Systems 5, 3 (July 1983), 381--404. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Lomet, D. B. Process structuring, synchronization and recovery using atomic actions Proceedings of an ACM Conference on Language Design for Reliable Software (Mar. 1977), 128--137. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Manson, J., and Pugh, W. Semantics of multithreaded Java. Tech. Rep. UCMP-CS-4215, Department of Computer Science, University of Maryland, College Park, Jan. 2002.Google ScholarGoogle Scholar
  20. Michael, M. M. Safe memory reclamation for dynamic lock-free objects using atomic reads and writes. In Proceedings of the 21st Annual ACM Symposium on Principles of Distributed Computing (July 2002), ACM Press, pp. 21--30. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Michael, M. M., and Scott, M. L. Correction of a memory management method for lock-free data structures. Tech. Rep. TR599, University of Rochester, Computer Science Department, Dec. 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Moir, M. Transparent support for wait-free transactions. In Proceedings of the 11th International Workshop on Distributed Algorithms (Sept. 1997), vol. 1320 of Lecture Notes in ComputerScience, Springer-Verlag, pp. 305--319. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Platt, D. S. Introducing Microsoft .NET, 2nd~ed. Microsoft Press, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Schmid, H. A. On the efficient implementation of conditional critical regions and the construction of monitors. Acta Informatica 6, 3 (Aug. 1976), 227--249.Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Scott, M. L. Language support for loosely coupled distributed programs. IEEE Transactions on Software Engineering SE-13, 1 (Jan. 1987), 88--103. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Shavit, N., and Touitou, D. Software transactional memory. In Proceedings of the 14th Annual ACM Symposium on Principles of Distributed Computing (Aug. 1995), ACM Press, pp. 204--213. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Language support for lightweight transactions

          Comments

          Login options

          Check if you have access through your login credentials or your institution to get full access on this article.

          Sign in

          PDF Format

          View or Download as a PDF file.

          PDF

          eReader

          View online with eReader.

          eReader
          About Cookies On This Site

          We use cookies to ensure that we give you the best experience on our website.

          Learn more

          Got it!