[go: up one dir, main page]
More Web Proxy on the site http://driver.im/ skip to main content
10.1145/2989225.2989233acmconferencesArticle/Chapter ViewAbstractPublication PagessplashConference Proceedingsconference-collections
research-article

Parallel virtual machines with RPython

Published: 01 November 2016 Publication History

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.87x up to 5.96x when executing on a processor with 8 cores.

References

[1]
“The IronPython Project,” http://ironpython.net/.
[2]
“The Jython Project,” http://www.jython.org/.
[3]
Nicholas Riley and Craig Zilles, “Hardware Transactional Memory Support for Lightweight Dynamic Language Evolution,” OOPSLA ’06, pp. 998–1008, ACM.
[4]
Rei Odaira, Jose G. Castanos, and Hisanobu Tomari, “Eliminating Global Interpreter Locks in Ruby Through Hardware Transactional Memory,” PPoPP ’14, pp. 131–142, ACM.
[5]
Fuad Tabba, “Adding Concurrency in Python Using a Commercial Processor’s Hardware Transactional Memory Support,” SIGARCH Comput. Archit. News, vol. 38, no. 5, pp. 12–19, Apr. 2010.
[6]
Yu David Liu, Xiaoqi Lu, and Scott F. Smith, “Coqa: Concurrent Objects with Quantized Atomicity,” CC’08/ETAPS’08, pp. 260–275, Springer-Verlag.
[7]
Carl Friedrich Bolz, Antonio Cuni, Maciej Fijalkowski, and Armin Rigo, “Tracing the Meta-level: PyPy’s Tracing JIT Compiler,” ICOOOLPS ’09, pp. 18–25, ACM.
[8]
“CPython,” https://www.python.org/.
[9]
“The JRuby Project,” http://jruby.org/.
[10]
Colin Blundell, E. Lewis, and Milo Martin, “Unrestricted Transactional Memory: Supporting I/O and System Calls Within Transactions,” Technical Reports (CIS), May 2006.
[11]
“PyPy Source on Bitbucket,” https://bitbucket.org/ pypy/pypy.
[12]
Remigius Meier, Armin Rigo, and Thomas Gross, “A Transactional Memory System for Parallel Python,” https://bitbucket.org/pypy/extradoc/raw/ 12bda771698925b8296808959e7b830aef8b78b8/ talk/dls2014/paper/paper.pdf, Aug. 2014.
[13]
“PyPy Benchmarks on Bitbucket,” https://bitbucket. org/pypy/benchmarks.
[14]
Christian Wimmer and Thomas Würthinger, “Truffle: A Selfoptimizing Runtime System,” SPLASH ’12, pp. 13–14, ACM.

Cited By

View all
  • (2022)Concurrent sizeProceedings of the ACM on Programming Languages10.1145/35633006:OOPSLA2(345-372)Online publication date: 31-Oct-2022
  • (2019)Reflections on the compatibility, performance, and scalability of parallel PythonProceedings of the 15th ACM SIGPLAN International Symposium on Dynamic Languages10.1145/3359619.3359747(91-103)Online publication date: 20-Oct-2019
  • (2018)Concurrency-aware object-oriented programming with rolesProceedings of the ACM on Programming Languages10.1145/32765002:OOPSLA(1-30)Online publication date: 24-Oct-2018
  • Show More Cited By

Index Terms

  1. Parallel virtual machines with RPython

    Recommendations

    Comments

    Please enable JavaScript to view thecomments powered by Disqus.

    Information & Contributors

    Information

    Published In

    cover image ACM Conferences
    DLS 2016: Proceedings of the 12th Symposium on Dynamic Languages
    November 2016
    131 pages
    ISBN:9781450344456
    DOI:10.1145/2989225
    Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

    Sponsors

    In-Cooperation

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 01 November 2016

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. Python
    2. RPython
    3. dynamic language
    4. global interpreter lock
    5. parallelism
    6. transactional memory
    7. virtual machine

    Qualifiers

    • Research-article

    Conference

    SPLASH '16
    Sponsor:

    Acceptance Rates

    Overall Acceptance Rate 32 of 77 submissions, 42%

    Upcoming Conference

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)5
    • Downloads (Last 6 weeks)0
    Reflects downloads up to 22 Dec 2024

    Other Metrics

    Citations

    Cited By

    View all
    • (2022)Concurrent sizeProceedings of the ACM on Programming Languages10.1145/35633006:OOPSLA2(345-372)Online publication date: 31-Oct-2022
    • (2019)Reflections on the compatibility, performance, and scalability of parallel PythonProceedings of the 15th ACM SIGPLAN International Symposium on Dynamic Languages10.1145/3359619.3359747(91-103)Online publication date: 20-Oct-2019
    • (2018)Concurrency-aware object-oriented programming with rolesProceedings of the ACM on Programming Languages10.1145/32765002:OOPSLA(1-30)Online publication date: 24-Oct-2018
    • (2018)Virtual machine design for parallel dynamic programming languagesProceedings of the ACM on Programming Languages10.1145/32764792:OOPSLA(1-25)Online publication date: 24-Oct-2018
    • (2018)Parallelization of dynamic languages: synchronizing built-in collectionsProceedings of the ACM on Programming Languages10.1145/32764782:OOPSLA(1-30)Online publication date: 24-Oct-2018
    • (2018)Interactive character animation by learning multi-objective controlACM Transactions on Graphics10.1145/3272127.327507137:6(1-10)Online publication date: 4-Dec-2018
    • (2018)Robust flow-guided neural prediction for sketch-based freeform surface modelingACM Transactions on Graphics10.1145/3272127.327505137:6(1-12)Online publication date: 4-Dec-2018
    • (2018)Aerobatics control of flying creatures via self-regulated learningACM Transactions on Graphics10.1145/3272127.327502337:6(1-10)Online publication date: 4-Dec-2018
    • (2017)Exploring the Effects of Team Collaborative Norms and Team Identification on the Quality of Individuals' Knowledge Contribution in TeamsACM SIGMIS Database: the DATABASE for Advances in Information Systems10.1145/3158421.315842848:4(80-106)Online publication date: 7-Nov-2017

    View Options

    Login options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media