1

can bytecode be run without a virtual machine?

Could an micro kernel operating system for example have a Execution server that can JIT(convert bytecode into native code and run) it without the need of a full virtual machine environment.

or would some other components of the virtual machine be needed to run the program?

and why would it work?

zeitue
  • 1,674
  • 2
  • 20
  • 45
  • 1
    The short answer is yes. The followup question is Why? – Wug Nov 08 '12 at 22:13
  • 2
    Your "micro-kernel" would be the vm. Once you achieved one, add a byte code interpreter, Bob's your mother's sister's brother. Real question is what can your micro kernel do and how does it do it. – Tony Hopkinson Nov 08 '12 at 22:18
  • I'm in the design stages of making one I figure it's better to make sure that I'm not going down a impossible path first. I have almost the whole design now but this part. this is also going to run on top of other OSes hosted like AROS OS. – zeitue Nov 08 '12 at 22:22

1 Answers1

2

I believe, that you can always convert any bytecode to the native one.

Basically, it has disadvantage of one extra step to be done + platform dependency, but at the end your code theoretically afterwards should :) run faster.

In fact for example in java, there is so called JIT compilation ( http://en.wikipedia.org/wiki/Just-in-time_compilation ), so that things that run frequently can run fast.

Peter Butkovic
  • 11,143
  • 10
  • 57
  • 81
  • What would be the extra platform dependency of it being part of the system over the virtual machine? – zeitue Nov 09 '12 at 00:03
  • 1
    ok, you're right :) no such thing in case you provide your compiler as part of your system and add compilation prio to run. on the other hand, you can also compile to native code in your development environment, and deliver native code to your system afterwards and then you can consider it beeing platform dependant – Peter Butkovic Nov 09 '12 at 09:48
  • Thank you, so it is possible in the way I thought it would be. – zeitue Nov 09 '12 at 18:23