---
title: "(2)chapter 5: The Java Virtual Machine I"
author: "zzy1943"
date: "2010-04-22T22:05:48Z"
tags: []
categories: ["编程语言"]
slug: "2-chapter-5-the-java-virtual-machine-i"
draft: false
lastmod: "2010-04-22T22:05:48Z"
id: 650936
url: "https://zzy1943.iteye.com/blog/650936"
---

When talking JVM, it may refer any of these:
1. the abstract specification
2. a concrete implementation
3. a runtime instance

The life-cycle of instance of JVM
    Only one mission in the life of a instance of JVM: run one Java application. 
Inside one instance of JＶＭ, threads come in tow flavor: daemon and non-daemon. Daemon thread is ordinarily a threads used by the virtual machine iteself, such as garbage collection. The thread start by main() is not a daemon thread. 
    When all non-daemon threads terminate, the jvm terminates. 

The Architecture of the Java Virtual Machine
![](http://dl.iteye.com/upload/attachment/238634/5d00b434-2997-3f47-aa4b-6605acc78fd4.png)

![](http://dl.iteye.com/upload/attachment/238659/639b1320-c6b0-31d1-83b1-31f958b908cf.png)
the pc register of thread 3 is undefined because it is running a native method

Data Types

![](http://dl.iteye.com/upload/attachment/238662/d9c24736-0be8-3bbf-912b-47916f2be9b0.png)
This chart depicts the data type of jvm, not java language
All the primitive types of the Java Language are primitive types of the JVM except boolean. 
the returnValue is used to implement finally clause

![](http://dl.iteye.com/upload/attachment/238666/8296a079-8ceb-3ae1-94f6-698ddcc0936a.png)