Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JVM basics

 
Lingan Rajan
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

Thanks
Lingan
 
Paul Clapham
Sheriff
Posts: 21133
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Lingan Rajan
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul
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.


Thanks
Lingan
 
Paul Clapham
Sheriff
Posts: 21133
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic