At 6:45 PM -0700 8/18/03, Dave Whipp wrote:
"Benjamin Goldberg" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
 What we'd like is a way (and there've been a couple proposed) to make it
 so that the sweep at the end of scope can *quickly* determine that all
 objects needing timely destruction are still alive/reachabe/in-scope,
 and abort early (and thus use less time).

Just wondering: will these "quickly" methods also help solve the problem of page thrashing on a process that runs out of physical RAM (and thus uses virtual memory)?

This won't generally be an issue for Parrot, since the DOD sweep only needs to look at PMCs, essentially just object headers, which are allocated out of arenas. For swapout to be an issue you'd have to have part or all of the arenas swapped out, which is pretty unlikely. It may happen for objects which are alive and hold arrays of other objects, but have been used rarely enough that they've swapped out, but that's also unlikely. (Possible, though, certainly)


The current GC system, since it's a compacting collector, does have the potential to touch a whole lot of pages, if you're unlucky enough for your memory distribution to be such that there's one byte used per swapped out page. That, bluntly, would suck. A lot. Not much for it, though, as no matter what scheme you use you'll have that problem. (Though other schemes can touch less memory, they have worse performance characteristics in less-sparse situations, which are more common)

While Parrot's DOD system's pretty heavily welded into the fabric of the source, the GC bits aren't. If someone wants to do some experimentation under different loads with different memory allocators, go for it. I'm also happy to accept patches to decouple the GC from the DOD more, as long as it doesn't impact current performance, if you're not happy with the current decoupling.

NB: The DOD system finds dead objects. The GC system finds and reclaims unused memory. Objects != memory, at least as far as parrot's concerned. (Confusing or conflating the two will cause issues, so don't :)
--
Dan


--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to