Contention Bounds for Locking Computations
Author(s)
Li, Wanlin
DownloadThesis PDF (938.2Kb)
Advisor
Leiserson, Charles E.
Kuszmaul, William
Terms of use
Metadata
Show full item recordAbstract
This thesis quantifies lock contention in multithreaded programs by expanding the theoretical model of task-parallel execution traces to account for mutual exclusion locks. While lock profiling and contention detection tools abound in software, empirical measurements of contention suffer from wide fluctuations across different executions of the same code due to scheduling variation and processor availability. In this work we present analytical bounds on the maximum possible contention incurred by a given program over all possible execution schedules, even when running alongside other programs in a busy environment or when scheduled by an adversary. Although we show that computing the exact optimum is NP-hard for general task graphs, in the restricted case of fork-join (series-parallel) computations with 𝑛 strands and a single lock we offer a Θ(𝑛²) exact algorithm as well as a Θ(𝑛) 2-approximation for worst case contention. In proving these bounds linking maximum contention to the antichain sizes of a program’s parallel trace, we establish graph-based properties of worst case execution schedules that also apply directly to the related single processor scheduling problem of average response time under task precedence constraints. In addition, our analysis of worst case contention offers improved estimates for the completion time of locking computations under the execution trace model.
Date issued
2022-05Department
Massachusetts Institute of Technology. Department of Electrical Engineering and Computer SciencePublisher
Massachusetts Institute of Technology