Newsgroups: comp.lang.scheme
Path: cantaloupe.srv.cs.cmu.edu!bb3.andrew.cmu.edu!nntp.sei.cmu.edu!news.cis.ohio-state.edu!math.ohio-state.edu!howland.erols.net!ix.netcom.com!netcom9.netcom.com!haahr
From: haahr@netcom.com (Paul Haahr)
Subject: Re: Question about destructors, garbage collection, and formal semantics
In-Reply-To: schwartz@galapagos.cse.psu.edu.NO-SPAM's message of 13 Mar 1997 00:29:18 -0500
To: schwartz@galapagos.cse.psu.edu.NO-SPAM (Scott Schwartz)
Message-ID: <HAAHR.97Mar13140532@netcom9.netcom.com>
Sender: haahr@netcom9.netcom.com
Organization: NETCOM On-line services
References: <5fvug3$k2b@ptdcs5.ra.intel.com> <BITMEADC.97Mar13120743@Alcatel.com.au>
	<8gd8t42wcx.fsf@galapagos.cse.psu.edu>
Distribution: inet
Date: Thu, 13 Mar 1997 22:05:32 GMT
Lines: 40

Scott Schwartz wrote:
> Chris.Bitmead@Alcatel.com.au (Chris Bitmead) writes:
> | Now it seems that in practice, file descriptors tend to be almost the
> | only real life case where this is interesting. One could perhaps also
> | imagine GUI window descriptors, but control over windows is usually
> | pretty explicit, and no-one wants to pretend that window real estate
> | should be garbage collected at random.
> 
> In Limbo (the language used in Inferno, a new OS from Bell Labs) GC is
> done by reference counting, so that a window can disappear immediately
> after a local variable containing the reference to it goes out of
> scope.
> 
> Paul Haahr published a (Usenix?) paper a while ago on a scheme based
> window system that did the same sort of thing.

Er, well, sort of.  I did present a paper at summer '90 usenix, on  a
window system written in Scheme.  But destroying windows was an explicit
call, not implicit with garbage collection.

I think Scott's confusing how I treated windows with how I treated
processes.  There were no explicit references to processes, only to
channels.  Channels internally held references to the processes that
were waiting for communication on them.  If two processes deadlocked and
there were no external references to the channel they were using, both
processes did get garbage collected.  What tended to happen was that a
deadlock would spread throughout the whole system as programs needed to
communicate with each other (say, because mouse focus was changing);
once the window manager itself deadlocked, since that was the main
thread, I believe the whole system ended up exiting.

Going full circle, that work was (conceptually) derived from Rob Pike's
Newsqueak, which also begat Aleph and Limbo.

The paper is available at

  http://www.webcom.com/haahr/montage/montage-usenix-s90.html

Note that I never did the follow-up work I outlined nor the paper
detailing the graphics system.
