Responsive Parallelism with Synchronization

04/07/2023
by   Stefan K. Muller, et al.
0

Many concurrent programs assign priorities to threads to improve responsiveness. When used in conjunction with synchronization mechanisms such as mutexes and condition variables, however, priorities can lead to priority inversions, in which high-priority threads are delayed by low-priority ones. Priority inversions in the use of mutexes are easily handled using dynamic techniques such as priority inheritance, but priority inversions in the use of condition variables are not well-studied and dynamic techniques are not suitable. In this work, we use a combination of static and dynamic techniques to prevent priority inversion in code that uses mutexes and condition variables. A type system ensures that condition variables are used safely, even while dynamic techniques change thread priorities at runtime to eliminate priority inversions in the use of mutexes. We prove the soundness of our system, using a model of priority inversions based on cost models for parallel programs. To show that the type system is practical to implement, we encode it within the type systems of Rust and C++, and show that the restrictions are not overly burdensome by writing sizeable case studies using these encodings, including porting the Memcached object server to use our C++ implementation.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
07/10/2018

Competitive Parallelism: Getting Your Priorities Right

Multi-threaded programs have traditionally fallen into one of two domain...
research
01/22/2020

Axiomatizing Maximal Progress and Discrete Time

Milner's complete proof system for observational congruence is crucially...
research
07/21/2022

PA-PUF: A Novel Priority Arbiter PUF

This paper proposes a 3-input arbiter-based novel physically unclonable ...
research
04/06/2020

Responsive Parallelism with Futures and State

Motivated by the increasing shift to multicore computers, recent work ha...
research
09/20/2019

Multiprocessor Real-Time Locking Protocols: A Systematic Review

We systematically survey the literature on analytically sound multiproce...
research
01/29/2023

Multi-Priority Graph Sparsification

A sparsification of a given graph G is a sparser graph (typically a subg...
research
06/04/2014

Timing Analysis for DAG-based and GFP Scheduled Tasks

Modern embedded systems have made the transition from single-core to mul...

Please sign up or login with your details

Forgot password? Click here to reset