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
- Adve, S. V., and Gharachorloo, K. Shared memory consistency models: a tutorial. IEEE Computer 29, 12 (Dec. 1996), 66--76. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- Brinch Hansen, P. Distributed processes: A concurrent programming concept. Communications of the ACM 21, 11 (Nov. 1978), 934--941. Google Scholar
Digital Library
- Brinch Hansen, P. Edison -- a multiprocessor language. Software -- Practice and Experience 11, 4 (Apr. 1981), 325--361.Google Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- Harris, T. L. Design choices for language-based transactions. University of Cambridge Computer Laboratory Tech. Rep., Aug. 2003.Google Scholar
- Hennessy, J. L., and Patterson, D. A. Computer Architecture -- A Quantitative Approach, 3rd~ed. Morgan Kaufmann Publishers, San Francisco, CA, USA, 2003. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
- 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 Scholar
Digital Library
- Lindholm, T., and Yellin, F. The Java Virtual Machine Specification, 2nd ed. Addison-Wesley, Reading, MA, USA, 1999. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- Platt, D. S. Introducing Microsoft .NET, 2nd~ed. Microsoft Press, 2002. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- Scott, M. L. Language support for loosely coupled distributed programs. IEEE Transactions on Software Engineering SE-13, 1 (Jan. 1987), 88--103. Google Scholar
Digital Library
- 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 Scholar
Digital Library
Index Terms
Language support for lightweight transactions






Comments