NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Highly Efficient and Encapsulated Re-use of Synchronization Code in Concurrent Object-Oriented Languages

Satoshi Matsuoka, Kenjiro Taura, Akinori YonezawaOopsla 1993

TL;DR

This paper tackles the "inheritance anomaly" in concurrent object-oriented languages, a problem that makes reusing synchronization code difficult. They propose a novel language design that separates synchronization logic from method bodies, allowing for fine-grained inheritance and encapsulation of synchronization schemes, leading to more practical and efficient concurrent programming.

What Problem Does This Paper Address?

Concurrent object-oriented (OO) languages promise powerful modeling and computational capabilities by combining object-orientation with concurrency. However, their widespread adoption has been hindered by two main issues: a "myth" that message passing is inherently slow, and a more significant problem called "inheritance anomaly." Inheritance anomaly refers to the conflicts that arise when trying to inherit and reuse synchronization code in concurrent OO languages, often leading to a severe breakdown of encapsulation. This makes it difficult to build robust application frameworks, a cornerstone of good OO software engineering. The authors aim to solve this by providing language primitives that allow for efficient and encapsulated reuse of synchronization code, making concurrent OO programming more practical.

Methods

The authors propose a new set of language primitives and an associated execution model designed to minimize inheritance anomaly. Key aspects of their approach include:

  • Separation of Synchronization Logic: Synchronization code is separated from the main method bodies. This allows for independent inheritance and overriding of synchronization logic.
  • Multiple Synchronization Schemes: The language supports multiple synchronization schemes (e.g., synchronizers, transition specifications) that can coexist and be integrated. This allows programmers to choose the most appropriate scheme for a given synchronization constraint.
  • Encapsulation of Synchronization Schemes: Synchronization schemes themselves can be encapsulated within superclasses, allowing subclasses to use different schemes without exposing implementation details.
  • Syntactic Similarity to Sequential Inheritance: The mechanism for reusing synchronization code is designed to be syntactically similar to super calls in sequential OO languages, promoting user familiarity.
  • Customized Inheritance Rules: Inheritance rules are tailored for each synchronization scheme, recognizing that natural inheritance patterns can differ.
  • Efficient Implementation: The design is intended for efficient implementation on conventional Massively Parallel Processors (MPPs), with a focus on compile-time optimizations to minimize runtime overhead. This includes integrating synchronization checks into virtual function table (VFT) lookups and using active messages for inter-node communication.

Datasets

Not discussed in the paper. The authors use canonical examples of synchronization problems (e.g., bounded buffer, lock) to illustrate their proposal and do not present results on large-scale datasets.

Key Insights and Ideas

  • Inheritance Anomaly is Scheme-Dependent: The authors highlight that the severity of inheritance anomaly varies depending on the synchronization scheme used by the language.
  • Encapsulation is Key: True encapsulation of synchronization code and schemes is crucial for practical reuse and avoiding anomaly.
  • Orthogonality of Synchronization Schemes: The proposed synchronizers and transition specifications are designed to be orthogonal, allowing them to be combined effectively without interfering with each other.
  • Compile-Time Optimization is Essential: For practical performance on MPPs, many synchronization-related operations need to be resolved at compile time, avoiding runtime overhead.
  • Method Sets as a Core Abstraction: Method sets are introduced as a way to group methods and define synchronization constraints, facilitating inheritance and manipulation of synchronization logic.

Key Results

The paper demonstrates the effectiveness of their proposal by resolving several classic inheritance anomaly examples from prior work. They show that their approach allows for:

  • Reduced Code Redefinition: Subclasses require minimal redefinitions of synchronization code, primarily focusing on augmenting or modifying synchronization specifications rather than rewriting entire methods.
  • Encapsulated Synchronization: Synchronization code and schemes are effectively encapsulated, preventing them from polluting the main method bodies.
  • Efficient Performance: Preliminary benchmarks on an AP1000 MPP show that their implementation incurs significantly smaller overheads compared to other concurrent OO approaches, with intra-node message passing costs approaching those of unoptimized sequential C++ virtual function calls. For example, intra-node message passing costs are reported as low as 2.3µs on the AP1000.

Limitations and Future Work

  • Completeness of Synchronization Schemes: While the paper presents synchronizers and transition specifications, the authors acknowledge that not all history sensitiveness can be resolved with their current scheme, though they suggest combining them can offer more elaborate protocols.
  • Practicality of Other Schemes: The authors compare their work to other proposals (e.g., Maude, Shibayama's work) and note that while some offer theoretical elegance, their practical implementation on MPPs remains a significant challenge.
  • Subtyping vs. Inheritance Hierarchy: The authors suggest that future work could explore the relationship between subtype classification and inheritance hierarchies, potentially using America's work on separating these concerns.
  • Compiler Optimizations: They plan to devise more extensive compiler optimizations to "compile away" unnecessary guards and synchronization code.
  • Application Development: The authors are actively working on porting practical parallel applications (N-body simulation, Genome RNA secondary structure prediction) to their system.
  • Guideline for Scheme Choice: Establishing concrete guidelines for choosing between synchronizers and transitions based on semantic and efficiency considerations is identified as a subject for future work.

Summary updated

BibTeX
@inproceedings{matsuoka1993highly,
  author = {Satoshi Matsuoka and Kenjiro Taura and Akinori Yonezawa},
  title = {{Highly Efficient and Encapsulated Re-use of Synchronization Code in Concurrent Object-Oriented Languages}},
  booktitle = {Oopsla},
  year = {1993},
  doi = {10.1145/165854.165875},
}

Loading related content...

Figure