Efficient and Thread-Safe Objects for Dynamically-Typed Languages
B. Daloze, S. Marr, D. Bonetta, and H. Mössenböck. Proceedings of the 2016 ACM International Conference on Object Oriented Programming Systems Languages & Applications, page 642--659. ACM, (Nov 2, 2016)(acceptance rate 25%).
DOI: 10.1145/2983990.2984001
Abstract
We are in the multi-core era.
Dynamically-typed languages are in widespread use, but their support for
multithreading still lags behind. One of the reasons is that the sophisticated
techniques they use to efficiently represent their dynamic object models are
often unsafe in multithreaded environments.
This paper defines safety requirements for dynamic object models in
multithreaded environments.
Based on these requirements, a language-agnostic and thread-safe object model
is designed that maintains the efficiency of sequential approaches.
This is achieved by ensuring that field reads do not require synchronization
and field updates only need to synchronize on objects shared between threads.
Basing our work on JRuby+Truffle, we show that our safe object model has zero overhead on peak performance for thread-local objects
and only 3\% average overhead on parallel benchmarks where field updates require synchronization.
Thus, it can be a foundation for safe and efficient multithreaded VMs for a wide range of dynamic languages.
%0 Conference Paper
%1 Daloze:2016:TSO
%A Daloze, Benoit
%A Marr, Stefan
%A Bonetta, Daniele
%A Mössenböck, Hanspeter
%B Proceedings of the 2016 ACM International Conference on Object Oriented Programming Systems Languages & Applications
%D 2016
%I ACM
%K Bugs Concurrency HiddenClasses JRuby Map MeMyPublication ObjectModel ObjectStorage RaceConditions Ruby ThreadSafety myown
%P 642--659
%R 10.1145/2983990.2984001
%T Efficient and Thread-Safe Objects for Dynamically-Typed Languages
%X We are in the multi-core era.
Dynamically-typed languages are in widespread use, but their support for
multithreading still lags behind. One of the reasons is that the sophisticated
techniques they use to efficiently represent their dynamic object models are
often unsafe in multithreaded environments.
This paper defines safety requirements for dynamic object models in
multithreaded environments.
Based on these requirements, a language-agnostic and thread-safe object model
is designed that maintains the efficiency of sequential approaches.
This is achieved by ensuring that field reads do not require synchronization
and field updates only need to synchronize on objects shared between threads.
Basing our work on JRuby+Truffle, we show that our safe object model has zero overhead on peak performance for thread-local objects
and only 3\% average overhead on parallel benchmarks where field updates require synchronization.
Thus, it can be a foundation for safe and efficient multithreaded VMs for a wide range of dynamic languages.
%@ 978-1-4503-4444-9
@inproceedings{Daloze:2016:TSO,
abstract = {We are in the multi-core era.
Dynamically-typed languages are in widespread use, but their support for
multithreading still lags behind. One of the reasons is that the sophisticated
techniques they use to efficiently represent their dynamic object models are
often unsafe in multithreaded environments.
This paper defines safety requirements for dynamic object models in
multithreaded environments.
Based on these requirements, a language-agnostic and thread-safe object model
is designed that maintains the efficiency of sequential approaches.
This is achieved by ensuring that field reads do not require synchronization
and field updates only need to synchronize on objects shared between threads.
Basing our work on JRuby+Truffle, we show that our safe object model has zero overhead on peak performance for thread-local objects
and only 3\% average overhead on parallel benchmarks where field updates require synchronization.
Thus, it can be a foundation for safe and efficient multithreaded VMs for a wide range of dynamic languages.},
acceptancerate = {0.25},
added-at = {2016-08-06T18:36:38.000+0200},
author = {Daloze, Benoit and Marr, Stefan and Bonetta, Daniele and Mössenböck, Hanspeter},
biburl = {https://www.bibsonomy.org/bibtex/262830f65bdc9a0a1046a41c0aee771e4/gron},
booktitle = {Proceedings of the 2016 ACM International Conference on Object Oriented Programming Systems Languages \& Applications},
day = 2,
doi = {10.1145/2983990.2984001},
interhash = {e308e02d9e1ea4c4e8187c56cd3770e8},
intrahash = {62830f65bdc9a0a1046a41c0aee771e4},
isbn = {978-1-4503-4444-9},
keywords = {Bugs Concurrency HiddenClasses JRuby Map MeMyPublication ObjectModel ObjectStorage RaceConditions Ruby ThreadSafety myown},
month = {November},
note = {(acceptance rate 25%)},
numpages = {18},
pages = {642--659},
pdf = {https://stefan-marr.de/downloads/oopsla16-daloze-et-al-efficient-and-thread-safe-objects-for-dynamically-typed-languages.pdf},
publisher = {ACM},
series = {OOPSLA '16},
timestamp = {2022-08-29T20:40:07.000+0200},
title = {{Efficient and Thread-Safe Objects for Dynamically-Typed Languages}},
year = 2016
}