Intermediate Language Design of High-level Language VMs Towards Comprehensive Concurrency Support VMIL Workshop, 25 th October 2009, Orlando, Florida Michael Haupt Hasso Plattner Institute University of Potsdam Theo D’Hondt Software Languages Lab Vrije Universiteit Brussel Stefan Marr Software Languages Lab Vrije Universiteit Brussel
26
Embed
Intermediate Language Design of High-level Language VMs: Towards Comprehensive Concurrency Support
Today, high-level language virtual machines (VMs) are becoming successful in providing an execution platform for a wide range of languages. With the transition from few-core to many-core processors, we argue that virtual machines will also have to abstract from concrete concurrency models at the hardware level, to be able to support a wide range of abstract concurrency models on a language level. As a first step towards this goal, this paper presents a survey on intermediate language design of VMs. The different designs are analyzed and categorized according to used techniques. Special attention is given to the concurrency support at the intermediate language level and the state of the art is presented. The survey is complemented with a brief look at hardware instruction set architectures and their relevant features for concurrency support. Furthermore, as an outlook, we are speculating on relevant features for comprehensive concurrency support as part of the inter- mediate languages.
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Intermediate Language Designof High-level Language VMs
Towards Comprehensive Concurrency Support
VMIL Workshop, 25th October 2009, Orlando, Florida
Michael HauptHasso Plattner InstituteUniversity of Potsdam
Theo D’HondtSoftware Languages LabVrije Universiteit Brussel
Stefan MarrSoftware Languages LabVrije Universiteit Brussel
04/09/2023 2
Agenda
• Motivation• Survey Design• Concurrency Support• Conclusion• Outlook
IL Design For VMs, Stefan Marr, VMIL, Oct. 2009
04/09/2023 3
Motivation
• VMs support concurrency insufficiently!– Why? Because, we want multi-language VMs• Fast JITs, great GCs
• How to design an intermediate language?– To our knowledge• No surveys• No overview of design space/tradeoffs
IL Design For VMs, Stefan Marr, VMIL, Oct. 2009
04/09/2023 4
SURVEY DESIGNHow to design an intermediate language?
IL Design For VMs, Stefan Marr, VMIL, Oct. 2009
04/09/2023 5
Survey Design
IL Design For VMs, Stefan Marr, VMIL, Oct. 2009
2.6
Dis VM 4th ed.
Ruby 1.8/1.9Rubinius
V8 svn
1.4 JVM spec.
OTPR12
6.0 svn
4.4
Dalvik VM 1.0
1.3
5.1
CLI/ECMA-355
Squeak 3.9TraceMonkey
All trademarks and logos are the property of their respective owners.
04/09/2023 6
Survey Criteria
• Specification vs. implementation• Abstraction level of intermediate language• Machine model• Representation, instruction encoding• Instruction categories– Arithmetic & logic, control flow, stack, …
• Optimizations
Survey Design
04/09/2023 7
Survey
Survey Design
Type Abstraction Model #Regs Execution Length in Byte #Ops
CLI Spec. Bytecode stack 0- var >= 1 217
CPython Impl. Bytecode stack 0switch var 1 or 3 102
Dalvik VM Impl. Bytecode register ∞threaded var >= 2 218
• Pure, functional language– No memory model specified– Only high-level constructs in stdlib.
Concurrency Support
Model ActorsIL High-levelStdLib High-level
04/09/2023 22
Model Threads/LocksIL MarginalStdLib Low-/high-
level
Java Virtual Machine
• monitorenter/-exit– For synchronized blocks
• Synchronized methods• Memory model• Standard library– Low- and high-level constructs
• DalvikVM promises the same
Concurrency Support
04/09/2023 23
Model Data-flowIL MarginalStdLib High-level
Mozart
• LOCKTHREAD– No unlock
• Implicit support– Data-flow variables, distribution
• Standard library– High-level constructs– Futures, stream channels,…
Concurrency Support
04/09/2023 24
Conclusion
• Wide range of supported models– No notion of multiple models– Often limited to implicit semantics or guaranties– Often most functionality in standard library