目录
简介
作用
使用PC寄存器存储字节码指令地址有什么作用?
PC寄存器为什么被设定为私有的?
CPU时间片
VM中的程序计数寄存器(Program Counter Register),Register的命名源于CPU的寄存器,寄存器存储指令相关的现场信息,CPU只有把数据装载到寄存器才能够运行。
这里的寄存器,并非是广义上所指的物理寄存器,将其翻译为PC计数器(或指令计数器)更为贴切一些(也称为程序钩子),并且也不容易引起一些不必要的误会。JVM中的PC寄存器是对物理PC寄存器的一种抽象模拟。
PC 寄存器
程序计数器是一块很小的内存空间,几乎可以忽略不记,却是运行速度最快的存储区域。
在JVM规范中,每个线程都有它自己的程序计数器,是线程私有的,生命周期与线程的生命周期保持一致。
任何时间一个线程都只有一个方法在执行,也就是所谓的当前方法。程序计数器会存储当前线程正在执行的Java方法的JVM字节码指令地址;如果该方法执行的是Native方法,则程序计数器的值为空(Undefined)。
它是程序控制流的指示器,分支、循环、跳转、异常处理、线程恢复等基础功能都需要依赖这个计数器来完成。字节码解释器工作时就是通过改变这个计数器的值来选取下一条需要执行的字节码指令。
它是唯一一个在Java虚拟机规范中没有 Out Of Memory(内存溢出)情况的区域。
http://dict.youdao.com/example/paper/%E6%98%86%E5%A3%AB%E5%85%B0%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E6%A0%BC%E9%87%8C%E8%8F%B2%E6%96%AF%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E8%A9%B9%E5%A7%86%E6%96%AF%E5%BA%93%E5%85%8B%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E4%B8%AD%E5%A4%AE%E6%98%86%E5%A3%AB%E5%85%B0%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E6%98%86%E5%A3%AB%E5%85%B0%E7%A7%91%E6%8A%80%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E9%98%B3%E5%85%89%E6%B5%B7%E5%B2%B8%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E9%82%A6%E5%BE%B7%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E5%8D%97%E6%98%86%E5%A3%AB%E5%85%B0%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E5%A1%94%E6%96%AF%E9%A9%AC%E5%B0%BC%E4%BA%9A%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E7%A7%91%E5%BB%B7%E7%A7%91%E6%8A%80%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E8%A5%BF%E6%BE%B3%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E5%9C%A3%E6%AF%8D%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E8%8E%AB%E9%81%93%E5%85%8B%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E5%9F%83%E8%BF%AA%E6%96%AF%E7%A7%91%E6%96%87%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E7%88%B1%E5%B0%94%E5%85%B0%E5%9B%BD%E7%AB%8B%E9%83%BD%E6%9F%8F%E6%9E%97%E5%AD%A6%E9%99%A2%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E7%88%B1%E5%B0%94%E5%85%B0%E9%83%BD%E6%9F%8F%E6%9E%97%E5%AD%A6%E9%99%A2%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E7%88%B1%E5%B0%94%E5%85%B0%E5%9B%BD%E7%AB%8B%E5%AD%A6%E9%99%A2%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E7%88%B1%E5%B0%94%E5%85%B0%E5%9B%BD%E7%AB%8B%E7%A7%91%E5%85%8B%E5%AD%A6%E9%99%A2%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E7%88%B1%E5%B0%94%E5%85%B0%E8%80%83%E5%85%8B%E5%AD%A6%E9%99%A2%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E7%88%B1%E5%B0%94%E5%85%B0%E7%A7%91%E5%85%8B%E5%AD%A6%E9%99%A2%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E7%88%B1%E5%B0%94%E5%85%B0%E6%A2%85%E5%8A%AA%E6%96%AF%E5%AD%A6%E9%99%A2%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E7%88%B1%E5%B0%94%E5%85%B0%E5%9B%BD%E7%AB%8B%E5%AD%A6%E9%99%A2%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E7%88%B1%E5%B0%94%E5%85%B0%E5%88%A9%E8%8E%AB%E7%91%9E%E5%85%8B%E5%AD%A6%E9%99%A2%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E7%88%B1%E5%B0%94%E5%85%B0%E9%83%BD%E6%9F%8F%E6%9E%97%E5%9F%8E%E5%B8%82%E5%AD%A6%E9%99%A2%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E7%88%B1%E5%B0%94%E5%85%B0%E5%9B%BD%E7%AB%8B%E8%89%BA%E6%9C%AF%E8%AE%BE%E8%AE%A1%E5%AD%A6%E9%99%A2%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E7%88%B1%E5%B0%94%E5%85%B0%E9%A6%99%E5%86%9C%E9%85%92%E5%BA%97%E7%AE%A1%E7%90%86%E5%AD%A6%E9%99%A2%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E7%88%B1%E5%B0%94%E5%85%B0%E5%9B%BD%E7%AB%8B%E9%AB%98%E5%A8%81%E5%AD%A6%E9%99%A2%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E7%88%B1%E5%B0%94%E5%85%B0%E5%8D%A1%E7%BD%97%E7%90%86%E5%B7%A5%E5%AD%A6%E9%99%A2%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E7%88%B1%E5%B0%94%E5%85%B0%E9%98%BF%E6%96%AF%E9%9A%86%E7%90%86%E5%B7%A5%E5%AD%A6%E9%99%A2%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E7%88%B1%E5%B0%94%E5%85%B0%E7%A7%91%E5%85%8B%E7%90%86%E5%B7%A5%E5%AD%A6%E9%99%A2%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E7%88%B1%E5%B0%94%E5%85%B0%E5%94%90%E9%81%93%E5%85%8B%E6%8A%80%E6%9C%AF%E5%AD%A6%E9%99%A2%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E7%88%B1%E5%B0%94%E5%85%B0%E9%AB%98%E5%A8%81%E6%A2%85%E5%8A%AA%E6%96%AF%E7%90%86%E5%B7%A5%E5%AD%A6%E9%99%A2%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E7%88%B1%E5%B0%94%E5%85%B0%E9%AB%98%E5%A8%81%E7%BE%8E%E4%BA%9A%E7%90%86%E5%B7%A5%E5%AD%A6%E9%99%A2%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E7%88%B1%E5%B0%94%E5%85%B0%E8%8E%B1%E7%89%B9%E8%82%AF%E5%B0%BC%E7%90%86%E5%B7%A5%E5%AD%A6%E9%99%A2%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E7%88%B1%E5%B0%94%E5%85%B0%E5%88%A9%E8%8E%AB%E7%91%9E%E5%85%8B%E7%90%86%E5%B7%A5%E5%AD%A6%E9%99%A2%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E7%88%B1%E5%B0%94%E5%85%B0%E6%96%AF%E8%8E%B1%E6%88%88%E7%90%86%E5%B7%A5%E5%AD%A6%E9%99%A2%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E7%88%B1%E5%B0%94%E5%85%B0%E5%A1%94%E6%8B%89%E7%90%86%E5%B7%A5%E5%AD%A6%E9%99%A2%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E7%88%B1%E5%B0%94%E5%85%B0%E5%9E%82%E5%88%A9%E7%90%86%E5%B7%A5%E5%AD%A6%E9%99%A2%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E7%88%B1%E5%B0%94%E5%85%B0%E6%B2%83%E7%89%B9%E7%A6%8F%E5%BE%B7%E7%90%86%E5%B7%A5%E5%AD%A6%E9%99%A2%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E7%88%B1%E5%B0%94%E5%85%B0%E9%83%BD%E6%9F%8F%E6%9E%97%E7%90%86%E5%B7%A5%E5%AD%A6%E9%99%A2%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E7%88%B1%E5%B0%94%E5%85%B0%E9%83%BD%E6%9F%8F%E6%9E%97%E6%A0%BC%E9%87%8C%E8%8F%B2%E6%96%AF%E5%AD%A6%E9%99%A2%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E7%88%B1%E5%B0%94%E5%85%B0%E5%9B%BD%E5%AE%B6%E5%AD%A6%E9%99%A2%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E7%88%B1%E5%B0%94%E5%85%B0%E9%83%BD%E6%9F%8F%E6%9E%97%E5%95%86%E5%AD%A6%E9%99%A2%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E7%88%B1%E5%B0%94%E5%85%B0%E5%8D%A1%E7%BD%97%E7%90%86%E5%B7%A5%E5%AD%A6%E9%99%A2%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E6%9F%A5%E5%B0%94%E6%96%AF%E8%BE%BE%E5%B0%94%E6%96%87%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E5%A0%AA%E5%9F%B9%E6%8B%89%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E6%BE%B3%E5%9B%BD%E7%AB%8B%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E6%95%99%E4%BC%9A%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E5%A4%A9%E4%B8%BB%E6%95%99%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E5%8D%97%E6%BE%B3%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E9%98%BF%E5%BE%B7%E8%8E%B1%E5%BE%B7%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E5%BC%97%E6%9E%97%E5%BE%B7%E6%96%AF%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E7%BB%B4%E5%A4%9A%E5%88%A9%E4%BA%9A%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E5%B7%B4%E6%8B%89%E7%89%B9%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E6%96%AF%E5%A8%81%E6%9C%AC%E7%A7%91%E6%8A%80%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E8%BF%AA%E8%82%AF%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E7%9A%87%E5%AE%B6%E5%A2%A8%E5%B0%94%E6%9C%AC%E7%90%86%E5%B7%A5%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E5%A2%A8%E5%B0%94%E6%9C%AC%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E6%8B%89%E7%AD%B9%E4%BC%AF%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E6%96%AF%E5%A8%81%E6%9C%AC%E5%9B%BD%E7%AB%8B%E7%A7%91%E6%8A%80%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E8%8E%AB%E7%BA%B3%E4%BB%80%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E5%8D%97%E5%8D%81%E5%AD%97%E6%98%9F%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E8%A5%BF%E6%82%89%E5%B0%BC%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E9%BA%A6%E8%80%83%E7%91%9E%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E6%9F%A5%E5%B0%94%E6%96%AF%E7%89%B9%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E6%96%B0%E8%8B%B1%E6%A0%BC%E5%85%B0%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E7%BA%BD%E5%8D%A1%E6%96%AF%E5%B0%94%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E6%82%89%E5%B0%BC%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E6%82%89%E5%B0%BC%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E5%8D%A7%E9%BE%99%E5%B2%97%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E6%96%B0%E5%8D%97%E5%A8%81%E5%B0%94%E5%A3%AB%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E6%82%89%E5%B0%BC%E7%A7%91%E6%8A%80%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E9%98%BF%E4%BC%AF%E4%B8%81%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E9%98%BF%E4%BC%AF%E6%B3%B0%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E4%BA%9A%E4%BC%AF%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E5%AE%89%E6%A0%BC%E5%88%A9%E4%BA%9A%E9%B2%81%E6%96%AF%E9%87%91%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E4%BC%AF%E6%81%A9%E8%8C%85%E6%96%AF%E8%89%BA%E6%9C%AF%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E4%BC%A6%E6%95%A6%E8%89%BA%E6%9C%AF%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E4%BC%A6%E6%95%A6%E5%A4%A7%E5%AD%A6%E5%AD%A6%E9%99%A2%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E9%98%BF%E4%BB%80%E9%87%8C%E5%A5%87%E5%95%86%E5%AD%A6%E9%99%A2%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E7%8F%AD%E6%88%88%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E5%B7%B4%E6%96%AF%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E5%B7%B4%E6%96%AF%E6%96%AF%E5%B7%B4%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E8%B4%9D%E5%BE%B7%E7%A6%8F%E7%89%B9%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E4%BC%A6%E6%95%A6%E5%A4%A7%E5%AD%A6%E4%BC%AF%E8%B4%9D%E5%85%8B%E5%AD%A6%E9%99%A2%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E4%BC%AF%E6%98%8E%E7%BF%B0%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E4%BC%AF%E6%98%8E%E7%BF%B0%E5%9F%8E%E5%B8%82%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E4%BC%AF%E6%98%8E%E7%BF%B0%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E5%8D%9A%E5%B0%94%E9%A1%BF%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E4%BC%AF%E6%81%A9%E8%8C%85%E6%96%AF%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E8%8B%B1%E5%8D%9A%E5%A4%8F%E5%B0%94%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E5%B8%83%E6%8B%89%E5%BE%B7%E7%A6%8F%E5%BE%B7%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E5%B8%83%E8%8E%B1%E9%A1%BF%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E5%B8%83%E9%87%8C%E6%96%AF%E6%89%98%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E5%B8%83%E9%B2%81%E5%86%85%E5%B0%94%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E7%99%BD%E9%87%91%E6%B1%89%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E5%89%91%E6%A1%A5%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E5%9D%8E%E7%89%B9%E4%BC%AF%E9%9B%B7%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E5%8D%A1%E8%BF%AA%E5%A4%AB%E5%9F%8E%E5%B8%82%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E5%8D%A1%E8%BF%AA%E5%A4%AB%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E4%B8%AD%E5%A4%AE%E5%85%B0%E5%BC%80%E5%A4%8F%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E5%88%87%E6%96%AF%E7%89%B9%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E5%A5%87%E5%88%87%E6%96%AF%E7%89%B9%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E4%BC%A6%E6%95%A6%E5%9F%8E%E5%B8%82%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E8%80%83%E6%96%87%E5%9E%82%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E5%85%8B%E5%85%B0%E8%8F%B2%E5%B0%94%E5%BE%B7%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E5%88%9B%E6%84%8F%E8%89%BA%E6%9C%AF%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E5%9D%8E%E5%B8%83%E9%87%8C%E4%BA%9A%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E9%82%93%E8%BF%AA%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E6%9D%9C%E4%BC%A6%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E6%9D%9C%E4%BC%A6%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E4%B8%9C%E8%8B%B1%E5%90%89%E5%88%A9%E4%BA%9A%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E4%B8%9C%E4%BC%A6%E6%95%A6%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E7%9F%A5%E5%B1%B1%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E7%88%B1%E4%B8%81%E5%A0%A1%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E7%88%B1%E4%B8%81%E5%A0%A1%E9%BE%99%E6%AF%94%E4%BA%9A%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E5%9F%83%E5%A1%9E%E5%85%8B%E6%96%AF%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E5%9F%83%E5%85%8B%E5%A1%9E%E7%89%B9%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E6%B3%95%E5%B0%94%E8%8C%85%E6%96%AF%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E6%A0%BC%E6%8B%89%E6%96%AF%E5%93%A5%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E6%A0%BC%E6%8B%89%E6%96%AF%E5%93%A5%E5%8D%A1%E5%88%A9%E5%A4%9A%E5%B0%BC%E5%AE%89%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E6%A0%BC%E9%B2%81%E6%96%AF%E7%89%B9%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E6%A0%BC%E6%9E%97%E5%A4%9A%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E4%BC%A6%E6%95%A6%E5%A4%A7%E5%AD%A6%E9%87%91%E5%8F%B2%E5%AF%86%E6%96%AF%E5%AD%A6%E9%99%A2%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E6%A0%BC%E6%9E%97%E5%A8%81%E6%B2%BB%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E5%93%88%E7%8F%80%E4%BA%9A%E5%BD%93%E6%96%AF%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E8%B5%AB%E7%91%9E%E7%93%A6%E7%89%B9%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E8%B5%AB%E7%89%B9%E7%A6%8F%E5%BE%B7%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E4%BC%A6%E6%95%A6%E5%A4%A7%E5%AD%A6%E6%B5%B7%E6%96%AF%E6%B4%9B%E6%99%AE%E5%AD%A6%E9%99%A2%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E9%AB%98%E5%9C%B0%E4%B8%8E%E7%BE%A4%E5%B2%9B%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E5%93%88%E5%BE%B7%E6%96%AF%E8%8F%B2%E5%B0%94%E5%BE%B7%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
http://dict.youdao.com/example/paper/%E8%B5%AB%E5%B0%94%E5%A4%A7%E5%AD%A6%E6%AF%95%E4%B8%9A%E8%AF%81%E6%A0%B7%E6%9C%AC%E5%8D%81%28V%29201632811
CUP线程调度
因为CPU需要不停的切换各个线程,从一个方法切换到另一个方法后,就要知道接着从哪开始继续执行。JVM的字节码解释器就可以通过读取PC寄存器的值来明确下一条应该执行什么样的字节码指令。
2|2PC寄存器为什么被设定为私有的?
线程的PC寄存器
我们都知道所谓的多线程在一个特定的时间段内只会执行其中某一个线程的方法,CPU会不停地做任务切换,这样必然导致经常中断或恢复,如何保证分毫无差呢?
为了能够准确地记录各个线程正在执行的当前字节码指令地址,最好的办法自然是为每一个线程都分配一个PC寄存器,这样一来各个线程之间便可以进行独立计算,从而不会出现相互干扰的情况。