1 / 12

Java on Nemesis Tim Harris

Java on Nemesis Tim Harris. Problems supporting Java. Part of the ‘Nemesis philosophy’ is to expose real resources to applications What should be done if the application is written in Java? Why is Java different from C?

idana
Download Presentation

Java on Nemesis Tim Harris

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. Java on NemesisTim Harris

  2. Problems supporting Java • Part of the ‘Nemesis philosophy’ is to expose real resources to applications • What should be done if the application is written in Java? • Why is Java different from C? • How can the desire to expose real resources be reconciled with the high-level abstractions provided by the JVM? • Even the CPU is virtualized in two ways: (i) processing time is shared between between tasks (ii) applications are written in Java bytecode rather than native code

  3. New thread scheduler • New scheduler expresses CPU requirements as: • Period & slice • Extra time flag • Can accommodate a variety of tasks, eg: • 30% every 1ms ¾ interactive program • 5% every 100ms ¾ background task • extra time only ¾ unimportant task • Extra time is shared out according to priority hints

  4. Run-time compilation • Provide mechanisms which allow the programmer to control the compiler and to implement their own policy. For example: • Compile quickly on first invocation • Compile with maximum optimization • Compile in the background • Never compile • Provide a selection of default policies

  5. Background compilation

  6. Interoperability • The aim is to be able to invoke operations on interfaces from the Nemesis environment without having to create native methods • Two components: • A new Java binding for the MIDDL interface definition language • Run-time support for allowing invocations

  7. Extensible virtual machines • Policy decisions can often be separated (safely) from implementation mechanisms • Thread scheduling • Object representation • Primitive operations • Run-time code generation • One size does not fit all

  8. Motivating example • Object placement in the heap • Safety requires the objects are stored in correctly-sized blocks of memory that are not already in use • May wish to control • Where instances of different classes are stored • Where instances allocated by different threads are stored • Which free block is chosen, if there is a choice • When the heap is expanded and when collection occurs

  9. Prototype XVM design > > Machine A Machine B Interface Instance of code module Operations available to application < Machine C > > >

  10. Ensuring safety • At a coarse level, the selection of implementation machines and pre-defined modules available can be limited • At a finer granularity, modules provide descriptions of their verification-time behavior in addition to their concrete implementation

  11. Demonstrations Thread scheduler control interface Unmodified X-windows clients Telnet client

  12. Contact details tim.harris@citrix.com http://www.cl.cam.ac.uk/~tlh20

More Related