I am trying to understand the basics of JVM.
I undersntand that JVM has its own set of instruction set and they are interpreted during runtime by the JVM.
During interpratation of opcodes does each of the them result in operating system call ?
In other words as JVM interprets ,is each interpratation just delegated to the underlying OS ?
I think the delegation to OS happens only when necessary , like opening a socket .
So JVM should be able to handle some functionality even without delgating to the OS at all.
Please let me know if my understanding is right.
That depends on what you mean by "operating system call". For example there must be a JVM opcode to add two integers together. If it used the underlying hardware instruction to add those two integers, would you describe that as an "operating system call"?
But frankly I think you're going way too far with the idea of "understanding the JVM". The first sentence in your post is really all you need to know.
Joined: Jan 26, 2011
Thanks for the answer.
By "Operating System Call" what I actually mean is the scenario where the implementation of JVM instruction set is calling/delegating to the hardware instruction. So I would like to know if there are JVM instructions that are totally independent of the hardware instructions.
That would be impossible, since the JVM is running on the hardware itself. Do you have some way to distinguish between the cases where the JVM uses a hardware instruction (which of course it does constantly) and where it delegates to a hardware instruction?