At 3:08 PM +0100 1/24/04, Leopold Toetsch wrote:
Dan Sugalski <[EMAIL PROTECTED]> wrote:
At 5:56 PM +0100 1/23/04, Leopold Toetsch wrote:

Stopping all interpreters seems to be cheaper. The rwlock will sooner or
later stop all interpreters anyway (on first PMC access), so we can omit
the price for the rwlock and just hold the world(s).

The rwlock only stops all the interpreters when the DOD runs.

Sure. But that would still need to aquire a readers rwlock for each PMC access. This is more expensive then a mutex. During DOD any PMC access will halt the interpreter, so we can do that explicitely too and save the cost for the rwlock overhead. Albeit I can imagine, that aggregates will need a rwlock anyway.

Well... only the mutating vtable entries need to get the lock, so that reduces the expense somewhat. Still, I agree, it may be untenably expensive.


[ incremental GC ]

 If we have the facilities to do incremental DOD runs then this is
 definitely a possibility except for finalizers. Finalizers make
 things interesting, though if the background thread doing the DOD is
 a member of the interpreter pool then it'd work out OK.

Fianlizers and incremental DOD don't play together. The DOD must run to end to be sure, that the objects isn't referenced any more.

Finalizers and incremental DOD work just fine together. At some point the incremental DOD will figure out that something's dead, just as the stop-the-world DOD will. It just may take a bit longer.
--
Dan


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

Reply via email to