skip to main content
research-article

Automatic fine-grain locking using shape properties

Published:22 October 2011Publication History
Skip Abstract Section

Abstract

We present a technique for automatically adding fine-grain locking to an abstract data type that is implemented using a dynamic forest -i.e., the data structures may be mutated, even to the point of violating forestness temporarily during the execution of a method of the ADT. Our automatic technique is based on Domination Locking, a novel locking protocol. Domination locking is designed specifically for software concurrency control, and in particular is designed for object-oriented software with destructive pointer updates. Domination locking is a strict generalization of existing locking protocols for dynamically changing graphs. We show our technique can successfully add fine-grain locking to libraries where manually performing locking is extremely challenging. We show that automatic fine-grain locking is more efficient than coarse-grain locking, and obtains similar performance to hand-crafted fine-grain locking.

References

  1. Agrawal, R., Mannila, H., Srikant, R., Toivonen, H., and Verkamo, I. Advances in knowledge discovery and data mining. American Association for Artificial Intelligence, Menlo Park, CA, USA, 1996, ch. Fast discovery of association rules, pp. 307--328. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Aho, A. V., Lam, M. S., Sethi, R., and Ullman, J. D. Compilers: Principles, Techniques, and Tools (2nd Edition). Addison Wesley, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Aragon, C., and Seidel, R. Randomized search trees. Foundations of Computer Science, Annual IEEE Symposium on 0 (1989), 540--545. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Attiya, H., Ramalingam, G., and Rinetzky, N. Sequential verification of serializability. In POPL '10: Proceedings of the 37th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages (New York, NY, USA, 2010), ACM, pp. 31--42. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Barnes, J., and Hut, P. A hierarchical O(N log N) force-calculation algorithm. Nature 324 (Dec. 1986), 446--449.Google ScholarGoogle ScholarCross RefCross Ref
  6. Bayer, R., and Schkolnick, M. Concurrency of operations on B-Trees. Acta Informatica 9 (1977), 1--21.Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Boyapati, C., Lee, R., and Rinard, M. Ownership types for safe programming: preventing data races and deadlocks. In Proceedings of the 17th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications (New York, NY, USA, 2002), OOPSLA '02, ACM, pp. 211--230. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Brass, P. Advanced Data Structures. Cambridge University Press, New York, NY, USA, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Bronson, N. G., Casper, J., Chafi, H., and Olukotun, K. A practical concurrent binary search tree. In PPOPP (2010), pp. 257--268. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Chaudhri, V. K., and Hadzilacos, V. Safe locking policies for dynamic databases. In PODS '95: Proceedings of the fourteenth ACM SIGACT-SIGMOD-SIGART symposium on Principles of database systems (New York, NY, USA, 1995), ACM, pp. 233--244. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Cherem, S., Chilimbi, T., and Gulwani, S. Inferring locks for atomic sections. In PLDI (2008), pp. 304--315. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Cunningham, D., Gudka, K., and Eisenbach, S. Keep off the grass: Locking the right path for atomicity. In Compiler Construction, vol. 4959 of Lecture Notes in Computer Science. Springer Berlin / Heidelberg, 2008, pp. 276--290. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Deutsch, L. P., and Bobrow, D. G. An efficient, incremental, automatic garbage collector. Commun. ACM 19, 9 (1976), 522--526. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Dice, D., Shalev, O., and Shavit, N. Transactional locking ii. In DISC (2006), pp. 194--208. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Emmi, M., Fischer, J. S., Jhala, R., and Majumdar, R. Lock allocation. In POPL (2007), pp. 291--296. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Eswaran, K. P., Gray, J. N., Lorie, R. A., and Traiger, I. L. The notions of consistency and predicate locks in a database system. Commun. ACM 19 (November 1976), 624--633. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Gudka, K., Eisenbach, S., and Harris, T. Lock Inference in the Presence of Large Libraries. Tech. rep., November 2010.Google ScholarGoogle Scholar
  18. Guibas, L. J., and Sedgewick, R. A dichromatic framework for balanced trees. In Proceedings of the 19th Annual Symposium on Foundations of Computer Science (Washington, DC, USA, 1978), IEEE Computer Society, pp. 8--21. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Harris, T., Larus, J., and Rajwar, R. Transactional memory, 2nd edition. Synthesis Lectures on Computer Architecture 5, 1 (2010), 1--263. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Herlihy, M., Lev, Y., Luchangco, V., and Shavit, N. A provably correct scalable concurrent skip list. In OPODIS '06: Proceedings of the 10th International Conference On Principles Of Distributed Systems (December 2006).Google ScholarGoogle Scholar
  21. Herlihy, M., Luchangco, V., Moir, M., and III, W. N. S. Software transactional memory for dynamic-sized data structures. In PODC (2003), pp. 92--101. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Herlihy, M., and Moss, J. E. B. Transactional memory: Architectural support for lock-free data structures. In ISCA (1993), pp. 289--300. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Herlihy, M. P., and Wing, J. M. Linearizability: a correctness condition for concurrent objects. Proc. of ACM TOPLAS 12, 3 (1990), 463--492. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Hicks, M., Foster, J. S., and Prattikakis, P. Lock inference for atomic sections. In Proceedings of the First ACM SIGPLAN Workshop on Languages, Compilers, and Hardware Support for Transactional Computing (June 2006).Google ScholarGoogle Scholar
  25. Kedem, Z. M., and Silberschatz, A. A characterization of database graphs admitting a simple locking protocol. Acta Inf. 16 (1981), 1--13.Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Lanin, V., and Shasha, D. Tree locking on changing trees. Tech. rep., 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Lev-Ami, T., and Sagiv, M. TVLA: A framework for Kleene based static analysis. In Saskatchewan (2000), vol. 1824 of Lecture Notes in Computer Science, Springer-Verlag, pp. 280--301. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Levanoni, Y., and Petrank, E. An on-the-fly reference-counting garbage collector for Java. ACM Trans. Program. Lang. Syst. 28, 1 (2006), 1--69. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. McCloskey, B., Zhou, F., Gay, D., and Brewer, E. Autolocker: synchronization inference for atomic sections. In POPL '06: Conference record of the 33rd ACM SIGPLAN-SIGACT symposium on Principles of programming languages (New York, NY, USA, 2006), ACM, pp. 346--358. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Moss, J. E. B. Open Nested Transactions: Semantics and Support. In Poster at the 4th Workshop on Memory Performance Issues (WMPI-2006). February 2006.Google ScholarGoogle Scholar
  31. Narayanan, R., Özis. Ikyilmaz, B., Zambreno, J., Memik, G., and Choudhary, A. Minebench: A benchmark suite for data mining workloads. In 2006 IEEE International Symposium on Workload Characterization (2006), pp. 182--188.Google ScholarGoogle ScholarCross RefCross Ref
  32. Nurmi, O., and Soisalon-Soininen, E. Uncoupling updating and rebalancing in chromatic binary search trees. In Proceedings of the tenth ACM SIGACT-SIGMOD-SIGART symposium on Principles of database systems (New York, NY, USA, 1991), PODS '91, ACM, pp. 192--198. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. Papadimitriou, C. H. The serializability of concurrent database updates. J. ACM 26, 4 (1979), 631--653. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. Sagiv, M., Reps, T., and Wilhelm, R. Parametric Shape Analysis via 3-valued Logic. ACM Trans. on Prog. Lang. and Systems (TOPLAS) 24, 3 (2002), 217--298. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. Silberschatz, A., and Kedam, Z. A family of locking protocols for database systems that are modeled by directed graphs. Software Engineering, IEEE Transactions on SE-8, 6 (Nov. 1982), 558 -- 562. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. Sleator, D. D., and Tarjan, R. E. Self adjusting heaps. SIAM J. Comput. 15 (February 1986), 52--69. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. Wang, Y., Lafortune, S., Kelly, T., Kudlur, M., and Mahlke, S. A. The theory of deadlock avoidance via discrete control. In POPL (2009), pp. 252--263. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. Weikum, G., and Vossen, G. Transactional information systems: theory, algorithms, and the practice of concurrency control and recovery. Morgan Kaufmann Publishers Inc., San Francisco, CA, USA, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. Welc, A., Saha, B., and Adl-Tabatabai, A.-R. Irrevocable transactions and their applications. In SPAA (2008), pp. 285--296. Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. Yang, H., Lee, O., Berdine, J., Calcagno, C., Cook, B., and Distefano, D. Scalable shape analysis for systems code. In In CAV (2008). Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Automatic fine-grain locking using shape properties

            Recommendations

            Comments

            Login options

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

            Sign in

            Full Access

            • Published in

              cover image ACM SIGPLAN Notices
              ACM SIGPLAN Notices  Volume 46, Issue 10
              OOPSLA '11
              October 2011
              1063 pages
              ISSN:0362-1340
              EISSN:1558-1160
              DOI:10.1145/2076021
              Issue’s Table of Contents
              • cover image ACM Conferences
                OOPSLA '11: Proceedings of the 2011 ACM international conference on Object oriented programming systems languages and applications
                October 2011
                1104 pages
                ISBN:9781450309400
                DOI:10.1145/2048066

              Copyright © 2011 ACM

              Publisher

              Association for Computing Machinery

              New York, NY, United States

              Publication History

              • Published: 22 October 2011

              Check for updates

              Qualifiers

              • research-article

            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!