当前位置:网站首页>JVM运行时数据区(一)
JVM运行时数据区(一)
2022-04-23 02:29:00 【飞翔荷兰号】
一、基本
- 红色部分:会随着虚拟机的启动而创建,随着虚拟机的退出而销毁
- 灰色部分:与线程一一对应,随着线程的启动和结束,随之产生而结束
- 一个Runtime, 对应一个JVM虚拟机


二、概念
1. 线程
1. 线程是一个程序里的运行单元, JVM允许一个一个应用有多个线程并行执行
2. 每个线程都与操作系统的本地线程直接映射
2.1 当一个java线程准备好后,此时一个操作系统的本地线程也会创建
2.2 java线程执行终止后,本地线程也会回收
3. 操作系统负责将线程的安排调度到任何一个可用的cpu上
一旦本地线程初始化成功,就会调用java线程中的run()
2. 程序计数器
2.1 概念
- PC寄存器, PC Register, Program Counter Register, 指令计数器
- 线程的代码指令:通过程序计数器来进行保存和再次获取,就是用来线程切换
- 一个线程中会包含一个程序计数器,记录代码指令执行行数,属于线程私有
- 存储空间比较小,几乎可以忽略不计,也是运行速度最快的
- 不存在OOM
任何时候一个线程只有一个方法可以执行(当前方法)
存储当前线程正在执行的java方法的jvm指令地址,如果执行native方法,则是undefined


版权声明
本文为[飞翔荷兰号]所创,转载请带上原文链接,感谢
https://blog.csdn.net/weixin_43374578/article/details/124356923
边栏推荐
- 011_RedisTemplate操作Hash
- Talk about current limiting
- Startup of openstack service
- Execute external SQL script in MySQL workbench and report error
- Program design: l1-49 ladder race, allocation of seats (simulation), Buxiang pill hot
- Network jitter tool clumsy
- MySQL C language connection
- 89 logistic regression user portrait user response prediction
- PTA: Romantic reflection [binary tree reconstruction] [depth first traversal]
- Kubernetes cluster installation based on Kirin SP10 server version
猜你喜欢

Leetcode39 combined sum

89 logistic regression user portrait user response prediction
![PTA: 浪漫倒影 [二叉树重建] [深度优先遍历]](/img/ae/a6681df6c3992c7fd588334623901c.png)
PTA: 浪漫倒影 [二叉树重建] [深度优先遍历]

Gray scale range corresponding to colors (red, yellow, green, blue, purple, pink, brick red and magenta) in HSV color space

How to prevent leakage of operation and maintenance data

Leetcode46 Full Permutation

006_redis_SortedSet类型

都是做全屋智能的,Aqara和HomeKit到底有什么不同?

013_基于Session实现短信验证码登录流程分析

ThinkPHP kernel development blind box mall source code v2 0 docking easy payment / Alibaba cloud SMS / qiniu cloud storage
随机推荐
PHP sorting of interview questions on April 20, 2022
Fast and robust multi person 3D pose estimation from multiple views
Hyperscan -- 2 compilation
数仓建表111111
双亲委派模型【理解】
Global, exclusive, local Routing Guard
Talk about current limiting
Synchronized锁及其膨胀
JSP page nesting
Niuke hand speed monthly race 48 C (I can't understand the difference. It belongs to yes)
Leetcode40 - total number of combinations II
Consider defining a bean of type 'com netflix. discovery. AbstractDiscoveryClientOptionalArgs‘
Understanding process (multithreading primary)
002_ Redis_ Common operation commands of string type
Talk about biology live broadcast: Dr. Wang Ziyuan, a lake view biology, exploring hepatitis B with gene therapy
都是做全屋智能的,Aqara和HomeKit到底有什么不同?
C # import details
tp6阿里云短信 window 报 cURL error 60: SSL certificate problem: unable to get local issuer certificate
009_Redis_RedisTemplate入门
Heap overflow of kernel PWN basic tutorial