Python complaints

Bijan Parsia bparsia at email.unc.edu
Sat Nov 27 12:27:54 EST 1999


Gareth McCaughan <Gareth.McCaughan at pobox.com> wrote:

> Markus Stenberg wrote:
> 
> [I said:]
> >> Garbage collectors have got a *lot* better since the days when
> >> GC meant half-second pauses waiting for the machine to sweep
> >> through all its memory. Let alone 20 seconds.
> > 
> > Where can I admire such a beast? At least none of the Java
> > implementations(*) I have tried(**) have one. say, for 128MB of trash, it's
> > consistent N second sweep (0.5-10, depending on hardware).
> 
> In a modern Lisp implementation. Modern Smalltalks are probably
> just as good. (Unfortunately, "modern" might have to imply
> "commercial" here; I'm not sure of the quality of the GC in
> the various free implementations of those languages.)

Yep, they're as good. As for trying 'em out, the are non-commercial
(i.e., limited to non-commercial uses unless you purchace a licence) of
VisualWorks (http://www.cincom.com) for many platforms (the latest
version, 5i, is available for Linux and Windows, but not yet for
PowerMac). VW allows you to do all sorts of things with it's gc via a
class called, IIRC, Memory Policy.

There is a non-commercial version of Dolphin Smalltalk
(http://www.object-arts.com/), albeit for Windows only. But it's a nice
smallish Smalltalk (VW can be overwhelmning, particularly at first).
(I'll add that Dolphin is rather inexpensive and is definitely worth it)
I believe Smalltalk MT may have a demo version.

As for Free/Open Source, there's Squeak (http://www.squeak.org), which
is massively cross platform (even runs on WinCE & Sharp's ICruise).
There's a very clear description of Squeak's gc in the "Back to The
Future" paper
(ftp://st.cs.uiuc.edu/Smalltalk/Squeak/docs/OOPSLA.Squeak.html). An
edited quote:

"Two policy refinements reduced the incremental garbage collection
pauses to the point where Squeak became usable for real-time
applications such as music and animation...We have been using this
storage manager in support of real-time graphics and music for over a
year now with extremely satisfactory results. In our experience, 10
milliseconds is an important threshold for latency in interactive
systems, because most of the other critical functions such as mouse
polling, sound buffer output and display refresh take place at a
commensurate rate."

There also was a Real Time Squeak project which was, alas, canceled, but
the bits and pieces are filtering their way into the main distribution.
A paper describing the work was given at the OOPSLA '99 "VM Workshop"
(http://www.squeak.org/oopsla99_vmworkshop/). The particular paper is
"Experience Report: Building a Real Time OS Kernel in Smalltalk". There
have been other RT Smalltalks, I believe.

Gnu Smalltalk has be revived, but I don't *believe* it's settled on a gc
mechanism yet, although it may just borrow Squeak's (in concept if not
in code).

Note: I was confused by the term "non-deterministic" wrt to GC. My first
thought was that it referred to the fact that, generally, one doesn't
know exactly *when* garbage will be collected, only that it *will* be,
at some point, if necessary ;) This is certainly an important issue for
such matters as finalization. But it seems to have been used to refer to
the "pausing" problem. But I don't think that's necessarily
"non-deterministic", per se. It isn't that hard to predict how long a
stopping gc will take for a given memory space! ;)

Cheers,
Bijan Parsia




More information about the Python-list mailing list