知识库--jvm-Parallel+Compacting+Collector(并行压缩回收)
来源:互联网 发布:护眼宝pc版 知乎 编辑:程序博客网 时间:2024/06/15 01:55
Parallel Compacting Collector
The parallel compacting collector was introduced in J2SE 5.0 update 6. The difference between it and the parallel collector is that it uses a new algorithm for old generation garbage collection. Note: Eventually, the parallel compacting collector will replace the parallel collector.
Young Generation Collection Using the Parallel
Young generation garbage collection for the parallel compacting collector is done using the same algorithm as that for young generation collection using the parallel collector.
Old Generation Collection Using the Parallel Compacting Collector With the parallel compacting collector, the old and permanent generations are collected in a stop-the-world, mostly parallel fashion with sliding compaction. The collector utilizes three phases. First, each generation is logically divided directly reachable from the application code is divided among garbage collection
as live, the data for the region it is in is updated with information about the size and location of the object.
The summary phase operates on regions, not objects. Due to compactions from previous collections, it is typical that some portion of the left side of each generation will be dense, containing mostly live objects. The amount of space that could be recovered(回收) from such dense regions is not worth the cost of compacting them. So the first thing the summary phase does is examine the density of the regions, starting with the leftmost one, until it reaches a point where the space that could be recovered from a region and those to the right of it is worth the cost of compacting those regions. The regions to the left of that point are referred to as the dense prefix, and no objects are moved in those regions. The regions to the right of that point will be compacted, eliminating all dead space. (任务)The summary phase calculates and stores the new location of the first byte of live data for each compacted region(多线程copy的基础).
Note: The summary phase is currently implemented as a serial phase(重点); parallelization is possible but not as important to performance as parallelization of the marking and compaction phases.//汇总阶段串行 而标记和压缩为并行
In the compaction phase, the garbage collection threads use the summary data to identify regions that need to be filled, and the threads can independently copy data into the regions. This produces a heap that is densely packed on one end, with a single large empty block at other end.
适用于多cpu,stop-the-world时间严格限制。
option command: -XX:+UseParallelOldGC.
- 知识库--jvm-Parallel+Compacting+Collector(并行压缩回收)
- java HotSpot虚拟机垃圾回收优化(六、The Parallel Collector)
- Oracle 并行(Parallel)
- JVM 内存模型和垃圾回收(四): 并发回收(Concurrent Mark-Sweep Collector)
- 并行处理(Parallel Processing)
- oracle并行模式(Parallel)
- Oracle并行模式(Parallel)
- JVM 内存模型和垃圾回收(三): 并行回收器
- SRC Parallel Garbage Collector
- 并行(parallel)和并发(concurrency)
- 并行(Parallel)和OLAP系统
- Java并行编程(parallel programming)
- Parallel Python(PP)并行计算测试
- Oracle并行操作——并行查询(Parallel Query)
- 【知识库】--JVM 原理指导(java8 )(208)
- Parallel Execution(并行执行)
- Parallel.ForEach() 并行循环
- c# Parallel并行运算
- 问题描述 已知一个正整数N,问从1~N中任选出三个数,他们的最小公倍数最大可以为多少。 输入格式 输入一个正整数N。 输出格式 输出一个整数,表示你找到的最小公倍数。 样例输入 9 样例输出 5
- Chapter 16 Control Unit Operation
- TFS 测试用例步骤数据统计
- Java反射机制
- Chapter 17 Micro-Programmed Control
- 知识库--jvm-Parallel+Compacting+Collector(并行压缩回收)
- Chapter 18 Parallel Processing
- Github+Jekyll搭建个人博文网站
- BZOJ 2565 最长双回文串
- jQuery事件-键盘事件
- JavaScript中的字符串(String)的常用方法
- Copy List with Random Pointer
- switch语句的表达式可以是哪些类型?
- 【Shader】用一张渐变图实现卡通渲染效果