OMOP: Supporting Concurrency Abstractions in High-level Language Virtual Machines

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.

Publications

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:

Implementations

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.

Downloads

Related Tools

  • 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.