[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
set
> size estimate (essentially, resident set size), and so on; but it's a
hodge
> 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
large
database system with a cache.  It is quicker for us to reread data from our
files
then to have the cache paging.  The cache size is yet one more thing that
our
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
before
a paged is paged out.  If the page was in use by the cache, and not dirty,
we
could just discard it at that point.  A GC could decide to copy all of it's
live
objects to a part filled page, so not having to paged it back in on the
next
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
ianr@lsl.co.uk