Java VM: Trying a new Garbage Collector for JDK 7
Filed under: java javase vm on Wednesday Nov 12, 2008Like using the living room as the kids play area, tidying up, or garbage collection, is an integral part of life in the JVM. Except that the kids are applications and the toys on the floor the objects they create. But unlike in your living room, these kids don't sleep, are always playing with something, will scream if they have to wait while you tidy up, and will get seriously, seriously mad if they lose a toy. So how can you organize the mess they make without disrupting the game ?The HotSpot team has been quietly working on a new algorithm, called Garbage First, for tidying up the memory space in the JVM while the kids are playing, as a replacement for the existing parallel and concurrnet  sweep collectors. By dividing the living rooms into equal squares, it turns out that for most games, many of the squares contain unused toys that can be safely put away. By picking the low hanging fruit in this way, the new collector can work more predictably, and be given directives to operate within given time slices, which it can follow most of the time. And of course, being fully concurrent, its ready made for multiple cores.
关注JDK1.7的GC新特性原文地址:
http://blogs.sun.com/theplanetarium/entry/java_vm_trying_a_new

解决方案 »

  1.   

    无聊 翻译一下:以客厅作为小孩玩耍的产所为例,整理或者收拾垃圾,是JVM周期中的一项不可或缺的任务。在这里小孩是应用程序,地板上的玩具是他们创建的对象。但不是真正在你的客厅,这些小孩从不睡觉,而且一直在玩耍着一些东西,而且当你整理东西从而不得不让他们等等在玩的时候,他们会哭闹,如果他们发现少了一个玩具会十分的恼火。所以在不打断他们玩耍的时候,你应该怎么管理这些呢?
    HotSpot团队已经在新算法上研究了一番。新算法叫垃圾优先算法,是为了当有程序在运行的时候整理JVM里的内存空间。该算法将替换现有的平行并发锁的清除搜集器(这块我不太懂)。通过将起居室均分成一个个的区域,这样对于大部分的游戏,在许多区域里就会有一些没有用到的,可以被拿走的玩具。通过这种途径摘下位置低的水果(风险小的意思吧 呵呵),新式的收集器将会更有预见性的工作,能够在给定指令后指定的时间间隙里执行操作,而且在大部分的时候都能遵循这一方法。当然了,新式的垃圾回收机制已经支持了多核心了,从而实现真正的并发处理。
      

  2.   

    100分的高分帖,竟然没有人顶。。[color=#FF0000][/color]
      

  3.   


    JDK1.7的GC新特性
    关注,呵呵
      

  4.   

    期待ing,不知道啥时候推出哦~~!
      

  5.   

    这 和  jdk1.2 中 分代理论[火车算法] 有什么区别吗?
      

  6.   

    jdk 1.7稳定吗?用着怎么样!从那里可以下载!!!