JIT compilation

As I understand, in JIT compilation, the VM converts the byte code in native code for execution as & when required.

Then, what is the alternate way for a VM to run a byte code without using JIT concept? In other words, is JIT compilation essential for a VM?

For executing the byte code instructions on the machine, the VM has to use the native machine language. What are the techniques for this translation other than JIT for the VM?

[457 byte] By [Gaurisha] at [2007-11-26 15:28:31]
# 1

(Among) The other choices are:

(1) on standard hardware, to interpret the bytecodes. Many early JVM's did that, and many modern JVM's still do that for code that isn't executed often.

(2) on specialized hardware, to execute the bytecodes directly. Purpose-built Java processors have dropped out of favor as commoditized hardware and good JIT technology out-performs the specialized hardware, and the commodity hardware is cheaper and improving faster.

PeterKesslera at 2007-7-8 21:44:40 > top of Java-index,Desktop,Runtime Environment...
# 2

thanks Peter.

However what is 'interpreting' the byte code? Doesn't it involve converting the byte code into the machine code and feeding it (directly or so) to the CPU? Or there is abstraction at instruction level also for such VMs?

I mean, in such cases, even if the interpreter is processing the byte code instructions; to get the instructions executed, it has to use the machine language, same as in JIT. (Only difference may be the conversion is done entirely at start-up rather than when reqd.)

Gaurisha at 2007-7-8 21:44:40 > top of Java-index,Desktop,Runtime Environment...