The Ownership-based Metaobject Protocol (OMOP) is a unifying substrate to support concurrent programming concepts in virtual machines (VM). It enables language and library developers to provide concurrent programming abstractions and gives them the necessary control over the VM to enforce the desired semantics of the abstractions. This is especially interesting for multi-language VMs, or when different frameworks/libraries need to interact. One of the main goals is it to ensure correct semantics of the concurrent programming abstractions.
A more extensive introduction is given in my PhD dissertation and in the papers listed in the publications section. The different OMOP implementations are listed below in the implementations section. Note further the section with related tools. It links to the tools used for our research.
The main publication on this topic is currently my PhD dissertation, which is titled Supporting Concurrency Abstractions in High-level Language Virtual Machines.
Dissertation Abstract
During the past decade, software developers widely adopted JVM and CLI as multi-language virtual machines (VMs). At the same time, the multicore revolution burdened developers with increasing complexity. Language implementers devised a wide range of concurrent and parallel programming concepts to address this complexity but struggle to build these concepts on top of common multi-language VMs. Missing support in these VMs leads to tradeoffs between implementation simplicity, correctly implemented language semantics, and performance guarantees.
Departing from the traditional distinction between concurrency and parallelism, this dissertation finds that parallel programming concepts benefit from performance-related VM support, while concurrent programming concepts benefit from VM support that guarantees correct semantics in the presence of reflection, mutable state, and interaction with other languages and libraries.
Focusing on these concurrent programming concepts, this dissertation finds that a VM needs to provide mechanisms for managed state, managed execution, ownership, and controlled enforcement. Based on these requirements, this dissertation proposes an ownership-based metaobject protocol (OMOP) to build novel multi-language VMs with proper concurrent programming support.
This dissertation demonstrates the OMOP's benefits by building concurrent programming concepts such as agents, software transactional memory, actors, active objects, and communicating sequential processes on top of the OMOP. The performance evaluation shows that OMOP-based implementations of concurrent programming concepts can reach performance on par with that of their conventionally implemented counterparts if the OMOP is supported by the VM.
To conclude, the OMOP proposed in this dissertation provides a unifying and minimal substrate to support concurrent programming on top of multi-language VMs. The OMOP enables language implementers to correctly implement language semantics, while simultaneously enabling VMs to provide efficient implementations.
In addition to the dissertation, the following papers have been published on the topic:
Currently, we have two implementations of the OMOP available for experiments and evaluation. The AST-OMOP (OmniST) is implemented using AST transformation and does not require any VM support to enforce the OMOP's semantics. However, while it is more widely usable this way, it has a number of performance drawbacks.
The second implementation is the RoarVM with OMOP support (OmniVM). The VM support improves performance significantly and enables on par performance, for instance our STM implementation has only a 5% performance overhead while benefiting from the abstractions and guarantees provided by the OMOP.
For the evaluation of these implementations, we implemented five case studies: Clojure Agents, event-loop actors (AmbientTalkST), a software transactional memory (LRSTM), communicating sequential processes (CSP), and active objects.