Deadlock freedom through object ownership

  • Authors:
  • Eric Kerfoot;Steve McKeever;Faraz Torshizi

  • Affiliations:
  • Oxford University Computing Laboratory, Oxford, UK;Oxford University Computing Laboratory, Oxford, UK;University of Toronto, Toronto, Ontario, Canada

  • Venue:
  • International Workshop on Aliasing, Confinement and Ownership in Object-Oriented Programming
  • Year:
  • 2009

Quantified Score

Hi-index 0.00

Visualization

Abstract

Active objects are an attractive method of introducing concurrency into Java-like languages by decoupling method execution from invocation. In this paper, we show how ownership is used in the Java [14] subset language CoJava [17] to prevent deadlock associated with active object method calls. This approach builds on existing type-based approaches that eliminates data races and data-based deadlock in concurrent systems. The novel addition is the use of ownership to organize active objects, thus preventing deadlock from arising when objects are allowed to block awaiting responses from others. Typechecking is used to prevent threads from sharing mutable data, thus CoJava is free of data races and data-based deadlock. Behavioural deadlock is prevented by the use of promise objects which prevent clients from blocking indefinitely while awaiting responses. Ownership imposes a hierarchy on active objects; this allows owners to safely block while waiting for responses from owned objects. The paper also discusses the implications of this approach to specification with JML, formal reasoning about programs, and the consequences to runtime assertion checking.