Abstract

There is an ongoing effort to provide programming abstractions that ease the burden of exploiting multicore hardware. Many programming abstractions (e.g., concurrent objects, transactional memory, etc) simplify matters, but still involve intricate engineering. We argue that some difficulty of multicore programming can be meliorated through a declarative programming style in which programmers directly express the independence of fragments of sequential programs. In our proposed paradigm, programmers write programs in a familiar, sequential manner, with the added ability to explicitly express the conditions under which code fragments commute. Putting such commutativity conditions into source code offers a new entry point to exploit the known connection between commutativity and parallelism. We give sequential and concurrent semantics for commute statements, as well as a correctness condition called scoped serializability and discuss how it can be enforced when combined with commutativity conditions. We next describe a technique for automatically synthesizing commute conditions directly from source code via a new reduction to commutativity of object methods. We implemented our work in a new language called Veracity, implemented in Multicore OCaml and on top of Servois and the libcuckoo concurrent hashtable. We provide the first benchmarks programs with commute blocks. We show that commute conditions can be synthesized even for non-linear programs; we confirm the expectation that concurrency speedups can be seen as the computation increases; and we apply our work to a small in-memory filesystem and a crowdfund blockchain smart contract.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call