Back to results

ETH Zurich

A High-Performance, Parallel Virtual Machine for Python

Abstract

dc:description

Today’s hardware is increasingly parallel, and modern programming languages must thus allow a programmer to use this parallelism effectively. For languages that depend on a virtual machine (vm), it is the responsibility of the vm to execute code efficiently and in parallel. In the case of Python, a popular dynamic language, several vms exist, but none of them can deliver high performance and parallel execution at the same time. The reason for the lack of such a high-performance, parallel vm for Python lies with Python’s concurrency semantics, which is based on a strong memory model and atomic operations on large entities. Such a concurrency semantics does not map well to modern hardware architectures, which is why parallel vms must emulate this semantics under parallel execution through expensive synchronization. This dissertation introduces a new approach to the design and construction of high-performance, parallel vms with a concurrency semantics such as Python’s. The introduction of large-scale atomicity to the implementation language of a vm lets a vm developer specify the concurrency semantics independently from the vm’s synchronization mechanism. Thereby, the used synchronization mechanism becomes an exchangeable vm component. For the high-performance execution of Python code, just-in-time compilation is an essential concern. Unfortunately, Python’s strong memory model inhibits basic compiler optimizations under concurrency. Hence, to allow a compiler to optimize effectively, the concept of Parallel Worlds is introduced. Parallel Worlds transparently isolate concurrent computations from each other, and thereby allow for effective optimizations under the assumption of no concurrency. The transparent isolation of Parallel Worlds is supported by a special-purpose software transactional memory system (stm). Apart from isolation, this stm is the key enabler for the efficient parallel execution of Python code. Parallel execution builds on the speculative execution capability of the stm. The product of this dissertation is PyPy-stm, a high-performance, parallel vm for Python. With PyPy-stm, multi-threaded Python programs can take advantage of the parallelism in modern hardware. On a set of benchmark programs, PyPy-stm outperforms established Python vms such as CPython, Jython, IronPython, and PyPy. Compared with PyPy, the current top-of-class in program performance, PyPy-stm achieves speedups in the range of 1.5 to 8.0× with 8 threads available. These results confirm the viability of the approach and show that PyPy-stm deserves the designation as a high-performance, parallel vm for Python.

Degree

thesis:*
Grantor dc:publisher
ETH Zurich
Year dc:date
2019

Author and committee

dc:creator, dc:contributor.*
Author dc:creator
  • Meier, Remigius; id_orcid0000-0002-1579-6385
Contributors dc:contributor
  • Gross, Thomas; id_orcid0000-0002-1579-6385
  • Mössenböck, Hanspeter
  • Schulz, Martin

Subjects

dc:subject × 4

Rights

dc:rights
Statement dc:rights
  • info:eu-repo/semantics/openAccess
  • Creative Commons Attribution-ShareAlike 4.0 International
Language dc:language
en

Identifiers

dc:identifier.*
OAI identifier oai:identifier
oai:www.research-collection.ethz.ch:20.500.11850/371019

Chain of custody

source
Harvested from
ETH Zürich
Base URL
www.research-collection.ethz.ch/oai/request
Last updated
2026-07-27
Source record
OAI-PMH GetRecord
citation

Meier, Remigius; id_orcid0000-0002-1579-6385. A High-Performance, Parallel Virtual Machine for Python. ETH Zurich, 2019. http://hdl.handle.net/20.500.11850/371019