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.
- gee.cs.oswego.edu/dl/jsr166/dist/jsr166edocs/jsr166e/ConcurrentHashMapV8.html.Google Scholar
- docs.oracle.com/javase/6/docs/api/java/util/concurrent/ConcurrentHashMap.html.Google Scholar
- www.devdaily.com/java/jwarehouse/apache-tomcat-6.0.16/java/org/apache/el/util/ConcurrentCache.java.shtml.Google Scholar
- docs.oracle.com/javase/6/docs/api/java/util/WeakHashMap.html.Google Scholar
- guava-libraries. code.google.com/p/guava-libraries/.Google Scholar
- Jgroups toolkit. www.jgroups.org/index.html.Google Scholar
- 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 Scholar
Digital Library
- BERNSTEIN, P. A., HADZILACOS, V., AND GOODMAN, N. Concurrency Control and Recovery in Database Systems. Addison-Wesley, 1987. Google Scholar
Digital Library
- BRONSON, N. Composable Operations on High-Performance Concurrent Collections. PhD thesis, Stanford University, Dec. 2011.Google Scholar
- 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 Scholar
Digital Library
- CHEREM, S., CHILIMBI, T., AND GULWANI, S. Inferring locks for atomic sections. In PLDI (2008). Google Scholar
Digital Library
- COURTOIS, P. J., HEYMANS, F., AND PARNAS, D. L. Concurrent control with readers and writers. Commun. ACM 14, 10 (Oct. 1971). Google Scholar
Digital Library
- 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 Scholar
Digital Library
- GOLAN-GUETA, G., RAMALINGAM, G., SAGIV, M., AND YAHAV, E. Concurrent libraries with foresight. Tech. Rep. TR-2012-89, Tel Aviv University, 2012.Google Scholar
- HARRIS, T., LARUS, J., AND RAJWAR, R. Transactional memory, 2nd edition. Synthesis Lectures on Computer Architecture 5, 1 (2010). Google Scholar
Digital Library
- HAWKINS, P., AIKEN, A., FISHER, K., RINARD, M., AND SAGIV, M. Concurrent data representation synthesis. In PLDI (2012). Google Scholar
Digital Library
- HERLIHY, M., LEV, Y., LUCHANGCO, V., AND SHAVIT, N. A provably correct scalable concurrent skip list. In OPODIS (2006).Google Scholar
- HERLIHY, M., AND SHAVIT, N. The Art of Multiprocessor Programming. Morgan Kauffman, Feb. 2008. Google Scholar
Digital Library
- HERLIHY, M. P., AND WING, J. M. Linearizability: a correctness condition for concurrent objects. ACM Trans. Program. Lang. Syst. 12 (July 1990). Google Scholar
Digital Library
- KORTH, H. F. Locking primitives in a database system. J. ACM 30 (January 1983), 55--79. Google Scholar
Digital Library
- KOSKINEN, E., PARKINSON, M., AND HERLIHY, M. Coarse-grained transactions. In POPL (2010), pp. 19--30. Google Scholar
Digital Library
- KULKARNI, M., PINGALI, K., WALTER, B., RAMANARAYANAN, G., BALA, K., AND CHEW, L. P. Optimistic parallelism requires abstractions. In PLDI (2007). Google Scholar
Digital Library
- LIPTON, R. J. Reduction: a method of proving properties of parallel programs. Commun. ACM 18, 12 (Dec. 1975), 717--721. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- PAPADIMITRIOU, C. H. The serializability of concurrent database updates. J. ACM 26, 4 (1979), 631--653. Google Scholar
Digital Library
- SCHWARZ, P. M., AND SPECTOR, A. Z. Synchronizing shared abstract types. ACM Trans. Comput. Syst. 2, 3 (Aug. 1984), 223--250. Google Scholar
Digital Library
- SHACHAM, O., BRONSON, N., AIKEN, A., SAGIV, M., VECHEV, M., AND YAHAV, E. Testing atomicity of composed concurrent operations. In OOPSLA (2011). Google Scholar
Digital Library
- S.A. LCIANU, A., AND RINARD, M. Purity and side effect analysis for Java programs. In VMCAI (2005), pp. 199--215. Google Scholar
Digital Library
- WEIHL, W. E. Commutativity-based concurrency control for abstract data types. IEEE Trans. Comput. 37 (December 1988), 1488--1505. Google Scholar
Digital Library
Index Terms
Concurrent libraries with foresight
Recommendations
Concurrent libraries with foresight
PLDI '13: Proceedings of the 34th ACM SIGPLAN Conference on Programming Language Design and ImplementationLinearizable 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 ...
Transactional data structure libraries
PLDI '16: Proceedings of the 37th ACM SIGPLAN Conference on Programming Language Design and ImplementationWe introduce transactions into libraries of concurrent data structures; such transactions can be used to ensure atomicity of sequences of data structure operations. By focusing on transactional access to a well-defined set of data structure operations, ...
Transactional data structure libraries
PLDI '16We introduce transactions into libraries of concurrent data structures; such transactions can be used to ensure atomicity of sequences of data structure operations. By focusing on transactional access to a well-defined set of data structure operations, ...







Comments