File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes JVM basics Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "JVM basics" Watch "JVM basics" New topic
Author

JVM basics

Lingan Rajan
Ranch Hand

Joined: Jan 26, 2011
Posts: 30
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
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

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

Joined: Jan 26, 2011
Posts: 30
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
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

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?
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: JVM basics
 
Similar Threads
two JVM under one Processor
Can JVM release memory back to OS?
Platform Indepedent
Two JVM on Same computer ??
question about timer