A Modular Scheme for Deadlock Prevention in an Object-Oriented Programming Model (original) (raw)

Detecting deadlock in programs with data-centric synchronization

2013 35th International Conference on Software Engineering (ICSE), 2013

Previously, we developed a data-centric approach to concurrency control in which programmers specify synchronization constraints declaratively, by grouping shared locations into atomic sets. We implemented our ideas in a Java extension called AJ, using Java locks to implement synchronization. We proved that atomicity violations are prevented by construction, and demonstrated that realistic Java programs can be refactored into AJ without significant loss of performance.

Concurrent Object-Oriented Programs: From Specification to Code

Formal Methods for Components and Objects, First International Symposium, FMCO 02, 2003

In this paper we put forward a concurrent object-oriented programming language in which concurrency is tightly integrated with objects. Concurrency is expressed by extending classes with actions and allowing methods to be guarded. Concurrency in an object may be hidden to the outside, thus allowing concurrency to be introduced in subclasses of a class hierarchy. A disciplined form of intra-object concurrency is supported. The language is formally defined by translation to action systems. Inheritance and subtyping are also considered. A theory of class refinement is presented, allowing concurrent programs to be developed from sequential specifications. Our goal is to have direct rules for verification and refinement on one hand and a practical implementation on the other hand. We briefly sketch our implementation. While the implementation relies on threads, the management of threads is hidden to the programmer.

Efficient and reasonable object-oriented concurrency

Proceedings of the 20th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, 2015

Making threaded programs safe and easy to reason about is one of the chief difficulties in modern programming. This work provides an efficient execution model for SCOOP, a concurrency approach that provides not only data-race freedom but also pre/postcondition reasoning guarantees between threads. The extensions we propose influence both the underlying semantics to increase the amount of concurrent execution that is possible, exclude certain classes of deadlocks, and enable greater performance. These extensions are used as the basis of an efficient runtime and optimization pass that improve performance 15× over a baseline implementation. This new implementation of SCOOP is, on average, also 2× faster than other well-known safe concurrent languages. The measurements are based on both coordination-intensive and data-manipulation-intensive benchmarks designed to offer a mixture of workloads.

A Programmer-Oriented Approach to Safe Concurrency

2003

Assuring and evolving concurrent programs requires understanding the concurrencyrelated design decisions used in their implementation. In Java-style shared-memory programs, these decisions include which state is shared, how access to it is regulated, and the policy that distinguishes desired concurrency from race conditions. Source code often does not reveal these design decisions because they rarely have purely local manifestations in the code, or because they cannot be inferred from code. Many programmers believe it is too difficult to explicate the models in ordinary practice. As a result, this design intent is usually not expressed, and it is therefore generally infeasible to assure that concurrent programs are free of race conditions. This thesis is about a practicable approach to capturing and expressing design intent, and, through the use of annotations and composable static analyses, assuring consistency of code and intent as both evolve. We use case studies from production Java code and a prototype analysis tool to explore the costs and benefits of a new annotationbased approach for expressing design intent. Our annotations express "mechanical" properties that programmers must already be considering, such as lock-state associations, uniqueness of references, and conceptual aggregations of state. Our analyses reveal race conditions in a variety of case study samples which were drawn from library code and production open source projects. We developed a prototype tool that embodies static analysis techniques for assuring consistency between code and models (expressed as code annotations). Our experience with the tool provides some preliminary evidence of the practicability of our approach for ordinary programmers on deadlines. The dominant design consideration for the tool was adherence to the principle of "early gratification"-some assurance can be obtained with minimal or no annotation effort, and additional increments of annotation are rewarded with additional increments of assurance. The novel technical features of this approach include (1) regions as flexible aggregations of state that can cross object boundaries, (2) a region-based object-oriented effects system; (3) analysis to track the association of locks with regions, (4) policy descriptions for allowable method interleavings, and (5) an incremental process for inserting, validating, and exploiting annotations. It's been a longer journey than I originally intended, but I'm finally done with my dissertation. This was not a solitary journey, and I owe thanks to the many people who gave me support along the way. Obviously, I would like to thank my advisor, Bill Scherlis, for his invaluable advice, guidance, encouragement, and enthusiasm. I'd like to thank my co-advisor, Thomas Gross, and the rest of my committee for their time and for the helpful feedback they have provided. My research wasn't performed in a vacuum, and without the research and engineering results of the other members of the Fluid Group, this dissertation would never have been possible. Thank you,

The ClassiC programming language and design of synchronous concurrent object oriented languages

Journal of Systems Architecture, 1998

Many real-time systems make use of concurrent programming systems and are often designed using object oriented design methods. Concurrent Object Oriented Languages (COOLS) are a class of programming language that integrates the facilities of concurrent and object oriented programming in an integrated rather than orthogonal manner. With the increasing interest in the use of object oriented languages such as C++ for the programming of embedded and real-time systems COOLs seem to be a natural candidate for such tasks. Several COOLs have been described in the literature which address the requirements of concurrent programming, inter-process communication (IPC) and synchronisation in various dierent ways. This paper discusses one such language, ClassiC, and examines the approach to this problem taken in its design. In particular, it is shown that the features of ClassiC allow derivation of active classes from other active classes. It is shown how this property can be used to overcome some of the problems associated with synchronous IPC schemes while maintaining the advantages of them and how the use of the asynchronous IPC model allows ver-i®cation of synchronisation and deadlock properties based on the use of CSP methods.

Ownership types for safe programming: preventing data races and deadlocks

2002

This paper presents a new static type system for multithreaded programs; well-typed programs in our system are guaranteed to be free of data races and deadlocks. Our type system allows programmers to partition the locks into a fixed number of equivalence classes and specify a partial order among the equivalence classes. The type checker then statically verifies that whenever a thread holds more than one lock, the thread acquires the locks in the descending order.

Abstract Writing Concurrent Object-Oriented Programs

1989

This paper considers a number of ways in which concurrent programs may be expressed within an object-oriented framework. It goes on to describe work investigating the expression of highly parallel programs in a conventional object-oriented language (Smalltalk-80). The relevance of this work to a new parallel object-oriented system is discussed. An implementation of an ‘eager ’ evaluator is described, together with a ‘throttling ’ mechanism capable of limiting the generation of concurrent processes. A system for suspending all processes performing a parallel computation is discussed. Finally, further work in investigating debugging environments for concurrent objectoriented systems is outlined. Concurrent Object-Oriented Systems There has been an increasing interest in recent years in what is called object-oriented programming, accompanied by a diversification of opinion. There seems to be little agreement about what is meant by the term ‘object’, or whether a particular programming ...

A transformation to provide deadlock-free programs

2003

A commonly employed technique to control access to shared resources in concurrent programs consists of using critical sections. Unfortunately, it is well known that programs using several critical sections may suffer from deadlocks. In this paper we introduce a new approach for ensuring deadlock-freedom in a transparent manner from the programmer's point of view. Such an approach consists of obtaining a deadlock-free "version" of the original program by using some program transformations. We formally prove the correctness of those transformations and we analyze their applicability.