The motivation for this survey is hopefully clear nowToday, I will present here only the survey designAnd the concurrency related features we found in the different VMs
Concurrency support for intermediate language
Let’s try to find an answer for this basic question
17 VMscommon open source VMsResearch VMsand production VMsOut of the Box: directly usable by the application developer which uses the target language running on top of the VM
CLI and JVM are only VMs here which are used as multi-langueVMs
DisVMOnly SpecificationMem-mem model
Virtual Machine Showdown: Stack Versus Registersby: Yunhe Shi and Kevin Casey and M. Anton Ertl and David GreggIn: ACM Trans. Archit. Code Optim. , Vol. 4 , Nr. 4New York, NY, USA: ACM (2008) , p. 1--36.
Another interesting approach
How to approach VM design when you want a JIT
Lets now focus on the concurrency support
VM support for concurrency as it is today is insufficientOur basic idea: Add support to the IL
But lets come back to our survey.So what is the state of the art to concurrency support in Ils?
17 VMscommon open source VMsResearch VMsand production VMsOut of the Box: directly usable by the application developer which uses the target language running on top of the VM
Basic Question for the Survey:How do VMs support concurrency models today?
Atomic: native word size 32/64bit, no update
Split up slide
I would like to discussion following thingsSuitability of chosen VMsValid reasons to chose JVM over something else? I.e. reasons to not use Lua?-Other platforms then TILE64 or CellBE, which might be interesting?Tradeoffs which should be investigatedThe final goal for my PhD is to cover the concurrency part of ISA/VM design as a cornerstone for multi-paradigm VMs
Intermediate Language Design of High-level Language VMs: Towards Comprehensive Concurrency Support - Presentation Transcript
Intermediate Language Designof High-level Language VMs Towards Comprehensive Concurrency Support Michael Haupt HassoPlattner Institute University of Potsdam Theo D’Hondt Software Languages Lab VrijeUniversiteitBrussel Stefan Marr Software Languages Lab VrijeUniversiteitBrussel VMIL Workshop, 25th October 2009, Orlando, Florida
Agenda Motivation Survey Design Concurrency Support Conclusion Outlook 10/27/09 2 IL Design For VMs, Stefan Marr, VMIL, Oct. 2009
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 10/27/09 3 IL Design For VMs, Stefan Marr, VMIL, Oct. 2009
Survey Design How to design an intermediate language? 10/27/09 IL Design For VMs, Stefan Marr, VMIL, Oct. 2009 4
Survey Design 10/27/09 5 IL Design For VMs, Stefan Marr, VMIL, Oct. 2009 Dis VM 4th ed. OTP R12 Dalvik VM 1.0 5.1 CLI/ECMA-355 1.3 JVM spec. 1.4 6.0 svn 2.6 Ruby 1.8/1.9 Rubinius V8 svn 4.4 Squeak 3.9 TraceMonkey All trademarks and logos are the property of their respective owners.
Survey Criteria Specification vs. implementation Abstraction level of intermediate language Machine model Representation, instruction encoding Instruction categories Arithmetic & logic, control flow, stack, … Optimizations 10/27/09 6 Survey Design
Survey 10/27/09 7 Survey Design
Survey 10/27/09 8 Survey Design
Survey 10/27/09 9 Survey Design
Survey 10/27/09 10 Survey Design
Survey 10/27/09 11 Survey Design
Survey 10/27/09 12 Survey Design
Concurrency support How to support concurrency in an intermediate language? 10/27/09 IL Design For VMs, Stefan Marr, VMIL, Oct. 2009 13
Reminder: Motivation VMs support concurrency insufficiently! Why? Because, we want multi-language VMs Fast JITs Great GCs
Add concurrency to intermediate language
10/27/09 14 IL Design For VMs, Stefan Marr, VMIL, Oct. 2009
10/27/09 15 IL Design For VMs, Stefan Marr, VMIL, Oct. 2009 Why Concurrency in ILs?
Concurrency Support in the IL? 10/27/09 16 IL Design For VMs, Stefan Marr, VMIL, Oct. 2009 Dis VM 4th ed. OTP R12 Dalvik VM 1.0 5.1 CLI/ECMA-355 1.3 JVM spec. 1.4 6.0 svn 2.6 Ruby 1.8/1.9 Rubinius V8 svn 4.4 Squeak 3.9 TraceMonkey
Concurrency Support in the IL? 10/27/09 17 IL Design For VMs, Stefan Marr, VMIL, Oct. 2009 Dis VM 4th ed. OTP R12 Dalvik VM 1.0 5.1 CLI/ECMA-355 1.3 JVM spec. 1.4 6.0 svn 2.6 Ruby 1.8/1.9 Rubinius V8 svn 4.4 Squeak 3.9 TraceMonkey only 6 out of 17
Survey Criteria - Concurrency Concurrency support Concurrency model Included instructions Standard library (stdlib) 10/27/09 18 IL Design For VMs, Stefan Marr, VMIL, Oct. 2009
Common Language Infrastructure volatile.(prefix instruction) marks a subsequent pointer reference Synchronized methods Memory model Atomic read or write of certain aligned data Standard library Memory barriers, atomic updates Parallel loops, futures,… 10/27/09 19 Concurrency Support
Dis VM (spec. 4th ed.) Inspired by CommunicatingSequentialProcesses spawn – new thread new* – new channel recv, send – on given channel alt, nbalt – send or receive on ready channel Memory model unspecified 10/27/09 20 Concurrency Support
Erlang Actors model send, wait, wait_timeout remove_message timeout Pure, functional language No memory model specified Only high-level constructs in stdlib. 10/27/09 21 Concurrency Support
Java Virtual Machine monitorenter/-exit For synchronized blocks Synchronized methods Memory model Standard library Low- and high-level constructs DalvikVM promises the same 10/27/09 22 Concurrency Support
Mozart LOCKTHREAD No unlock Implicit support Data-flow variables, distribution Standard library High-level constructs Futures, stream channels,… 10/27/09 23 Concurrency Support
Conclusion Wide range of supported models No notion of multiple models Often limited to implicit semantics or guaranties Often most functionality in standard library 10/27/09 24 IL Design For VMs, Stefan Marr, VMIL, Oct. 2009
Outlook Multi-language VMs have to Enable language designer to invent new constructs/concepts Provide low- and high-level constructs Low-level: Memory barriers, atomic updates, … High-level: Tuplespaces, STM, Actors, … Open question: tradeoffs IL vs. stdlib. 10/27/09 25 IL Design For VMs, Stefan Marr, VMIL, Oct. 2009
Discussion 10/27/09 26 IL Design For VMs, Stefan Marr, VMIL, Oct. 2009
Today, high-level language virtual machines (VMs) a more
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. less
0 comments
Post a comment