What does java quot;VM threadquot; do?(java“虚拟机线程是什么意思?做?)
问题描述
我使用 jstack 来输出线程信息.还有一个线程:VM 线程"prio=10 tid=0x0878b400 nid=0x760a 可运行
I use jstack to output the thread info. And there is a thread: "VM Thread" prio=10 tid=0x0878b400 nid=0x760a runnable
这个线程是用来做什么的?它占用 50% 的 CPU 使用率和大部分 CPU 时间
What is this thread used to do? It takes 50% CPU usage and most of CPU time
推荐答案
VM线程定义这里 作为:
该线程等待需要 JVM 到达安全点的操作出现.这些操作必须在单独的线程上发生的原因是因为它们都要求 JVM 处于不能对堆进行修改的安全点.该线程执行的操作类型是stop-the-world"垃圾收集、线程堆栈转储、线程挂起和偏向锁定撤销.
This thread waits for operations to appear that require the JVM to reach a safe-point. The reason these operations have to happen on a separate thread is because they all require the JVM to be at a safe point where modifications to the heap can not occur. The type of operations performed by this thread are "stop-the-world" garbage collections, thread stack dumps, thread suspension and biased locking revocation.
在去重的 SO 答案中还提供了一些信息 这里.
There's also some information provided in a de-duplicated SO answer here.
这篇关于java“虚拟机线程"是什么意思?做?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:java“虚拟机线程"是什么意思?做?


- Eclipse 插件更新错误日志在哪里? 2022-01-01
- Safepoint+stats 日志,输出 JDK12 中没有 vmop 操作 2022-01-01
- 从 finally 块返回时 Java 的奇怪行为 2022-01-01
- C++ 和 Java 进程之间的共享内存 2022-01-01
- 将log4j 1.2配置转换为log4j 2配置 2022-01-01
- value & 是什么意思?0xff 在 Java 中做什么? 2022-01-01
- 如何使用WebFilter实现授权头检查 2022-01-01
- Java包名称中单词分隔符的约定是什么? 2022-01-01
- Spring Boot连接到使用仲裁器运行的MongoDB副本集 2022-01-01
- Jersey REST 客户端:发布多部分数据 2022-01-01