Type-Safe Multithreaded Programming with Priorities
نویسندگان
چکیده
Many multithreaded programs are naturally interactive and use priorities to ensure responsiveness. Programming with priorities, however, is challenging because existing techniques using a fixed set of priorities do not suffice to express rich priority relations and the lack of language support for the correct usage of priorities can lead to delays due to priority inversion. In this paper, we take an important step toward providing language support for multithreaded programming with priorities. We consider a language that provides the classic spawn-sync (a.k.a., fork-join) interface for threads and that allows the programmer to define priorities and their relationship by defining a partial order relation between them. We then equip the language with a modal type system analogous to S4 modal logic, where the accessibility relation between worlds is assumed to be symmetric and transitive. The type system ensures that priorities are used correctly without priority inversions, thus precluding a whole class of important run-time problems statically. We show that our proposed techniques are realistic by extending the Standard ML language with the necessary primitives to support multithreading and priorities and providing a prototype compiler for the extended language.
منابع مشابه
Memory model for multithreaded C++: Issues
The C++ Standard defines single-threaded program execution. Fundamentally, multithreaded execution requires a much more refined memory and execution model. C++ threading libraries are in the awkward situation of specifying (implicitly or explicitly) an extended memory model for C++ in order to specify program execution. We propose integrating a memory model suitable for multithreaded execution ...
متن کاملSemantics of Multithreaded Java
Java has integrated multithreading to a far greater extent than most programming languages. It is also one of the only languages that specifies and requires safety guarantees for improperly synchronized programs. It turns out that understanding these issues is far more subtle and difficult than was previously thought. The existing specification makes guarantees that prohibit standard and propos...
متن کاملDynamic Verification for File Safety of Multithreaded Programs
In this paper, we present a new semantics to check file safety of multithreaded programs. A file-safe program is one that reaches a final configuration under the proposed semantics. We extend the While language with file operations and multi-threading commands, and call the new language whilef. This paper shows that the file safety is an un-decidable property for whilef. The file safety becomes...
متن کاملProbabilistic Noninterference for Multi-Threaded Programs
We present a probability-sensitive confidentiality specification – a form of probabilistic noninterference – for a small multi-threaded programming language with dynamic thread creation. Probabilistic covert channels arise from a scheduler which is probabilistic. Since scheduling policy is typically outside the language specification for multithreaded languages, we describe how to generalise th...
متن کاملA Type and Effect System for Determinism in Multithreaded Programs
There has been much recent interest in supporting deterministic parallelism in imperative programs. Structured parallel programming models have used type systems or static analysis to enforce determinism by constraining potential interference of lexically scoped tasks. But similar support for multithreaded programming, where threads may be ubiquitously spawned with arbitrary lifetimes, especial...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2017