SlideShare a Scribd company logo
Java Virtual Machine
2
What do
you mean by
JVM?
The abstract
specification
A concrete
implementation
A runtime
instance
What is a Java Virtual Machine?
JVM Overview
3
JVM Structure
JVM Overview
4
JVM Architecture
JVM Architecture
5
Class Loader
Class Loader
6
Class Loader Cont..
Class Loader
7
Java Memory Area
Memory Management
8
Java Memory Area Cont..
Memory Management
9
PC Register
 Each thread of a running program has its own PC register
 PC register is created when the thread is started
 As a thread executes a Java method, PC register contains
the instruction currently being executed by the thread
Memory Management
Keeps track of the current instruction executing at any
moment
10
JVM Stack
 Stack frame: One stack frame is created
whenever a method is executed in the
JVM, and the stack frame is added to
the JVM stack of the thread
 Local variable: The parameters sent to
the method are saved. After the
method parameters, the local variables
of the method are saved
Memory Management
 Operand stack: An actual workspace of a method. Each method exchanges data
between the Operand stack and the local variable array, and pushes or pops
other method invoke results
11
Native method stack
 In other words, it is a stack used to execute C/C++ codes
invoked through JNI
 According to the language, a C stack or C++ stack is created
Memory Management
Stack for native code written in a
language other than Java
12
Heap
Memory Management
13
Heap
Memory Management
14
Execution Engine
 Interpreter: Reads, interprets and
executes the bytecode instructions
one by one.
JVM Execution engine
 JIT compiler: The execution engine runs as an interpreter first, and at the
appropriate time, the JIT compiler compiles the entire byte code to
change it to native code
15
Execution Engine - JIT Compiler
JVM Execution engine
 JIT compiler: The execution engine runs as an interpreter first, and at the
appropriate tie, the JIT compiler compiles the entire byte code to change
it to native code
Questions ???
JVM

More Related Content

PDF
Bytecode manipulation with Javassist and ASM
PDF
02 basic java programming and operators
PPTX
Java and OpenJDK: disecting the ecosystem
PDF
Java Programming - 01 intro to java
KEY
JavaOne 2011 - JVM Bytecode for Dummies
PPTX
Java byte code in practice
PPTX
Java Bytecode For Discriminating Developers - GeeCON 2011
PPT
Building a java tracer
Bytecode manipulation with Javassist and ASM
02 basic java programming and operators
Java and OpenJDK: disecting the ecosystem
Java Programming - 01 intro to java
JavaOne 2011 - JVM Bytecode for Dummies
Java byte code in practice
Java Bytecode For Discriminating Developers - GeeCON 2011
Building a java tracer

What's hot (20)

PPT
CS6270 Virtual Machines - Java Virtual Machine Architecture and APIs
PPTX
What's new in Java 11
PDF
Concurrency Utilities in Java 8
PPS
Advance Java
PDF
Smart Migration to JDK 8
PDF
Java 5 and 6 New Features
PDF
Java Programming - 08 java threading
PPTX
Mastering Java Bytecode - JAX.de 2012
PDF
De Java 8 a Java 17
PPTX
Concurrency with java
PPTX
Modern Java Workshop
ODP
From Java 6 to Java 7 reference
PPTX
Java servlets
PPTX
Build, logging, and unit test tools
PPTX
Java 14 features
PDF
Java Performance Tuning
PPTX
DevNexus 2020: Discover Modern Java
PPTX
Jdk(java) 7 - 6 기타기능
PDF
Complete Java Course
KEY
Lock? We don't need no stinkin' locks!
CS6270 Virtual Machines - Java Virtual Machine Architecture and APIs
What's new in Java 11
Concurrency Utilities in Java 8
Advance Java
Smart Migration to JDK 8
Java 5 and 6 New Features
Java Programming - 08 java threading
Mastering Java Bytecode - JAX.de 2012
De Java 8 a Java 17
Concurrency with java
Modern Java Workshop
From Java 6 to Java 7 reference
Java servlets
Build, logging, and unit test tools
Java 14 features
Java Performance Tuning
DevNexus 2020: Discover Modern Java
Jdk(java) 7 - 6 기타기능
Complete Java Course
Lock? We don't need no stinkin' locks!
Ad

Similar to JVM (20)

PPTX
JVMkhushi[1].pptx JVMkhushi[1].pptxJVMkhushi[1].pptx
PPTX
Introduction of jvm|Java Training In Jaipur | Java Training Jaipur | Java Tra...
PDF
A Brief study on JVM A Brief study on JVM
PDF
Jvm internal detail
PDF
Java Virtual Machine - Internal Architecture
PPTX
Java virtual machine
DOCX
Java JDK.docx
PPTX
Java byte code & virtual machine
PPT
Java Virtual Machine
PPTX
Lecture 2 Java Virtual Machine .pptx
PPT
Java14
PDF
An Introduction to Java Compiler and Runtime
PDF
Inside JVM
PDF
Ijaprr vol1-2-13-60-64tejinder
PPT
Java-java virtual machine
PDF
Java unit 1
JVMkhushi[1].pptx JVMkhushi[1].pptxJVMkhushi[1].pptx
Introduction of jvm|Java Training In Jaipur | Java Training Jaipur | Java Tra...
A Brief study on JVM A Brief study on JVM
Jvm internal detail
Java Virtual Machine - Internal Architecture
Java virtual machine
Java JDK.docx
Java byte code & virtual machine
Java Virtual Machine
Lecture 2 Java Virtual Machine .pptx
Java14
An Introduction to Java Compiler and Runtime
Inside JVM
Ijaprr vol1-2-13-60-64tejinder
Java-java virtual machine
Java unit 1
Ad

Recently uploaded (20)

PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
cuic standard and advanced reporting.pdf
PDF
Empathic Computing: Creating Shared Understanding
PDF
Approach and Philosophy of On baking technology
PDF
Encapsulation theory and applications.pdf
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Modernizing your data center with Dell and AMD
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Electronic commerce courselecture one. Pdf
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
Machine learning based COVID-19 study performance prediction
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
KodekX | Application Modernization Development
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
cuic standard and advanced reporting.pdf
Empathic Computing: Creating Shared Understanding
Approach and Philosophy of On baking technology
Encapsulation theory and applications.pdf
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Modernizing your data center with Dell and AMD
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Reach Out and Touch Someone: Haptics and Empathic Computing
Spectral efficient network and resource selection model in 5G networks
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Electronic commerce courselecture one. Pdf
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Machine learning based COVID-19 study performance prediction
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
KodekX | Application Modernization Development
Chapter 3 Spatial Domain Image Processing.pdf
Advanced methodologies resolving dimensionality complications for autism neur...
Agricultural_Statistics_at_a_Glance_2022_0.pdf

JVM

  • 2. 2 What do you mean by JVM? The abstract specification A concrete implementation A runtime instance What is a Java Virtual Machine? JVM Overview
  • 8. 8 Java Memory Area Cont.. Memory Management
  • 9. 9 PC Register  Each thread of a running program has its own PC register  PC register is created when the thread is started  As a thread executes a Java method, PC register contains the instruction currently being executed by the thread Memory Management Keeps track of the current instruction executing at any moment
  • 10. 10 JVM Stack  Stack frame: One stack frame is created whenever a method is executed in the JVM, and the stack frame is added to the JVM stack of the thread  Local variable: The parameters sent to the method are saved. After the method parameters, the local variables of the method are saved Memory Management  Operand stack: An actual workspace of a method. Each method exchanges data between the Operand stack and the local variable array, and pushes or pops other method invoke results
  • 11. 11 Native method stack  In other words, it is a stack used to execute C/C++ codes invoked through JNI  According to the language, a C stack or C++ stack is created Memory Management Stack for native code written in a language other than Java
  • 14. 14 Execution Engine  Interpreter: Reads, interprets and executes the bytecode instructions one by one. JVM Execution engine  JIT compiler: The execution engine runs as an interpreter first, and at the appropriate time, the JIT compiler compiles the entire byte code to change it to native code
  • 15. 15 Execution Engine - JIT Compiler JVM Execution engine  JIT compiler: The execution engine runs as an interpreter first, and at the appropriate tie, the JIT compiler compiles the entire byte code to change it to native code