Turning nondeterminism into parallelism

Omer Tripp, Eric Koskinen, Mooly Sagiv
2013 SIGPLAN notices  
Nondeterminism is a useful and prevalent concept in the design and implementation of software systems. An important property of nondeterminism is its latent parallelism: A nondeterministic action can evaluate to multiple behaviors. If at least one of these behaviors does not conflict with concurrent tasks, then there is an admissible execution of the action in parallel with these tasks. Unfortunately, existing implementations of the atomic paradigm-optimistic as well as pessimistic-are unable
more » ... fully exhaust the parallelism potential of nondeterministic actions, lacking the means to guide concurrent tasks toward nondeterministic choices that minimize interference. This paper investigates the problem of utilizing parallelism due to nondeterminism. We observe that nondeterminism occurs in many real-world codes. We explain why existing approaches fail to exploit this source of parallelism. Namely, what is missing is a communication mechanism that enables nondeterministic tasks to coordinate their simultaneous execution effectively. This limits the ability by both speculative and lock-based synchronization to exhaust parallelism. We have developed a system that features the needed coordination facilities, allowing tasks to look into the future of other tasks and reduce conflict accordingly. We evaluate our system on a suite of 12 challenging algorithmic benchmarks of wide applicability, as well as a large-scale commercial application. The results are encouraging.
doi:10.1145/2544173.2509533 fatcat:kz7qmatrercodgfvev4jv6rvmy