Reachability under contextual locking

Rémi Bonnet, Rohit Chadha, P. Madhusudan, Mahesh Viswanathan

Research output: Contribution to journalArticlepeer-review

Abstract

The pairwise reachability problem for a multi-threaded program asks, given control locations in two threads, whether they can be simultaneously reached in an execution of the program. The problem is important for static analysis and is used to detect statements that are concurrently enabled. This problem is in general undecidable even when data is abstracted and when the threads (with recursion) synchronize only using a finite set of locks. Popular programming paradigms that limit the lock usage patterns have been identified under which the pairwise reachability problem becomes decidable. In this paper, we consider a new natural programming paradigm, called contextual locking, which ties the lock usage to calling patterns in each thread: we assume that locks are released in the same context that they were acquired and that every lock acquired by a thread in a procedure call is released before the procedure returns. Our main result is that the pairwise reachability problem is polynomial-time decidable for this new programming paradigm as well. The problem becomes undecidable if the locks are reentrant; reentrant locking is a recursive locking mechanism which allows a thread in a multi-threaded program to acquire the reentrant lock multiple times.

Original languageEnglish (US)
Article number21
JournalLogical Methods in Computer Science
Volume9
Issue number3
DOIs
StatePublished - Sep 17 2013
Externally publishedYes

Keywords

  • Locks
  • Pushdown reachability
  • Reentrant locks
  • Static analysis

ASJC Scopus subject areas

  • Theoretical Computer Science
  • General Computer Science

Fingerprint

Dive into the research topics of 'Reachability under contextual locking'. Together they form a unique fingerprint.

Cite this