skip to main content
research-article

Automatic scalable atomicity via semantic locking

Published:24 January 2015Publication History
Skip Abstract Section

Abstract

In this paper, we consider concurrent programs in which the shared state consists of instances of linearizable ADTs (abstract data types). We present an automated approach to concurrency control that addresses a common need: the need to atomically execute a code fragment, which may contain multiple ADT operations on multiple ADT instances. We present a synthesis algorithm that automatically enforces atomicity of given code fragments (in a client program) by inserting pessimistic synchronization that guarantees atomicity and deadlock-freedom (without using any rollback mechanism). Our algorithm takes a commutativity specification as an extra input. This specification indicates for every pair of ADT operations the conditions under which the operations commute. Our algorithm enables greater parallelism by permitting commuting operations to execute concurrently. We have implemented the synthesis algorithm in a Java compiler, and applied it to several Java programs. Our results show that our approach produces efficient and scalable synchronization.

References

  1. gee.cs.oswego.edu/dl/jsr166/dist/jsr166edocs/ jsr166e/ConcurrentHashMapV8.html.Google ScholarGoogle Scholar
  2. www.devdaily.com/java/jwarehouse/apache-tomcat- 6.0.16/java/org/apache/el/util/ConcurrentCache.java.shtml.Google ScholarGoogle Scholar
  3. guava-libraries. code.google.com/p/guava-libraries/.Google ScholarGoogle Scholar
  4. Wala. http://wala.sourceforge.net.Google ScholarGoogle Scholar
  5. B ERNSTEIN, P. A., H ADZILACOS, V., AND G OODMAN, N. Concurrency Control and Recovery in Database Systems. Addison-Wesley, 1987. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. C AO M INH, C., C HUNG, J., K OZYRAKIS, C., AND O LUKOTUN, K. STAMP: Stanford transactional applications for multi-processing. In IISWC (2008).Google ScholarGoogle Scholar
  7. C ASCAVAL, C., B LUNDELL, C., M ICHAEL, M., C AIN, H. W., W U, P., C HIRAS, S., AND C HATTERJEE, S. Software transactional memory: Why is it only a research toy? Queue 6, 5 (Sept. 2008), 46–58. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. G OLAN -G UETA, G., R AMALINGAM, G., S AGIV, M., AND Y AHAV, E. Concurrent libraries with foresight. In PLDI (2013). Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. G UDKA, K., H ARRIS, T., AND E ISENBACH, S. Lock inference in the presence of large libraries. In ECOOP. 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. H ARRIS, T., L ARUS, J., AND R AJWAR, R. Transactional memory, 2nd edition. Synthesis Lectures on Computer Architecture 5, 1 (2010). Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. H AWKINS, P., A IKEN, A., F ISHER, K., R INARD, M., AND S AGIV, M. Concurrent data representation synthesis. In PLDI (2012). Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. H ERLIHY, M., L EV, Y., L UCHANGCO, V., AND S HAVIT, N. A provably correct scalable concurrent skip list. In OPODIS (2006).Google ScholarGoogle Scholar
  13. H ERLIHY, M., AND S HAVIT, N. The Art of Multiprocessor Programming. Morgan Kauffman, Feb. 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. H ERLIHY, M. P., AND W ING, J. M. Linearizability: A correctness condition for concurrent objects. TOPLAS 12 (1990). Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. K ORLAND, G., S HAVIT, N., AND F ELBER, P. Noninvasive concurrency with java stm. In MULTIPROG (2010).Google ScholarGoogle Scholar
  16. K OSKINEN, E., P ARKINSON, M., AND H ERLIHY, M. Coarse-grained transactions. In POPL (2010), pp. 19–30. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. L HOTÁK, O., AND H ENDREN, L. Scaling java points-to analysis using spark. In Proceedings of the 12th international conference on Compiler construction (2003), CC’03. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. M C C LOSKEY, B., Z HOU, F., G AY, D., AND B REWER, E. Autolocker: synchronization inference for atomic sections. In POPL (2006). Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. N IELSON, F., N IELSON, H. R., AND H ANKIN, C. Principles of Program Analysis. Springer-Verlag New York, Inc., 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. S CHWARZ, P. M., AND S PECTOR, A. Z. Synchronizing shared abstract types. ACM Trans. Comput. Syst. 2, 3 (Aug. 1984), 223–250. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. S HACHAM, O., B RONSON, N., A IKEN, A., S AGIV, M., V ECHEV, M., AND Y AHAV, E. Testing atomicity of composed concurrent operations. In OOPSLA (2011). Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Automatic scalable atomicity via semantic locking

        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 50, Issue 8
          PPoPP '15
          August 2015
          290 pages
          ISSN:0362-1340
          EISSN:1558-1160
          DOI:10.1145/2858788
          • Editor:
          • Andy Gill
          Issue’s Table of Contents
          • cover image ACM Conferences
            PPoPP 2015: Proceedings of the 20th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming
            January 2015
            290 pages
            ISBN:9781450332057
            DOI:10.1145/2688500

          Copyright © 2015 ACM

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 24 January 2015

          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!