1 / 28

Multitasking without Compromise: a Virtual Machine Evolution

Multitasking without Compromise: a Virtual Machine Evolution. Grzegorz Czajkowski Laurent Daynes Sun Microsystems Laboratories Presented by: Subodh J. Lele. Introduction - Java VM. Used by applications, applets Appears as an OS. Problems. Interference between two apps Examples

causey
Download Presentation

Multitasking without Compromise: a Virtual Machine Evolution

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Multitasking without Compromise:a Virtual Machine Evolution Grzegorz Czajkowski Laurent Daynes Sun Microsystems Laboratories Presented by: Subodh J. Lele CS 5204 - Fall 2004

  2. Introduction - Java VM • Used by applications, applets • Appears as an OS CS 5204 - Fall 2004

  3. Problems • Interference between two apps • Examples • Monopoly over heap space • Leaky object references • Sharing event and finalization queues • Internalized strings • All are undesired! CS 5204 - Fall 2004

  4. Internalized Strings • Avoids duplicates • String a = “abc”; • String b = a.intern(); • Need to use synchronized (a) { … } CS 5204 - Fall 2004

  5. Solutions • Separate VMs • Each VM as a OS process • Multitasking VM (MVM) • Multitasking version of JVM • OS-style multitasking CS 5204 - Fall 2004

  6. Separate VMs • Advantages • Fault isolation • Higher Programmer productivity • Disadvantages • Inefficient resource utilization • Downgraded performance • Poor scalability • Poor application startup time CS 5204 - Fall 2004

  7. MVM • Applications are protected from each other • TASKS • Multitasking features • Safe • Secure • Scalable • NO COMPROMISE approach CS 5204 - Fall 2004

  8. MVM • Goals • No interference • JVM illusion • Perform and scale well • Just like those of an OS CS 5204 - Fall 2004

  9. Design decisions • Examine each component • Shareable • Non-Shareable… replicate • Changes to JVM • No bytecode editing • Separate task data sets • End task at any time CS 5204 - Fall 2004

  10. MVM Design • Lightweight Isolation • Memory Management • User-Level Native Code CS 5204 - Fall 2004

  11. Lightweight Isolation • Share as much as possible • Replicate everything else • Issues • Class Initialization • Accessing appropriate copy • Efficient retrieval • Making it scalable CS 5204 - Fall 2004

  12. In MVM CS 5204 - Fall 2004

  13. Class Initialization • Different from object initialization • Done by <clinit> CS 5204 - Fall 2004

  14. Loading and Linking • Loading • Create main memory representation • Create TCM • Add static variables • Mark “loaded” • Linking • Verify class • Check loader constraints • Build constant pool cache CS 5204 - Fall 2004

  15. Dynamic code rewriting • Class initialization barrier • Check for entry in TCM table • Once per task • Necessitates two entries • Link resolution barrier • Unchanged from JVM CS 5204 - Fall 2004

  16. Other issues • Quickened bytecodes • Re-introduce barriers • Affects only four methods • Sharing Complied Code • Native code for method • Patching stubs • Class initialization barriers CS 5204 - Fall 2004

  17. Performance – Memory footprint CS 5204 - Fall 2004

  18. Performance – Time overheads CS 5204 - Fall 2004

  19. Memory Management • Heap Memory • Mechanisms • Surplus memory management • Memory accountability • Per-task Garbage Collections CS 5204 - Fall 2004

  20. In HSVM • New Generation • Eden • For new objects • Aging • From-space • Objects garbage collected (GC) • To-space • Old Generation • Collection triggered when filled up CS 5204 - Fall 2004

  21. In MVM • Old generation shared • New generation common • More activities occur here • Eliminates heap-related interference CS 5204 - Fall 2004

  22. Surplus Memory Management • Postpone or avoid GC • Given to new generation • Handled by New Space Manager (NSM) CS 5204 - Fall 2004

  23. Memory Accounting CS 5204 - Fall 2004

  24. Performance – Memory Management • Overheads • Replicated new generation • Memory accounting • Extending eden and book-keeping • Conclusion • Execution time benefits from larger eden CS 5204 - Fall 2004

  25. Handling Native Code • Isolation layer • Native library replicated • Redefines functions to include arguments CS 5204 - Fall 2004

  26. My evaluation - pros • MVM is a complete system • Appears just like a JVM for apps • Provides excellent multitasking features • Safe • Secure • Scalable CS 5204 - Fall 2004

  27. My evaluation - cons • One app can crash the VM • When interaction is required, costly local RPC needed • GC forced by one task can interfere with another task’s performance • It does compromise! CS 5204 - Fall 2004

  28. Questions? CS 5204 - Fall 2004

More Related