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.
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:
- Identifying A Unifying Mechanism for the Implementation of Concurrency Abstractions on Multi-Language Virtual Machines,
Stefan Marr, Theo D’Hondt; Objects, Models, Components, Patterns, 50th International Conference, TOOLS 2012, Prague, Czech Republic, May 28 – June 1, 2012.
- Modularity and Conventions for Maintainable Concurrent Language Implementations: A Review of Our Experiences and Practices,
Stefan Marr, Jens Nicolay, Tom Van Cutsem, Theo D’Hondt, Proceedings of the 2nd Workshop on Modularity In Systems Software (MISS’2012), ACM (2012).
- Which Problems Does a Multi-Language Virtual Machine Need to Solve in the Multicore/Manycore Era?,
Stefan Marr, Mattias De Wael,Michael Haupt, Theo D’Hondt, Proceedings of the 5th Workshop on Virtual Machines and Intermediate Languages, USA, ACM (2011).
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.
- OmniST, the AST-based OMOP implementation (image, Pharo VM)
- OmniVM, the VM-based OMOP implementation (image, VM)
- AmbientTalkST, ad hoc implementation (image, Pharo VM or Omni VM)
- LRSTM, ad hoc implementation (image, Pharo VM or Omni VM)
- ReBench: Performance evaluations require rigorous preparation and a proper experimental setup to yield reliable results. ReBench is a benchmarking tool that documents the experiments and facilitates their reproduction. It uses configuration files for all benchmarks, documenting the benchmark and VM parameters used for the experiments, and thus providing the necessary traceability of results and a convenient benchmark execution.
- SMark: The benchmarks used for the performance evaluation of the OMOP have been implemented based on SMark, which is a framework inspired by the idea of unit-testing that allows the definition of benchmarks in the style of SUnit.