Presentation is loading. Please wait.

Presentation is loading. Please wait.

M S COLLEGE ART’S, COMM., SCI. & BMS

Similar presentations


Presentation on theme: "M S COLLEGE ART’S, COMM., SCI. & BMS"— Presentation transcript:

1 M S COLLEGE ART’S, COMM., SCI. & BMS
JAVA VIRTUAL MACHINE (JVM) CORE JAVA CLASS: S.Y. BCS

2 INDEX Java Platform.  Editions of Java.  Big Picture of Java.  What is JVM.  What JVM does. Internal Architecture of JVM. Data Types of JVM.  Garbage Collection.  What is JDK & JRE. Relation among JVM, JDK & JRE.  Security Promises of JVM.

3 JAVA PLATFORM Java Platform is a suite of programs that facilitate developing & running programs written in java programming language.  The platform is not specific to any processor or Operating System.  There are multiple platforms each targeting a different class of devices.

4 EDITIONS OF JAVA Java SE: It is the Java Standard Edition that contains basic core java classes. Java EE: It is the Java Enterprise Edition & it contain classes that are beyond Java SE.  Java ME: It stands for Java Micro Edition for developing codes for portable devices.

5 BIG PICTURE OF JAVA

6 WHAT IS JVM Java Virtual Machine is the heart of entire Java program execution process.  It’s an abstract machine. It is a specification that provides runtime environment in which java bytecode can be executed.  JVM is platform dependent.  It is responsible for taking .class file & converting each byte code instructions into the machine language instruction that can be executed by the microprocessor.

7 WHAT JVM DOES The JVM performs following operation —  Loads code.
 Verifies code. Executes code.  Provides Runtime Environment.

8 STEPS UNDERTAKEN First of all, it loads .class file into memory.
 Then it verifies whether all byte code instructions are proper or not. If it finds any instruction suspicious, the execution is rejected immediately.  If the byte instructions are proper, then it allocates necessary memory to execute the program.

9 INTERNAL ARCHITECTURE OF JVM

10 CONTD.  Classloader: Classloader is a subsystem of JVM that is used to load class files.  Method Area: Method area is the memory block, which stores the class code, code of the variables, and code of the method in java programs.  Heap: It is the runtime data area in which objects are allocated.

11 CONTD.  Java Stacks: Java stacks are memory area where the java methods are executed. While executing methods, a separate frame will be created in the java stack, where the method is executed. JVM uses separate threads(or process) to execute each methods.  PC Registers: These are memory areas which contains memory address of instructions of the methods.

12 CONTD.  Native Method Stacks: It contains all the native methods used in the applications. Native methods are executed in these stacks.  Native Method Interface/Libraries : To execute the native methods, generally native method libraries are required. These header files are located & connected to JVM by a program, called Native method interface.

13 CONTD.  Execution Engine: Execution engine contains— Interpreter.
JIT(Just In Time) complier. these are responsible for converting the byte code instructions into machine code so that the processor will execute them.

14 DATA TYPES OF JVM

15 STORAGE & COMPUTATION TYPE INSIDE THE JVM

16 GARBAGE COLLECTION. Each object consumes some memory, of which all there is a limited area. Eventually, the memory allocated to these objects must be reclaimed when they aren’t used. The JVM reclaims these objects automatically through a process called Garbage collection.  An object is ready to be garbage collected when it is no longer alive.  Garbage collector uses many algorithm but the most commonly used algorithm is mark & sweep.

17 EXAMPLE OF GARBAGE COLLECTOR

18 OUTPUT OF ABOVE CODING

19 WHAT IS JRE JRE is an acronym for Java Runtime Environment. It is used to provide runtime environment. It is the implementation of JVM.

20 WHAT IS JDK JDK is an acronym for Java Development Kit . It physically exists. It contains JRE + development tools.

21 RELATION AMONG JVM, JDK & JRE.

22 SECURITY PROMISES OF JVM
Every object is constructed exactly once before it is used. Every local variable & field is initialized before it is used. Final methods cannot be overridden, & final classes cannot be sub classed. Many More.. The java platform security architecture depends on all the promises & many more..

23 Thank You


Download ppt "M S COLLEGE ART’S, COMM., SCI. & BMS"

Similar presentations


Ads by Google