Path: utzoo!attcan!uunet!ginosko!gem.mps.ohio-state.edu!uwm.edu!rutgers!cmcl2!lanl!opus!ted
From: ted@nmsu.edu (Ted Dunning)
Newsgroups: comp.sw.components
Subject: Re: Garbage Collection & ADTs
Message-ID: 
Date: 27 Sep 89 19:24:08 GMT
References: <911@scaup.cl.cam.ac.uk> <6589@hubcap.clemson.edu>
Sender: news@nmsu.edu
Organization: NMSU Computer Science
Lines: 54
In-reply-to: billwolf%hazel.cs.clemson.edu@hubcap.clemson.edu's message of 26 Sep 89 18:25:30 GMT


In article <6589@hubcap.clemson.edu> billwolf%hazel.cs.clemson.edu@hubcap.clemson.edu (William Thomas Wolfe, 2847 ) writes:

   From scc@cl.cam.ac.uk (Stephen Crawley):
   > Here are some problems where programmer-controlled storage management 
   > would be very difficult or impossible.
   > 
   >   Interactive editting of cyclic graph data structures.  You have a 
   >   heterogeneous cyclic graph data structure and the editor must be able
   >   to make arbitrary sequences of changes to the data structure.  How
   >   do you detect that a subgraph has become detached?   

      The fact that a subgraph has become detached does not imply that
      it is no longer part of a graph.  Not all graphs are fully connected.
      Therefore, it isn't possible to release the storage used until there
      is some sort of directive which indicates that a given set of nodes
      and/or arcs is to be destroyed. 

good point.  of course, languages which have true garbage collection
can handle this problem, too, while bill wolfe seems to think he
couldn't handle it in his paradigm.

   >   Dynamic loading & unloading of modules in a running program.  
   >   [...] the dynamic loader needs to know if the module is
   >   currently being 'used' ... e.g. if some thread is executing a 
   >   procedure exported by the module or if some other part of the
   >   application has salted away a reference into the module (e.g. a 
   >   procedure pointer)
	...

      This is an operating-system problem, not an application problem.
      As such, the situation is not "applicable to a wide range of
      applications".  The solution is operating-system dependent; one
      approach might be to use idle time to scan the processes in the
      process queue to determine if there are any processes which were
      started while the old module was in effect which made use of it.

this won't work in most cases since there will be at least one
ancestral process that started very early and runs essentially forever.

      Operating systems do a lot of things (pointer arithmetic, etc.)
      which application systems should not be doing; this falls into
      exactly that category.

but of course, this problem is trivial to handle in all the scheme
dialects where continuations are available as first class objects, and
where the garbage collector understands how to collect references from
inside continuations.  not only that, but the solution is portable.


--
ted@nmsu.edu
			remember, when extensions and subsets are outlawed,
			only outlaws will have extensions or subsets