首页> 外文会议>Logic Programming >Copying Garbage Collection for the WAM: To Mark or Not to Mark?
【24h】

Copying Garbage Collection for the WAM: To Mark or Not to Mark?

机译:为WAM复制垃圾回收:标记还是不标记?

获取原文

摘要

Garbage collection by copying is becoming more and more popular for Prolog. Copying requires a marking phase in order to be safe: safeness means that the to-space is guaranteed not to overflow. However, some systems use a copying garbage collector without marking prior to copying, and instead postpone the copying of potentially unsafe cells. Such systems only collect small portions of the heap and it is not clear whether postponing works while collecting the whole heap. Moreover, it is shown here that postponing does not solve the problem in a fundamental way. Since marking takes time, it is worth studying the tradeoffs involved. These observations have prompted the experimentation with a series of garbage collectors based on copying without marking and without postponing. In particular, variants were implemented that are named dangerous, optimistic and cautious copying which exhibit various degrees of unsafeness. Versions of each have been implemented based on recursive copying as in most implementations of copy_term/2 and on the Cheney algorithm. Performance on benchmarks suggests that large performance gains can be obtained by skipping the marking phase, that dangerous copying is still relatively safe but can be costly, and that the additional effort of cautious copying over optimistic copying is not worth it. The optimistic collectors based on recursive copying perform best and slightly better than the ones based on Cheney. Cache performance measurements back up the benchmark results.
机译:通过复制收集垃圾对于Prolog越来越流行。为了安全起见,复制需要标记阶段:安全性意味着可以保证目标空间不会溢出。但是,某些系统使用复制垃圾收集器而不在复制之前进行标记,而是推迟复制可能不安全的单元。这样的系统仅收集堆的一小部分,尚不清楚在收集整个堆时延迟是否起作用。此外,这里显示出延迟并不能从根本上解决问题。由于标记需要时间,因此值得研究所涉及的权衡。这些观察结果促使人们进行了一系列基于复制,无标记和无延迟的垃圾收集器的实验。特别是,实施了变种,它们被命名为危险,乐观和谨慎的复制,它们表现出不同程度的不安全性。像在copy_term / 2的大多数实现中一样,每个版本都基于递归复制和Cheney算法实现。基准性能表明,跳过标记阶段可以获得较大的性能提升,危险的复制仍然相对安全,但代价昂贵,并且谨慎复制而不是乐观复制所付出的额外努力是不值得的。基于递归复制的乐观收集器的性能最好,但略优于基于Cheney的收集器。缓存性能测量结果可支持基准测试结果。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号