Abstract
Enabling applications to execute various tasks in parallel is difficult if those tasks exhibit read and write conflicts. We recently developed a programming model based on concurrent revisions that addresses this challenge in a novel way: each forked task gets a conceptual copy of all the shared state, and state changes are integrated only when tasks are joined, at which time write-write conflicts are deterministically resolved.
In this paper, we study the precise semantics of this model, in particular its guarantees for determinacy and consistency. First, we introduce a revision calculus that concisely captures the programming model. Despite allowing concurrent execution and locally nondeterministic scheduling, we prove that the calculus is confluent and guarantees determinacy. We show that the consistency guarantees of our calculus are a logical extension of snapshot isolation with support for conflict resolution and nesting. Moreover, we discuss how custom merge functions can provide stronger guarantees for particular data types that are tailored to the needs of the application.
Finally, we show we can visualize the nonlinear history of state in our computations using revision diagrams that clarify the synchronization between tasks and allow local reasoning about state updates.
Chapter PDF
Similar content being viewed by others
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
References
Aditya, S., Arvind, Augustsson, L., Maessen, J.-W., Nikhil, R.: Semantics of pH: A Parallel Dialect of Haskell. In: Hudak, P. (ed.) Proc. Haskell Workshop, La Jolla, CA, USA, pp. 35–49 (June 1995)
Allen, E., Chase, D., Flood, C., Luchangco, V., Maessen, J.-W., Ryu, S., Steele Jr., G.: Project fortress: A multicore language for multicore processors. In: Linux Mag. (September 2007)
Baldassin, A., Burckhardt, S.: Lightweight software transactions for games. In: Workshop on Hot Topics in Parallelism, HotPar (2009)
Berenson, H., Bernstein, P., Gray, J., Melton, J., O’Neil, E., O’Neil, P.: A critique of ANSI SQL isolation levels. In: Proceedings of SIGMOD, pp. 1–10 (1995)
Berger, E., Yang, T., Liu, T., Novark, G.: Grace: Safe multithreaded programming for C/C++. In: OOPSLA (2009)
Blelloch, G., Chatterjee, S., Hardwick, J., Sipelstein, J., Zagha, M.: Impl. of a portable nested data-parallel language. Journal of Par. and Dist. Comp. 21(1), 4–14 (1994)
Bocchino, R., Adve, V., Dig, D., Adve, S., et al.: A type and effect system for deterministic parallel java. In: OOPSLA (2009)
Burckhardt, S., Baldassin, A., Leijen, D.: Concurrent programming with revisions and isolation types. In: OOPSLA (October 2010)
Burckhardt, S., Leijen, D.: Semantics of concurrent revisions. Technical Report MSR-TR-2010-94, Microsoft Research (2010)
Denning, P., Dennis, J.: The resurgence of parallelism. Commun. ACMÂ 53(6) (2010)
Fekete, A., Liarokapis, D., O’Neil, E., O’Neil, P., Shasha, D.: Making snapshot isolation serializable. ACM Trans. Database Syst. 30(2), 492–528 (2005)
Flanagan, C., Felleisen, M.: The semantics of future and its use in program optimization, Rice University, pp. 209–220 (1995)
Frigo, M., Halpern, P., Leiserson, C.E., Lewin-Berlin, S.: Reducers and other cilk++ hyperobjects. In: Sym. on Par. Algorithms and Architectures, SPAA, pp. 79–90 (2009)
Frigo, M., Leiserson, C., Randall, K.: The implementation of the Cilk-5 multithreaded language. In: Programming Language Design and Impl., PLDI, pp. 212–223 (1998)
Harris, T., Cristal, A., Unsal, O., Ayguadé, E., Gagliardi, F., Smith, B., Valero, M.: Transactional memory: An overview. IEEE Micro 27(3), 8–29 (2007)
Herlihy, M., Koskinen, E.: Transactional boosting: a methodology for highly-concurrent transactional objects. In: Principles and Practice of Parallel Programming, PPoPP, pp. 207–216 (2008)
Herlihy, M., Wing, J.: Linearizability: a correctness condition for concurrent objects. ACM Trans. Program. Lang. Syst. 12(3), 463–492 (1990)
Huet, G.: Confluent reductions: Abstract properties and applications in term rewriting systems. J. ACMÂ 27(4) (October 1980)
Koskinen, E., Parkinson, M., Herlihy, M.: Coarse-grained transactions. In: Principles of Programming Languages, POPL, pp. 19–30 (2010)
Kulkarni, M., Pingali, K., Walter, B., Ramanarayanan, G., Bala, K., Chew, L.: Optimistic parallelism requires abstractions. In: PLDI (2007)
Lamport, L.: How to make a multiprocessor computer that correctly executes multiprocess programs. IEEE Trans. Comp. C-28(9), 690–691 (1979)
Larus, J., Rajwar, R.: Transactional Memory. Morgan & Claypool (2007)
Lee, J., Palsberg, J.: Featherweight x10: a core calculus for async-finish parallelism. In: Principles and Practice of Parallel Programming, PPoPP 2010 (2010)
Martin, A., Birrell, A., Harris, T., Isard, M.: Semantics of transactional memory and automatic mutual exclusion. In: Principles of Prog. Lang. POPL, pp. 63–74 (2008)
Moreau, L.: The semantics of scheme with future. In: ACM SIGPLAN International Conference on Functional Programming, ICFP 1996, pp. 146–156 (1996)
Bernstein, P.A., Goodman, N.: Multiversion concurrency control—theory and algorithms. ACM Trans. Database Syst. 8(4), 465–483 (1983)
Bernstein, P.A., Hadzilacos, V., Goodman, N.: Concurrency Control and Recovery in Database Systems. Addison-Wesley, Reading (1987)
Pratikakis, P., Spacco, J., Hicks, M.: Transparent proxies for java futures. SIGPLAN Not. 39(10), 206–223 (2004)
Randall, K.: Cilk: Efficient Multithreaded Computing. PhD thesis, Dept. of Electrical Engineering and Computer Science. MIT, Cambridge (1998)
Riegel, T., Fetzer, C., Felber, P.: Snapshot isolation for software transactional memory. In: Workshop on Transactional Computing, TRANSACT (2006)
Steele, G.: Parallel programming and parallel abstractions in fortress. In: Hagiya, M. (ed.) FLOPS 2006. LNCS, vol. 3945, pp. 1–1. Springer, Heidelberg (2006)
Welc, A., Jagannathan, S., Hosking, A.: Safe futures for java. In: OOPSLA, pp. 439–453 (2005)
Welc, A., Saha, B., Adl-Tabatabai, A.-R.: Irrevocable transactions and their applications. In: Symposium on Parallel Algorithms and Architectures, SPAA, pp. 285–296 (2008)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2011 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Burckhardt, S., Leijen, D. (2011). Semantics of Concurrent Revisions. In: Barthe, G. (eds) Programming Languages and Systems. ESOP 2011. Lecture Notes in Computer Science, vol 6602. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-19718-5_7
Download citation
DOI: https://doi.org/10.1007/978-3-642-19718-5_7
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-19717-8
Online ISBN: 978-3-642-19718-5
eBook Packages: Computer ScienceComputer Science (R0)