SlideShare a Scribd company logo
1 of 14
JAVA VIRTUAL MACHINE
1. DATA TYPES
2. DATA STORAGE
3. JAVA INSTRUCTION SET
4. EXCEPTIONS AND ERRORS
5. BINARY CLASSES
6. THE JAVA NATIVE INTERFACE
1.DATA TYPES
PRIMITIVE DATA TYPES:
 Size is platform independent
 char
 short
 double
 float
OBJECTS AND ARRAYS:
 Array object is a special and intrinsic type of object
 Elements of an array must be same primitive type or references of same type
Multi dimensional arrays
2. DATA STORAGE
There are three types of storage namely,
 Global Storage (Main memory)
 Local Storage (Methods)
 Operand Storage (Instructions)
THE STACK
The Local storage(Fixed size), Operand Storage and Method arguments are allocated on
the stack
GLOBAL MEMORY
 The main Memory architecture of Java contains,
• Method area (stores Code)
• Global storage area (stores Arrays & Objects)
 Global Memory is managed as a Heap
 Size of the Heap is platform dependent
CONSTANT POOL
 ISA of Java allows to store some constant values as immediate operands
 Constant operands may have varying size
 JVM supports a special memory area called the Constant Pool for storing immediate
operands
MEMORY HIERARCHY
It contains,
 STACK
 Constant pool
 Heap
3. JAVA INSTRUCTION SET
INSTRUCTION FORMATS
Java ISA have 5 major types as given,
Constant Pool
Stack
DATA MOVEMENT INSTRUCTIONS
There are four sets of Data movement instructions,
Set1- push constant values onto the stack (includes all loads and stores)
Set2- pops values at the top
Set3- moves values b/w local storage and operand stack
Set4- moves values b/w global storage and stack
TYPE CONVERSION
 JVM allows to convert one type of data to other type in the stack.
 It requires a Pop and Push operation
FUNCTIONAL INSTRUCTIONS
There are three types namely,
 Arithmetic
 Logical
 Shifts Requires internal conversion to binary form
In all the instructions, operands are taken from the stack and results are pushed
back to the stack
CONTROL FLOW STATEMENT (branches and jumps)
There are two sets of statements,
Set1 – compares a element in stack with zero
Set2- compares two or more elements in a stack
There will be a PC relative branching to an offset, found by concatenating the data bytes
Methods are called via invoking instructions like,
 Invokevirtual index1 index2
 Invoke interface
 Invokestatic
 ireturn
OPERAND STACK TRACKING
Regardless to the path taken by program, at any given point of time, the operand stack
must have,
 Same number of operands
 Same types of operands
 In the same order
To maintain this operand stack has to be monitored through static program analysis
4.EXCEPTION HANDLING AND ERRORS
Majorly there are two types of Exceptions,
 Default (Automatically handled)
 User defined (Needed to be handled manually)
ERRORS (Inherent)
Stackoverflowerror
Internal error
EXCEPTIONS (related to program behaviour)
NullpointerException
ArrayindexoutofboundException
IncompatibleclasschangException
EXCEPTION TABLE
FROM TO TARGET TYPE
8 12 90 Arithmetic Exception
5.BINARY CLASSES
 Any HLL Program will contain,
 Code
 Metadata
Binary classes= Code+ Metadata
Class file contains Binary classes
Advantages
All Binary classes do not have to be loaded
when the program starts
Classes can be loaded on demand
Reduces bandwidth for loading classes
6. JAVA NATIVE INTERFACE
 It helps Java code to interoperate with native compiled code
THANK YOU

More Related Content

Viewers also liked

Viewers also liked (20)

Optimization
OptimizationOptimization
Optimization
 
Interpretation
InterpretationInterpretation
Interpretation
 
Common Language Infrastructure
Common Language InfrastructureCommon Language Infrastructure
Common Language Infrastructure
 
Profiling
ProfilingProfiling
Profiling
 
Binary translation
Binary translationBinary translation
Binary translation
 
Garbage collection
Garbage collectionGarbage collection
Garbage collection
 
Soa chapter 5
Soa chapter 5Soa chapter 5
Soa chapter 5
 
Hardware software
Hardware softwareHardware software
Hardware software
 
Martínez lópez montserrat_m1s1_identificacion de usos de las tic
Martínez lópez montserrat_m1s1_identificacion de usos de las ticMartínez lópez montserrat_m1s1_identificacion de usos de las tic
Martínez lópez montserrat_m1s1_identificacion de usos de las tic
 
бердникова м 10б
бердникова м 10ббердникова м 10б
бердникова м 10б
 
Monotica Μονωσεις σε ολη την Ελλαδα
Monotica Μονωσεις σε ολη την ΕλλαδαMonotica Μονωσεις σε ολη την Ελλαδα
Monotica Μονωσεις σε ολη την Ελλαδα
 
Assesmment System - project report
Assesmment System - project reportAssesmment System - project report
Assesmment System - project report
 
Derecho penal kim
Derecho penal kimDerecho penal kim
Derecho penal kim
 
Delitos informaticos
Delitos informaticosDelitos informaticos
Delitos informaticos
 
Procesos del reciclaje del plastico
Procesos del reciclaje del plasticoProcesos del reciclaje del plastico
Procesos del reciclaje del plastico
 
Practicas ip bloque 1
Practicas ip bloque 1Practicas ip bloque 1
Practicas ip bloque 1
 
Practica 10-blog-1
Practica 10-blog-1Practica 10-blog-1
Practica 10-blog-1
 
CV Baru - Inggris
CV Baru - InggrisCV Baru - Inggris
CV Baru - Inggris
 
México
MéxicoMéxico
México
 
Delfino tema
Delfino temaDelfino tema
Delfino tema
 

Similar to Java Virtual Machine

C++ Memory Management
C++ Memory ManagementC++ Memory Management
C++ Memory ManagementRahul Jamwal
 
Processor Organization and Architecture
Processor Organization and ArchitectureProcessor Organization and Architecture
Processor Organization and ArchitectureVinit Raut
 
C MEMORY MODEL​.pptx
C MEMORY MODEL​.pptxC MEMORY MODEL​.pptx
C MEMORY MODEL​.pptxSKUP1
 
C MEMORY MODEL​.pptx
C MEMORY MODEL​.pptxC MEMORY MODEL​.pptx
C MEMORY MODEL​.pptxLECO9
 
220 runtime environments
220 runtime environments220 runtime environments
220 runtime environmentsJ'tong Atong
 
Jvm architecture
Jvm architectureJvm architecture
Jvm architectureChirag Pal
 
Java platform
Java platformJava platform
Java platformVisithan
 
Let's start with Java- Basic Concepts
Let's start with Java- Basic ConceptsLet's start with Java- Basic Concepts
Let's start with Java- Basic ConceptsAashish Jain
 
Malware Analysis - x86 Disassembly
Malware Analysis - x86 DisassemblyMalware Analysis - x86 Disassembly
Malware Analysis - x86 DisassemblyNatraj G
 
Java programing considering performance
Java programing considering performanceJava programing considering performance
Java programing considering performanceRoger Xia
 
Computer Organization: Introduction to Microprocessor and Microcontroller
Computer Organization: Introduction to Microprocessor and MicrocontrollerComputer Organization: Introduction to Microprocessor and Microcontroller
Computer Organization: Introduction to Microprocessor and MicrocontrollerAmrutaMehata
 
Smash the Stack: Writing a Buffer Overflow Exploit (Win32)
Smash the Stack: Writing a Buffer Overflow Exploit (Win32)Smash the Stack: Writing a Buffer Overflow Exploit (Win32)
Smash the Stack: Writing a Buffer Overflow Exploit (Win32)Elvin Gentiles
 
Intel x86 and ARM Data types
Intel x86 and ARM Data typesIntel x86 and ARM Data types
Intel x86 and ARM Data typesRowena Cornejo
 

Similar to Java Virtual Machine (20)

C++ Memory Management
C++ Memory ManagementC++ Memory Management
C++ Memory Management
 
Processor Organization and Architecture
Processor Organization and ArchitectureProcessor Organization and Architecture
Processor Organization and Architecture
 
C MEMORY MODEL​.pptx
C MEMORY MODEL​.pptxC MEMORY MODEL​.pptx
C MEMORY MODEL​.pptx
 
C MEMORY MODEL​.pptx
C MEMORY MODEL​.pptxC MEMORY MODEL​.pptx
C MEMORY MODEL​.pptx
 
220 runtime environments
220 runtime environments220 runtime environments
220 runtime environments
 
Jvm architecture
Jvm architectureJvm architecture
Jvm architecture
 
Java platform
Java platformJava platform
Java platform
 
Intel IA 64
Intel IA 64Intel IA 64
Intel IA 64
 
Let's start with Java- Basic Concepts
Let's start with Java- Basic ConceptsLet's start with Java- Basic Concepts
Let's start with Java- Basic Concepts
 
01 oracle architecture
01 oracle architecture01 oracle architecture
01 oracle architecture
 
Malware Analysis - x86 Disassembly
Malware Analysis - x86 DisassemblyMalware Analysis - x86 Disassembly
Malware Analysis - x86 Disassembly
 
Java memory model
Java memory modelJava memory model
Java memory model
 
core_java.ppt
core_java.pptcore_java.ppt
core_java.ppt
 
Java programing considering performance
Java programing considering performanceJava programing considering performance
Java programing considering performance
 
Storage class
Storage classStorage class
Storage class
 
Computer Organization: Introduction to Microprocessor and Microcontroller
Computer Organization: Introduction to Microprocessor and MicrocontrollerComputer Organization: Introduction to Microprocessor and Microcontroller
Computer Organization: Introduction to Microprocessor and Microcontroller
 
Run time storage
Run time storageRun time storage
Run time storage
 
Smash the Stack: Writing a Buffer Overflow Exploit (Win32)
Smash the Stack: Writing a Buffer Overflow Exploit (Win32)Smash the Stack: Writing a Buffer Overflow Exploit (Win32)
Smash the Stack: Writing a Buffer Overflow Exploit (Win32)
 
Intel x86 and ARM Data types
Intel x86 and ARM Data typesIntel x86 and ARM Data types
Intel x86 and ARM Data types
 
Basic Java I
Basic Java IBasic Java I
Basic Java I
 

Recently uploaded

COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptxJIT KUMAR GUPTA
 
DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesMayuraD1
 
Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)Ramkumar k
 
UNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptxUNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptxkalpana413121
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . pptDineshKumar4165
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityMorshed Ahmed Rahath
 
Basic Electronics for diploma students as per technical education Kerala Syll...
Basic Electronics for diploma students as per technical education Kerala Syll...Basic Electronics for diploma students as per technical education Kerala Syll...
Basic Electronics for diploma students as per technical education Kerala Syll...ppkakm
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationBhangaleSonal
 
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...Call Girls Mumbai
 
PE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiesPE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiessarkmank1
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueBhangaleSonal
 
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best ServiceTamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Servicemeghakumariji156
 
Online food ordering system project report.pdf
Online food ordering system project report.pdfOnline food ordering system project report.pdf
Online food ordering system project report.pdfKamal Acharya
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxSCMS School of Architecture
 
Max. shear stress theory-Maximum Shear Stress Theory ​ Maximum Distortional ...
Max. shear stress theory-Maximum Shear Stress Theory ​  Maximum Distortional ...Max. shear stress theory-Maximum Shear Stress Theory ​  Maximum Distortional ...
Max. shear stress theory-Maximum Shear Stress Theory ​ Maximum Distortional ...ronahami
 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsvanyagupta248
 

Recently uploaded (20)

COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
 
DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakes
 
Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)
 
Signal Processing and Linear System Analysis
Signal Processing and Linear System AnalysisSignal Processing and Linear System Analysis
Signal Processing and Linear System Analysis
 
UNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptxUNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptx
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna Municipality
 
Basic Electronics for diploma students as per technical education Kerala Syll...
Basic Electronics for diploma students as per technical education Kerala Syll...Basic Electronics for diploma students as per technical education Kerala Syll...
Basic Electronics for diploma students as per technical education Kerala Syll...
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equation
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
 
PE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiesPE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and properties
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced LoadsFEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
 
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best ServiceTamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
 
Online food ordering system project report.pdf
Online food ordering system project report.pdfOnline food ordering system project report.pdf
Online food ordering system project report.pdf
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
 
Max. shear stress theory-Maximum Shear Stress Theory ​ Maximum Distortional ...
Max. shear stress theory-Maximum Shear Stress Theory ​  Maximum Distortional ...Max. shear stress theory-Maximum Shear Stress Theory ​  Maximum Distortional ...
Max. shear stress theory-Maximum Shear Stress Theory ​ Maximum Distortional ...
 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech students
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
 

Java Virtual Machine

  • 1. JAVA VIRTUAL MACHINE 1. DATA TYPES 2. DATA STORAGE 3. JAVA INSTRUCTION SET 4. EXCEPTIONS AND ERRORS 5. BINARY CLASSES 6. THE JAVA NATIVE INTERFACE
  • 2. 1.DATA TYPES PRIMITIVE DATA TYPES:  Size is platform independent  char  short  double  float OBJECTS AND ARRAYS:  Array object is a special and intrinsic type of object  Elements of an array must be same primitive type or references of same type Multi dimensional arrays
  • 3. 2. DATA STORAGE There are three types of storage namely,  Global Storage (Main memory)  Local Storage (Methods)  Operand Storage (Instructions) THE STACK The Local storage(Fixed size), Operand Storage and Method arguments are allocated on the stack
  • 4. GLOBAL MEMORY  The main Memory architecture of Java contains, • Method area (stores Code) • Global storage area (stores Arrays & Objects)  Global Memory is managed as a Heap  Size of the Heap is platform dependent CONSTANT POOL  ISA of Java allows to store some constant values as immediate operands  Constant operands may have varying size  JVM supports a special memory area called the Constant Pool for storing immediate operands
  • 5. MEMORY HIERARCHY It contains,  STACK  Constant pool  Heap
  • 6. 3. JAVA INSTRUCTION SET INSTRUCTION FORMATS Java ISA have 5 major types as given, Constant Pool Stack
  • 7. DATA MOVEMENT INSTRUCTIONS There are four sets of Data movement instructions, Set1- push constant values onto the stack (includes all loads and stores) Set2- pops values at the top Set3- moves values b/w local storage and operand stack Set4- moves values b/w global storage and stack
  • 8. TYPE CONVERSION  JVM allows to convert one type of data to other type in the stack.  It requires a Pop and Push operation FUNCTIONAL INSTRUCTIONS There are three types namely,  Arithmetic  Logical  Shifts Requires internal conversion to binary form In all the instructions, operands are taken from the stack and results are pushed back to the stack
  • 9. CONTROL FLOW STATEMENT (branches and jumps) There are two sets of statements, Set1 – compares a element in stack with zero Set2- compares two or more elements in a stack There will be a PC relative branching to an offset, found by concatenating the data bytes Methods are called via invoking instructions like,  Invokevirtual index1 index2  Invoke interface  Invokestatic  ireturn
  • 10. OPERAND STACK TRACKING Regardless to the path taken by program, at any given point of time, the operand stack must have,  Same number of operands  Same types of operands  In the same order To maintain this operand stack has to be monitored through static program analysis
  • 11. 4.EXCEPTION HANDLING AND ERRORS Majorly there are two types of Exceptions,  Default (Automatically handled)  User defined (Needed to be handled manually) ERRORS (Inherent) Stackoverflowerror Internal error EXCEPTIONS (related to program behaviour) NullpointerException ArrayindexoutofboundException IncompatibleclasschangException EXCEPTION TABLE FROM TO TARGET TYPE 8 12 90 Arithmetic Exception
  • 12. 5.BINARY CLASSES  Any HLL Program will contain,  Code  Metadata Binary classes= Code+ Metadata Class file contains Binary classes Advantages All Binary classes do not have to be loaded when the program starts Classes can be loaded on demand Reduces bandwidth for loading classes
  • 13. 6. JAVA NATIVE INTERFACE  It helps Java code to interoperate with native compiled code