当前位置:网站首页>JVM系列——概述,程序计数器day1-1
JVM系列——概述,程序计数器day1-1
2022-07-03 13:17:00 【简明编程】
JVM系列——概述,程序计数器day1-1
JVM(Java虚拟机)
Java二进制字节码的运行环境
优点(特点)
- 一次编写,处处运行,实现跨端
- 内存管理机制(垃圾自动回收)
- 数组下标越界检查
- 多态
JVM,JRE,JDK
JVM:运行环境
JRE:JVM+Java基础类库
JDK:JVM+Java基础类库+编译工具
JVM的用处
- 有助于理解底层实现原理
- 走向框架,优化程序,解决问题
常见的JVM
JVM仅是一套规范
JVM三大核心部分
- ClassLoader:类加载器
- JVM内存结构(方法区,堆,栈,程序计数器,本地方法栈)
- 执行引擎(解释器,即时编译器,垃圾回收)
程序计数器
Program Counter Register程序计数器((寄存器)
是Java对程序硬件的屏蔽与抽象
程序执行基础流程
将Java源代码编译成为二进制字节码(JVM指令),等二进制字节码经过解释器之后形成机器码,最后让CPU执行
作用
记住下一条JVM指令的执行地址,根据地址信息按照顺序进行执行
若没有程序计数器,则不知道下一条该执行哪一条命令
程序计数器在物理上依赖寄存器实现
寄存器是CPU中读取速度最快的一个单元
特点
- 线程私有(每个线程均有一个自己的程序计数器)
- 不存在内存溢出
边栏推荐
- File uploading and email sending
- The principle of human voice transformer
- Swiftui development experience: the five most powerful principles that a programmer needs to master
- 8 Queen question
- Road construction issues
- Open PHP error prompt under Ubuntu 14.04
- 服务器硬盘冷迁移后网卡无法启动问题
- Can newly graduated European college students get an offer from a major Internet company in the United States?
- Brief analysis of tensorboard visual processing cases
- Resolved (error in viewing data information in machine learning) attributeerror: target_ names
猜你喜欢
Unity EmbeddedBrowser浏览器插件事件通讯
106. 如何提高 SAP UI5 应用路由 url 的可读性
Complete DNN deep neural network CNN training with tensorflow to complete image recognition cases
JSP and filter
PowerPoint tutorial, how to save a presentation as a video in PowerPoint?
SQL Injection (GET/Search)
Flutter动态化 | Fair 2.5.0 新版本特性
Servlet
挡不住了,国产芯片再度突进,部分环节已进到4nm
MySQL functions and related cases and exercises
随机推荐
[sort] bucket sort
Swiftui development experience: the five most powerful principles that a programmer needs to master
R language uses the data function to obtain the sample datasets available in the current R environment: obtain all the sample datasets in the datasets package, obtain the datasets of all packages, and
JSP and filter
【被动收入如何挣个一百万】
Brief analysis of tensorboard visual processing cases
JSON serialization case summary
Internet of things completion -- (stm32f407 connects to cloud platform detection data)
Annotation and reflection
Resource Cost Optimization Practice of R & D team
又一个行业被中国芯片打破空白,难怪美国模拟芯片龙头降价抛售了
Unity EmbeddedBrowser浏览器插件事件通讯
使用tensorflow进行完整的DNN深度神经网络CNN训练完成图片识别案例
[redis] cache warm-up, cache avalanche and cache breakdown
RichView TRVStyle ListStyle 列表样式(项目符号编号)
pytorch 载入历史模型时更换gpu卡号,map_location设置
掌握Cypress命令行选项,是真正掌握Cypress的基础
Kivy tutorial how to automatically load kV files
双链笔记 RemNote 综合评测:快速输入、PDF 阅读、间隔重复/记忆
Logseq evaluation: advantages, disadvantages, evaluation, learning tutorial