if we implement java interpreter in hardware then how we can achieve architecture neutrality of java bytecode... does java uses JIT(just in time interpreter) ? and how all this is related to Virtual Machine concept of operating system and java virtual machine(JVM)
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
Yes, you can. Although this looks like it is stuck in the specification stage (or was abandoned), picoJava allows for native execution of Java bytecode. picoJava has a port available on a FPGA. There is Jazelle, as well for ARM processors.
Given that hardware would directly execute bytecode, all optimizations would also have to be done in hardware. JIT would not be required, since the processor will execute bytecode directly. After all any hardware implementation would involve implement the JVM model as defined in the Java Virtual Machine Specification. Optimizations that can be performed, will be on the lines of hardware optimizations - instruction pipelining, use of caches etc.
Hardware neutrality is not lost, since the bytecode executing on a hardware implementation would continue to work on a software implementation as well. It is the bytecode standard that allows Java to be hardware neutral.
There has already been several hardware implementations of the Java system (i.e. a CPU that can execute bytecodes) but they have not become mainstream. This is most likely because that software implementations perform as well or even better as CPU's have become faster and faster.
As you will find when investigating more thouroughly, the details of the JVM implementations are not that important (and vary quite a bit) but they all execute the machine language of the JVM - java byte code. If you stay within the Java world and do not link in "native" stuff, you should be fine with whatever implementation you choose.
This company makes a living of providing server systems tuned for Java programs, they might interest you: http://www.azulsystems.com/
Yes, there are several hardware Java implementations. However, they don't always perform better than software running on more general-purpose silicon.
Mark Lam has written several interesting blogs entries on this subject.