[gclist] When to collect.

Ian Ringrose ianr@lsl.co.uk
Thu, 20 Nov 1997 14:44:35 -0000

> From: Jerry Leichter <leichter@smarts.com>
> One interesting question is whether a bit of OS support would help here.
> Currently, feedback from the VM system to the user is very limited.  In
> general, requests succeed or fail, and that's it.  There are very system-
> specific mechanisms for determining things like page fault rates, working
> size estimate (essentially, resident set size), and so on; but it's a
> podge of system-specific information whose exact semantics may be very
> difficult to determine.  

It's not just GC systems that could make use of such information.   We have
database system with a cache.  It is quicker for us to reread data from our
then to have the cache paging.  The cache size is yet one more thing that
customers have to set, if the OS provided the information we could
automate the setting of  the cache size.  

The other option we could make use of is a callback that is called just
a paged is paged out.  If the page was in use by the cache, and not dirty,
could just discard it at that point.  A GC could decide to copy all of it's
objects to a part filled page, so not having to paged it back in on the
GC pass.

I also get hit by the fact that if I discard a object in the cache that has
not been used for a long time, the page is marked by the OS as being
one to keep in RAM as I have just accessed it

Note:  The above will make debugging VERY hard, as running gdb will
change what pages are paged out, therefore what my cache did!!!

Ian Ringrose