Freeze After Writing Quasi-Deterministic Parallel Programming with LVars and Handlers

ثبت نشده
چکیده

Deterministic-by-construction parallel programming models offer programmers the promise of freedom from subtle, hard-toreproduce nondeterministic bugs in parallel code. A principled approach to deterministic-by-construction parallel programming with shared state is offered by LVars: shared memory locations whose semantics are defined in terms of a user-specified lattice. Writes to an LVar take the least upper bound of the old and new values with respect to the lattice, while reads from an LVar can observe only that its contents have crossed a specified threshold in the lattice. Although it guarantees determinism, this interface is quite limited. We extend LVars in two ways. First, we add the ability to “freeze” and then read the contents of an LVar directly. Second, we add the ability to attach callback functions to an LVar, allowing events to be triggered by writes to it. Together, callbacks and freezing enable an expressive and useful style of parallel programming. We prove that in a language where communication takes place through freezable LVars, programs are at worst quasi-deterministic: on every run, they either produce the same answer or raise an error. We demonstrate the viability of our approach by implementing a library for Haskell supporting a variety of LVar-based data structures, together with two case studies that illustrate the programming model and yield promising parallel speedup.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Freeze After Writing Quasi-Deterministic Parallel Programming with LVars and Handlers

Deterministic-by-construction parallel programming models of-fer programmers the promise of freedom from subtle, hard-to-reproduce nondeterministic bugs in parallel code. A principled ap-proach to deterministic-by-construction parallel programming withshared state is offered by LVars: shared memory locations whosesemantics are defined in terms of a user-specified lattice. Wr...

متن کامل

Freeze After Writing Quasi-Deterministic Parallel Programming with LVars and Handlers

Deterministic-by-construction parallel programming models offer programmers the promise of freedom from subtle, hard-toreproduce nondeterministic bugs in parallel code. A principled approach to deterministic-by-construction parallel programming with shared state is offered by LVars: shared memory locations whose semantics are defined in terms of a user-specified lattice. Writes to an LVar take ...

متن کامل

Thesis Proposal: Lattice-based Data Structures for Deterministic Parallel and Distributed Programming

Deterministic-by-construction parallel programming models guarantee that programs written using them will have the same observable behavior on every run. These models offer the promise of freedom from subtle, hard-to-reproduce bugs caused by schedule nondeterminism. In order to guarantee determinism, though, deterministic-by-construction models must sharply restrict the sharing of state between...

متن کامل

Joining Forces Toward a Unified Account of LVars and Convergent Replicated Data Types

LVars—shared memory locations whose semantics are defined in terms of an application-specific lattice—offer a principled approach to deterministic-by-construction, shared-state parallel programming: writes to an LVar take the join of the old and new values with respect to the lattice, while reads from an LVar can observe only that its contents have crossed a specified “threshold” in the lattice...

متن کامل

Parallel Type-checking with Saturating LVars

Given the sophistication of recent type systems, unification-based type-checking and inference can be a time-consuming phase of compilation—especially when union types are combined with subtyping. It is natural to consider improving performance through parallelism, but these algorithms are challenging to parallelize due to complicated control structure and difficulties representing data in a wa...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2013