skip to main content
research-article

Concurrent libraries with foresight

Published:16 June 2013Publication History
Skip Abstract Section

Abstract

Linearizable libraries provide operations that appear to execute atomically. Clients, however, may need to execute a sequence of operations (a composite operation) atomically. We consider the problem of extending a linearizable library to support arbitrary atomic composite operations by clients. We introduce a novel approach in which the concurrent library ensures atomicity of composite operations by exploiting information (foresight) provided by its clients. We use a correctness condition, based on a notion of dynamic right-movers, that guarantees that composite operations execute atomically without deadlocks, and without using rollbacks.

We present a static analysis to infer the foresight information required by our approach, allowing a compiler to automatically insert the foresight information into the client. This relieves the client programmer of this burden and simplifies writing client code.

We present a generic technique for extending the library implementation to realize foresight-based synchronization. This technique is used to implement a general-purpose Java library for Map data structures -- the library permits composite operations to simultaneously work with multiple instances of Map data structures.

We use the Maps library and the static analysis to enforce atomicity of a wide selection of real-life Java composite operations. Our experiments indicate that our approach enables realizing efficient and scalable synchronization for real-life composite operations.

References

  1. gee.cs.oswego.edu/dl/jsr166/dist/jsr166edocs/jsr166e/ConcurrentHashMapV8.html.Google ScholarGoogle Scholar
  2. docs.oracle.com/javase/6/docs/api/java/util/concurrent/ConcurrentHashMap.html.Google ScholarGoogle Scholar
  3. www.devdaily.com/java/jwarehouse/apache-tomcat-6.0.16/java/org/apache/el/util/ConcurrentCache.java.shtml.Google ScholarGoogle Scholar
  4. docs.oracle.com/javase/6/docs/api/java/util/WeakHashMap.html.Google ScholarGoogle Scholar
  5. guava-libraries. code.google.com/p/guava-libraries/.Google ScholarGoogle Scholar
  6. Jgroups toolkit. www.jgroups.org/index.html.Google ScholarGoogle Scholar
  7. AGRAWAL, D., AND EL ABBADI, A. Constrained shared locks for increasing concurrency in databases. In Selected papers of the ACM SIGMOD symposium on Principles of database systems (1995). Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. BERNSTEIN, P. A., HADZILACOS, V., AND GOODMAN, N. Concurrency Control and Recovery in Database Systems. Addison-Wesley, 1987. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. BRONSON, N. Composable Operations on High-Performance Concurrent Collections. PhD thesis, Stanford University, Dec. 2011.Google ScholarGoogle Scholar
  10. CASCAVAL, C., BLUNDELL, C., MICHAEL, M., CAIN, H. W., WU, P., CHIRAS, S., AND CHATTERJEE, S. Software transactional memory: Why is it only a research toy? Queue 6, 5 (Sept. 2008), 46--58. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. CHEREM, S., CHILIMBI, T., AND GULWANI, S. Inferring locks for atomic sections. In PLDI (2008). Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. COURTOIS, P. J., HEYMANS, F., AND PARNAS, D. L. Concurrent control with readers and writers. Commun. ACM 14, 10 (Oct. 1971). Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. GOLAN-GUETA, G., BRONSON, N., AIKEN, A., RAMALINGAM, G., SAGIV, M., AND YAHAV, E. Automatic fine-grain locking using shape properties. In OOPSLA (2011). Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. GOLAN-GUETA, G., RAMALINGAM, G., SAGIV, M., AND YAHAV, E. Concurrent libraries with foresight. Tech. Rep. TR-2012-89, Tel Aviv University, 2012.Google ScholarGoogle Scholar
  15. HARRIS, T., LARUS, J., AND RAJWAR, R. Transactional memory, 2nd edition. Synthesis Lectures on Computer Architecture 5, 1 (2010). Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. HAWKINS, P., AIKEN, A., FISHER, K., RINARD, M., AND SAGIV, M. Concurrent data representation synthesis. In PLDI (2012). Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. HERLIHY, M., LEV, Y., LUCHANGCO, V., AND SHAVIT, N. A provably correct scalable concurrent skip list. In OPODIS (2006).Google ScholarGoogle Scholar
  18. HERLIHY, M., AND SHAVIT, N. The Art of Multiprocessor Programming. Morgan Kauffman, Feb. 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. HERLIHY, M. P., AND WING, J. M. Linearizability: a correctness condition for concurrent objects. ACM Trans. Program. Lang. Syst. 12 (July 1990). Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. KORTH, H. F. Locking primitives in a database system. J. ACM 30 (January 1983), 55--79. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. KOSKINEN, E., PARKINSON, M., AND HERLIHY, M. Coarse-grained transactions. In POPL (2010), pp. 19--30. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. KULKARNI, M., PINGALI, K., WALTER, B., RAMANARAYANAN, G., BALA, K., AND CHEW, L. P. Optimistic parallelism requires abstractions. In PLDI (2007). Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. LIPTON, R. J. Reduction: a method of proving properties of parallel programs. Commun. ACM 18, 12 (Dec. 1975), 717--721. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. MICHAEL, M. M., AND SCOTT, M. L. Simple, fast, and practical non-blocking and blocking concurrent queue algorithms. In PODC (1996), pp. 267--275. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. PAPADIMITRIOU, C. H. The serializability of concurrent database updates. J. ACM 26, 4 (1979), 631--653. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. SCHWARZ, P. M., AND SPECTOR, A. Z. Synchronizing shared abstract types. ACM Trans. Comput. Syst. 2, 3 (Aug. 1984), 223--250. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. SHACHAM, O., BRONSON, N., AIKEN, A., SAGIV, M., VECHEV, M., AND YAHAV, E. Testing atomicity of composed concurrent operations. In OOPSLA (2011). Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. S.A. LCIANU, A., AND RINARD, M. Purity and side effect analysis for Java programs. In VMCAI (2005), pp. 199--215. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. WEIHL, W. E. Commutativity-based concurrency control for abstract data types. IEEE Trans. Comput. 37 (December 1988), 1488--1505. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Concurrent libraries with foresight

                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 48, Issue 6
                  PLDI '13
                  June 2013
                  515 pages
                  ISSN:0362-1340
                  EISSN:1558-1160
                  DOI:10.1145/2499370
                  Issue’s Table of Contents
                  • cover image ACM Conferences
                    PLDI '13: Proceedings of the 34th ACM SIGPLAN Conference on Programming Language Design and Implementation
                    June 2013
                    546 pages
                    ISBN:9781450320146
                    DOI:10.1145/2491956

                  Copyright © 2013 ACM

                  Publisher

                  Association for Computing Machinery

                  New York, NY, United States

                  Publication History

                  • Published: 16 June 2013

                  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!