Presentation on theme: "Java Implementation Arthur Sale & Saeid Nooshabadi The background to a Large Grant ARC Application."— Presentation transcript:
Java Implementation Arthur Sale & Saeid Nooshabadi The background to a Large Grant ARC Application
Introduction Java is one of the keys to the future of mobile, ubiquitous and universal computing. The challenge is to make it competitive (and dominant) in areas it was not designed to tackle.
Java execution Java was clearly designed for software interpretation, with some nods in the direction of hardware implementation Run anywhere, anytime. Each source code file is compiled into a class file, which is absolutely standardized.
The Class File Highly structured fileHighly structured file Checked for consistency when loadedChecked for consistency when loaded Many tables such as constants, exceptions, superclasses, interfaces, methodsMany tables such as constants, exceptions, superclasses, interfaces, methods The method table actually contains the executable object code and other dataThe method table actually contains the executable object code and other data
Execution The Java Virtual Machine (JVM) passes control to the initialization method init() then executes methods on call.The Java Virtual Machine (JVM) passes control to the initialization method init() then executes methods on call. Meanwhile the JVM quietly manages the heap and the method frames in the background (!?)Meanwhile the JVM quietly manages the heap and the method frames in the background (!?) Method code is in ‘bytecode’, instructions for a byte-organized variable-length instruction machine.Method code is in ‘bytecode’, instructions for a byte-organized variable-length instruction machine.
JVM Instructions (1) Each instruction consists of a byte op-code followed by 0-6 bytes of address and other data Arithmetic and other instructions operate on stack (load, store, +, –, , , etc) About 180 instructions are conceptually simple (easy semantics)
JVM Instructions (2) Remaining instructions are complex. Require quite long execution sequences and semantics. JVM’s job to handle this, including thread locking, exception-handling, object memory allocation, class loading, class invocation, etc. While class standardized, execution environment is as free as the language designers could make it.
Options for Java bytecode Interpreter (optimized?) JIT ‘compiler’, really selective translator from bytecode to native code Full ‘compiler’ especially for environments that do not admit applets Execution in hardware, picoJava™
Research (1) – raw execution LocalityLocality Instruction frequencyInstruction frequency Pipelining, branch predictionPipelining, branch prediction Hardware support for stack frames, instruction I-cachesHardware support for stack frames, instruction I-caches Instruction translation on the flyInstruction translation on the fly
Instruction class frequency
Research (2) – knowing Java Hardware translation, parallel formsHardware translation, parallel forms Handling of references, dereferencingHandling of references, dereferencing An object O-cache?An object O-cache? Support for exceptions, thread priority, locks, etcSupport for exceptions, thread priority, locks, etc Co-processorsCo-processors
Research (3) – objects Heap allocationHeap allocation Garbage collection (hardware support? co-processor and interlocked algorithms? bots? reference counting?)Garbage collection (hardware support? co-processor and interlocked algorithms? bots? reference counting?) Object lifetime characteristicsObject lifetime characteristics Distributed systemsDistributed systems
Average sizes in 32-bit words
Research (4) – other Is tagged memory (or structured memory) able to be exploited?Is tagged memory (or structured memory) able to be exploited? Low energy consumption issuesLow energy consumption issues Distributed computing issuesDistributed computing issues
Where to? If we knew, we wouldn’t be doing the research Collect raw data (static + dynamic) Analyze and publish on Web Explore algorithms, architectures, ideas, hardware
Dr Saeid Nooshabadi
Some possibilities Hardware that exploits Java characteristics Very low energy-using processors (powered by batteries, solar cells) Multi-media applications (compute intensive) Influence future commercial processors