Semantics of Concurrent Revisions

  • Sebastian Burckhardt
  • Daan Leijen
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6602)


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.


Global State Partial Function Transactional Memory Isolation Type Abstract Data Type 
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.


  1. 1.
    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)Google Scholar
  2. 2.
    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)Google Scholar
  3. 3.
    Baldassin, A., Burckhardt, S.: Lightweight software transactions for games. In: Workshop on Hot Topics in Parallelism, HotPar (2009)Google Scholar
  4. 4.
    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)Google Scholar
  5. 5.
    Berger, E., Yang, T., Liu, T., Novark, G.: Grace: Safe multithreaded programming for C/C++. In: OOPSLA (2009)Google Scholar
  6. 6.
    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)CrossRefGoogle Scholar
  7. 7.
    Bocchino, R., Adve, V., Dig, D., Adve, S., et al.: A type and effect system for deterministic parallel java. In: OOPSLA (2009)Google Scholar
  8. 8.
    Burckhardt, S., Baldassin, A., Leijen, D.: Concurrent programming with revisions and isolation types. In: OOPSLA (October 2010)Google Scholar
  9. 9.
    Burckhardt, S., Leijen, D.: Semantics of concurrent revisions. Technical Report MSR-TR-2010-94, Microsoft Research (2010)Google Scholar
  10. 10.
    Denning, P., Dennis, J.: The resurgence of parallelism. Commun. ACM 53(6) (2010)Google Scholar
  11. 11.
    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)CrossRefGoogle Scholar
  12. 12.
    Flanagan, C., Felleisen, M.: The semantics of future and its use in program optimization, Rice University, pp. 209–220 (1995)Google Scholar
  13. 13.
    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)Google Scholar
  14. 14.
    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)Google Scholar
  15. 15.
    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)CrossRefGoogle Scholar
  16. 16.
    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)Google Scholar
  17. 17.
    Herlihy, M., Wing, J.: Linearizability: a correctness condition for concurrent objects. ACM Trans. Program. Lang. Syst. 12(3), 463–492 (1990)CrossRefGoogle Scholar
  18. 18.
    Huet, G.: Confluent reductions: Abstract properties and applications in term rewriting systems. J. ACM 27(4) (October 1980)Google Scholar
  19. 19.
    Koskinen, E., Parkinson, M., Herlihy, M.: Coarse-grained transactions. In: Principles of Programming Languages, POPL, pp. 19–30 (2010)Google Scholar
  20. 20.
    Kulkarni, M., Pingali, K., Walter, B., Ramanarayanan, G., Bala, K., Chew, L.: Optimistic parallelism requires abstractions. In: PLDI (2007)Google Scholar
  21. 21.
    Lamport, L.: How to make a multiprocessor computer that correctly executes multiprocess programs. IEEE Trans. Comp. C-28(9), 690–691 (1979)CrossRefzbMATHGoogle Scholar
  22. 22.
    Larus, J., Rajwar, R.: Transactional Memory. Morgan & Claypool (2007)Google Scholar
  23. 23.
    Lee, J., Palsberg, J.: Featherweight x10: a core calculus for async-finish parallelism. In: Principles and Practice of Parallel Programming, PPoPP 2010 (2010)Google Scholar
  24. 24.
    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)Google Scholar
  25. 25.
    Moreau, L.: The semantics of scheme with future. In: ACM SIGPLAN International Conference on Functional Programming, ICFP 1996, pp. 146–156 (1996)Google Scholar
  26. 26.
    Bernstein, P.A., Goodman, N.: Multiversion concurrency control—theory and algorithms. ACM Trans. Database Syst. 8(4), 465–483 (1983)MathSciNetCrossRefzbMATHGoogle Scholar
  27. 27.
    Bernstein, P.A., Hadzilacos, V., Goodman, N.: Concurrency Control and Recovery in Database Systems. Addison-Wesley, Reading (1987)Google Scholar
  28. 28.
    Pratikakis, P., Spacco, J., Hicks, M.: Transparent proxies for java futures. SIGPLAN Not. 39(10), 206–223 (2004)CrossRefGoogle Scholar
  29. 29.
    Randall, K.: Cilk: Efficient Multithreaded Computing. PhD thesis, Dept. of Electrical Engineering and Computer Science. MIT, Cambridge (1998)Google Scholar
  30. 30.
    Riegel, T., Fetzer, C., Felber, P.: Snapshot isolation for software transactional memory. In: Workshop on Transactional Computing, TRANSACT (2006)Google Scholar
  31. 31.
    Steele, G.: Parallel programming and parallel abstractions in fortress. In: Hagiya, M. (ed.) FLOPS 2006. LNCS, vol. 3945, pp. 1–1. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  32. 32.
    Welc, A., Jagannathan, S., Hosking, A.: Safe futures for java. In: OOPSLA, pp. 439–453 (2005)Google Scholar
  33. 33.
    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)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2011

Authors and Affiliations

  • Sebastian Burckhardt
    • 1
  • Daan Leijen
    • 1
  1. 1.Microsoft ResearchUSA

Personalised recommendations