Intermediate Language Designof High-level Language VMs<br />Towards Comprehensive Concurrency Support<br />Michael Haupt<b...
Agenda<br />Motivation<br />Survey Design<br />Concurrency Support<br />Conclusion<br />Outlook<br />10/27/09<br />2<br />...
Motivation<br />VMs support concurrency insufficiently!<br />Why? Because, we want multi-language VMs<br />Fast JITs, grea...
Survey Design<br />How to design an intermediate language?<br />10/27/09<br />IL Design For VMs, Stefan Marr, VMIL, Oct. 2...
Survey Design<br />10/27/09<br />5<br />IL Design For VMs, Stefan Marr, VMIL, Oct. 2009<br />Dis VM 4th ed.<br />OTP<br />...
Survey Criteria<br />Specification vs. implementation<br />Abstraction level of intermediate language<br />Machine model<b...
Survey<br />10/27/09<br />7<br />Survey Design<br />
Survey<br />10/27/09<br />8<br />Survey Design<br />
Survey<br />10/27/09<br />9<br />Survey Design<br />
Survey<br />10/27/09<br />10<br />Survey Design<br />
Survey<br />10/27/09<br />11<br />Survey Design<br />
Survey<br />10/27/09<br />12<br />Survey Design<br />
Concurrency support<br />How to support concurrency in an intermediate language?<br />10/27/09<br />IL Design For VMs, Ste...
Reminder: Motivation<br />VMs support concurrency insufficiently!<br />Why? Because, we want multi-language VMs<br />Fast ...
10/27/09<br />15<br />IL Design For VMs, Stefan Marr, VMIL, Oct. 2009<br />Why Concurrency in ILs?<br />
Concurrency Support in the IL?<br />10/27/09<br />16<br />IL Design For VMs, Stefan Marr, VMIL, Oct. 2009<br />Dis VM 4th ...
Concurrency Support in the IL?<br />10/27/09<br />17<br />IL Design For VMs, Stefan Marr, VMIL, Oct. 2009<br />Dis VM 4th ...
Survey Criteria - Concurrency<br />Concurrency support<br />Concurrency model<br />Included instructions<br />Standard lib...
Common Language Infrastructure<br />volatile.(prefix instruction)<br />marks a subsequent pointer reference<br />Synchroni...
Dis VM (spec. 4th ed.)<br />Inspired by CommunicatingSequentialProcesses<br />spawn – new thread<br />new* – new channel<b...
Erlang<br />Actors model<br />send, wait, wait_timeout<br />remove_message<br />timeout<br />Pure, functional language<br ...
Java Virtual Machine<br />monitorenter/-exit<br />For synchronized blocks<br />Synchronized methods<br />Memory model<br /...
Mozart<br />LOCKTHREAD<br />No unlock<br />Implicit support<br />Data-flow variables, distribution<br />Standard library<b...
Conclusion<br />Wide range of supported models<br />No notion of multiple models<br />Often limited to implicit semantics ...
Outlook<br />Multi-language VMs have to<br />Enable language designer to invent new constructs/concepts<br />Provide low- ...
Discussion<br />10/27/09<br />26<br />IL Design For VMs, Stefan Marr, VMIL, Oct. 2009<br />
Upcoming SlideShare
Loading in …5
×

Intermediate Language Design of High-level Language VMs: Towards Comprehensive Concurrency Support

1,292 views
1,215 views

Published on

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.

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,292
On SlideShare
0
From Embeds
0
Number of Embeds
94
Actions
Shares
0
Downloads
14
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide
  • 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

    1. 1. Intermediate Language Designof High-level Language VMs<br />Towards Comprehensive Concurrency Support<br />Michael Haupt<br />HassoPlattner Institute<br />University of Potsdam<br />Theo D’Hondt<br />Software Languages Lab<br />VrijeUniversiteitBrussel<br />Stefan Marr<br />Software Languages Lab<br />VrijeUniversiteitBrussel<br />VMIL Workshop, 25th October 2009, Orlando, Florida<br />
    2. 2. Agenda<br />Motivation<br />Survey Design<br />Concurrency Support<br />Conclusion<br />Outlook<br />10/27/09<br />2<br />IL Design For VMs, Stefan Marr, VMIL, Oct. 2009<br />
    3. 3. Motivation<br />VMs support concurrency insufficiently!<br />Why? Because, we want multi-language VMs<br />Fast JITs, great GCs<br />How to design an intermediate language?<br />To our knowledge<br />No surveys<br />No overview of design space/tradeoffs<br />10/27/09<br />3<br />IL Design For VMs, Stefan Marr, VMIL, Oct. 2009<br />
    4. 4. Survey Design<br />How to design an intermediate language?<br />10/27/09<br />IL Design For VMs, Stefan Marr, VMIL, Oct. 2009<br />4<br />
    5. 5. Survey Design<br />10/27/09<br />5<br />IL Design For VMs, Stefan Marr, VMIL, Oct. 2009<br />Dis VM 4th ed.<br />OTP<br />R12<br />Dalvik VM 1.0<br />5.1<br />CLI/ECMA-355<br />1.3<br />JVM spec.<br />1.4<br />6.0 svn<br />2.6<br />Ruby 1.8/1.9<br />Rubinius<br />V8 svn<br />4.4<br />Squeak 3.9<br />TraceMonkey<br />All trademarks and logos are the property of their respective owners.<br />
    6. 6. Survey Criteria<br />Specification vs. implementation<br />Abstraction level of intermediate language<br />Machine model<br />Representation, instruction encoding<br />Instruction categories<br />Arithmetic & logic, control flow, stack, …<br />Optimizations<br />10/27/09<br />6<br />Survey Design<br />
    7. 7. Survey<br />10/27/09<br />7<br />Survey Design<br />
    8. 8. Survey<br />10/27/09<br />8<br />Survey Design<br />
    9. 9. Survey<br />10/27/09<br />9<br />Survey Design<br />
    10. 10. Survey<br />10/27/09<br />10<br />Survey Design<br />
    11. 11. Survey<br />10/27/09<br />11<br />Survey Design<br />
    12. 12. Survey<br />10/27/09<br />12<br />Survey Design<br />
    13. 13. Concurrency support<br />How to support concurrency in an intermediate language?<br />10/27/09<br />IL Design For VMs, Stefan Marr, VMIL, Oct. 2009<br />13<br />
    14. 14. Reminder: Motivation<br />VMs support concurrency insufficiently!<br />Why? Because, we want multi-language VMs<br />Fast JITs<br />Great GCs<br /><ul><li>Add concurrency to intermediate language</li></ul>10/27/09<br />14<br />IL Design For VMs, Stefan Marr, VMIL, Oct. 2009<br />
    15. 15. 10/27/09<br />15<br />IL Design For VMs, Stefan Marr, VMIL, Oct. 2009<br />Why Concurrency in ILs?<br />
    16. 16. Concurrency Support in the IL?<br />10/27/09<br />16<br />IL Design For VMs, Stefan Marr, VMIL, Oct. 2009<br />Dis VM 4th ed.<br />OTP<br />R12<br />Dalvik VM 1.0<br />5.1<br />CLI/ECMA-355<br />1.3<br />JVM spec.<br />1.4<br />6.0 svn<br />2.6<br />Ruby 1.8/1.9<br />Rubinius<br />V8 svn<br />4.4<br />Squeak 3.9<br />TraceMonkey<br />
    17. 17. Concurrency Support in the IL?<br />10/27/09<br />17<br />IL Design For VMs, Stefan Marr, VMIL, Oct. 2009<br />Dis VM 4th ed.<br />OTP<br />R12<br />Dalvik VM 1.0<br />5.1<br />CLI/ECMA-355<br />1.3<br />JVM spec.<br />1.4<br />6.0 svn<br />2.6<br />Ruby 1.8/1.9<br />Rubinius<br />V8 svn<br />4.4<br />Squeak 3.9<br />TraceMonkey<br />only 6 out of 17<br />
    18. 18. Survey Criteria - Concurrency<br />Concurrency support<br />Concurrency model<br />Included instructions<br />Standard library (stdlib)<br />10/27/09<br />18<br />IL Design For VMs, Stefan Marr, VMIL, Oct. 2009<br />
    19. 19. Common Language Infrastructure<br />volatile.(prefix instruction)<br />marks a subsequent pointer reference<br />Synchronized methods<br />Memory model<br />Atomic read or write of certain aligned data<br />Standard library<br />Memory barriers, atomic updates<br />Parallel loops, futures,…<br />10/27/09<br />19<br />Concurrency Support<br />
    20. 20. Dis VM (spec. 4th ed.)<br />Inspired by CommunicatingSequentialProcesses<br />spawn – new thread<br />new* – new channel<br />recv, send – on given channel<br />alt, nbalt – send or receive on ready channel<br />Memory model unspecified<br />10/27/09<br />20<br />Concurrency Support<br />
    21. 21. Erlang<br />Actors model<br />send, wait, wait_timeout<br />remove_message<br />timeout<br />Pure, functional language<br />No memory model specified<br />Only high-level constructs in stdlib.<br />10/27/09<br />21<br />Concurrency Support<br />
    22. 22. Java Virtual Machine<br />monitorenter/-exit<br />For synchronized blocks<br />Synchronized methods<br />Memory model<br />Standard library<br />Low- and high-level constructs<br />DalvikVM promises the same<br />10/27/09<br />22<br />Concurrency Support<br />
    23. 23. Mozart<br />LOCKTHREAD<br />No unlock<br />Implicit support<br />Data-flow variables, distribution<br />Standard library<br />High-level constructs<br />Futures, stream channels,…<br />10/27/09<br />23<br />Concurrency Support<br />
    24. 24. Conclusion<br />Wide range of supported models<br />No notion of multiple models<br />Often limited to implicit semantics or guaranties<br />Often most functionality in standard library<br />10/27/09<br />24<br />IL Design For VMs, Stefan Marr, VMIL, Oct. 2009<br />
    25. 25. Outlook<br />Multi-language VMs have to<br />Enable language designer to invent new constructs/concepts<br />Provide low- and high-level constructs<br />Low-level: Memory barriers, atomic updates, …<br />High-level: Tuplespaces, STM, Actors, …<br />Open question: tradeoffs IL vs. stdlib.<br />10/27/09<br />25<br />IL Design For VMs, Stefan Marr, VMIL, Oct. 2009<br />
    26. 26. Discussion<br />10/27/09<br />26<br />IL Design For VMs, Stefan Marr, VMIL, Oct. 2009<br />

    ×