Affiliation:
1. Carnegie Mellon University, USA
2. Carnegie Mellon University, USA / Inria, France
Abstract
Multi-threaded programs have traditionally fallen into one of two domains: cooperative and competitive. These two domains have traditionally remained mostly disjoint, with cooperative threading used for increasing throughput in compute-intensive applications such as scientific workloads and cooperative threading used for increasing responsiveness in interactive applications such as GUIs and games. As multicore hardware becomes increasingly mainstream, there is a need for bridging these two disjoint worlds, because many applications mix interaction and computation and would benefit from both cooperative and competitive threading.
In this paper, we present techniques for programming and reasoning about parallel interactive applications that can use both cooperative and competitive threading. Our techniques enable the programmer to write rich parallel interactive programs by creating and synchronizing with threads as needed, and by assigning threads user-defined and partially ordered priorities. To ensure important responsiveness properties, we present a modal type system analogous to S4 modal logic that precludes low-priority threads from delaying high-priority threads, thereby statically preventing a crucial set of priority-inversion bugs. We then present a cost model that allows reasoning about responsiveness and completion time of well-typed programs. The cost model extends the traditional work-span model for cooperative threading to account for competitive scheduling decisions needed to ensure responsiveness. Finally, we show that our proposed techniques are realistic by implementing them as an extension to the Standard ML language.
Funder
National Science Foundation
Publisher
Association for Computing Machinery (ACM)
Subject
Safety, Risk, Reliability and Quality,Software
Cited by
16 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. Modeling and Analyzing Evaluation Cost of CUDA Kernels;ACM Transactions on Parallel Computing;2024-03-12
2. An Efficient Scheduler for Task-Parallel Interactive Applications;Proceedings of the 35th ACM Symposium on Parallelism in Algorithms and Architectures;2023-06-17
3. Efficient Parallel Functional Programming with Effects;Proceedings of the ACM on Programming Languages;2023-06-06
4. Responsive Parallelism with Synchronization;Proceedings of the ACM on Programming Languages;2023-06-06
5. Entanglement detection with near-zero cost;Proceedings of the ACM on Programming Languages;2022-08-29