www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - [OT] GC without paging

reply renoX <renosky free.fr> writes:
Hello,

this is not strictly related to D, but as D's runtime have a GC, I 
thought it can be useful to show an interesting research on GCs.

Traditional GCs perform poorly when memory gets tight: some of the page 
managed by the GC gets evicted to the disk by the Virtual memory Manager 
(VM) of the OS, but when the GC does a garbage collection run, it will 
swap in the evicted page which will cause the VM to evict another page, etc.

The Bookmarking Collector (BC) is a GC which communicates with the VM to 
select the page to evict to avoid this memory trashing, it necessitates 
a (small) patch to the OS so that the VM and the GC can communicate, but 
the results are impressive compared to traditional GCs when there is 
memory pressure: improved runtime and reduced pause (even if BC is not a 
realtime GC).

Here's the link to the video presentation (too bad, the questions at the 
end are difficult to hear):
http://content.digitalwell.washington.edu/msr/external_release_talks_12_05_2005/12631/lecture.htm

And the paper:
http://www.cs.umass.edu/~emery/pubs/f034-hertz.pdf


BC is a moving memory GC implemented in a JVM, so the results are not 
directly applicable to D, there's a non-moving variant of BC studied in 
the paper it gets nearly as good runtime as BC, but the pause are not as 
good.

I hope some of you will find this interesting.

Regards,
renoX
Aug 30 2007
parent reply Sean Kelly <sean f4.ca> writes:
Yup, it's a good technique.  About the only drawback is that it requires 
VMM integration to work, so it isn't terribly portable.  However, such a 
GC could fall back on normal mark/sweep if run on a platform it doesn't 
support.


Sean
Aug 30 2007
parent reply Ingo Oeser <ioe-news rameria.de> writes:
Sean Kelly wrote:

 Yup, it's a good technique.  About the only drawback is that it requires
 VMM integration to work, so it isn't terribly portable.  However, such a
 GC could fall back on normal mark/sweep if run on a platform it doesn't
 support.
Even better: D defines that a GC must EXIST, not what kind of GC you have to implement and how it must work :-) And your nice Tango library makes it even run time switchable AFAICS. So, people can really play here and you guys did a damn good design here! Best Regards Ingo Oeser
Sep 02 2007
parent reply Sean Kelly <sean f4.ca> writes:
Ingo Oeser wrote:
 Sean Kelly wrote:
 
 Yup, it's a good technique.  About the only drawback is that it requires
 VMM integration to work, so it isn't terribly portable.  However, such a
 GC could fall back on normal mark/sweep if run on a platform it doesn't
 support.
Even better: D defines that a GC must EXIST, not what kind of GC you have to implement and how it must work :-) And your nice Tango library makes it even run time switchable AFAICS.
Link-time switchable, actually. I'd originally considered run-time switchable, but it introduced too many weird problems. Sean
Sep 02 2007
parent Ingo Oeser <ioe-news rameria.de> writes:
Sean Kelly wrote:

 Ingo Oeser wrote:
[GC]
 And your nice Tango library makes it even run time switchable AFAICS.
Link-time switchable, actually. I'd originally considered run-time switchable, but it introduced too many weird problems.
That is amazing enough for me. So better keep that stuff clean and fast. Best Regards Ingo Oeser
Sep 02 2007