@gron

Parallel Virtual Machines with RPython

, , and . Proceedings of the 12th Symposium on Dynamic Languages, page 48--59. ACM, (2016)
DOI: 10.1145/2989225.2989233

Abstract

The RPython framework takes an interpreter for a dynamic language as its input and produces a Virtual Machine (VM) for that language. RPython is being used to develop PyPy, a high-performance Python interpreter. However, the produced VM does not support parallel execution since the framework relies on a Global Interpreter Lock (GIL): PyPy serialises the execution of multi-threaded Python programs. We describe the rationale and design of a new parallel execution model for RPython that allows the generation of parallel virtual machines while leaving the language semantics unchanged. This model then allows different implementations of concurrency control, and we discuss an implementation based on a GIL and an implementation based on Software Transactional Memory (STM). To evaluate the benefits of either choice, we adapt PyPy to work with both implementations (GIL and STM). The evaluation shows that PyPy with STM improves the runtime of a set of multi-threaded Python programs over PyPy with a GIL by factors in the range of 1.87× up to 5.96× when executing on a processor with 8 cores.

Description

Parallel virtual machines with RPython

Links and resources

Tags

community

  • @gron
  • @dblp
@gron's tags highlighted