comp.lang.ada
 help / color / mirror / Atom feed
From: barmar@think.COM (Barry Margolin)
Subject: Re: Garbage Collection
Date: 15 Jan 89 07:14:12 GMT	[thread overview]
Message-ID: <35415@think.UUCP> (raw)
In-Reply-To: 4073@hubcap.UUCP

In article <4073@hubcap.UUCP> wtwolfe@hubcap.clemson.edu writes:
>    Why doesn't the editor do the deletion of warnings?  If the editor
>    is already providing a "search for next warning" function, it should
>    provide the "delete warning" function as well.  Then we wouldn't have
>    to deal with shared variables at all, although your later comments do
>    make the whole question moot.

Who said that the editor doesn't provide for deletion of warnings,
too?  But that shouldn't prevent the command processor from also
deleting them.

>> Real-time GC mechanisms are defined to do a bounded amount of work PER
>> ALLOCATION.  [....]  And generational and ephemeral GC mechanisms
>> concentrate their efforts on memory most likely to contain garbage.
>
>    Could you send me a detailed explanation of these mechanisms?

The canonical reference for real-time GC is a paper, about 10 years
old, by Henry Baker.  I don't know the exact reference, but the title
included the phrases "Garbage Collection" and "Real-time", and it was
probably in something like a proceedings of a POPL conference.  The
general idea of these mechanisms is that every time an object is
allocated up to N words are scanned for non-garbage objects to be
copied.

My reference for ephemeral GC is David Moon's paper, approximately
titled "Garbage Collection in Large Virtual Memory Systems", which is
in the proceedings of the first (or maybe second) ACM Lisp Conference.
I don't know what the references for generational GC's are; recent
Lisp and Functional Programming Conference proceedings are probably a
good place to look.

>> Decent GC mechanisms can be told to ignore manually managed space.  
>
>    If this means that I can specify that my allocation requests carry
>    the condition that the GC mechanism will stay away from the space
>    I receive, then I'll be happy to change my position on garbage collection.

Well, the GC implementation that I'm most familiar with is the
Symbolics 3600.  This architecture organizes the address space into
logical entities called "areas".  Each area can be flagged as either
dynamic or static, the latter indicating that garbage should not be
collected there.  The GC still has to scan through static areas to see
whether they contain references to objects in dynamic areas, though;
otherwise the GC might create a dangling reference.

In the Symbolics system, the primary use of static areas is to prevent
pure code pages that are paged directly out of load files from being
copied into swap space.  They are also used for holding I/O buffers,
which are manually reused and therefore never become garbage.  The
features they are missing for your purposes are sophisticated
allocation and deallocation primitives; the only primitives the Lisp
Machine provides always allocate and deallocate space at the end of an
area, because the system depends on the GC to free up interior space.
But you could easily build a sophisticated allocator that manages its
own space inside a static area.

>    HOWEVER.  There are still things that need changing.  There still needs
>    to be implicit destruction of local environments via calls to DESTROY
>    routines.  Parameter passing is still ambiguous with respect to storage
>    utilization.  In general, I can live with GC being required IFF I can
>    also exert total control over when, how, and for how long every piece
>    of space is occupied, and I can determine exactly how much space is
>    being used implicitly and for how long.  

Lisp-like languages provide for this by providing macros that
encapsulate the allocation and deallocation of objects.  For example,
in Common Lisp one can write:

	(WITH-OPEN-FILE (variable file-name options...)
	  body...)

This opens the specified file, assigns the stream to the variable,
executes the body, and then closes the file.  And it guarantees that
the file will be closed no matter how the environment is exited.  This
is generally implemented using Lisp's UNWIND-PROTECT primitive, which
allows arbitrary code to be executed when an environment is being
exited.

Barry Margolin
Thinking Machines Corp.

barmar@think.com
{uunet,harvard}!think!barmar

  reply	other threads:[~1989-01-15  7:14 UTC|newest]

Thread overview: 79+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1989-01-06 22:17 Garbage Collection Erland Sommarskog
1989-01-08 18:40 ` William Thomas Wolfe,2847,
1989-01-09  3:56   ` Barry Margolin
1989-01-09 16:22     ` William Thomas Wolfe,2847,
1989-01-09 19:00       ` Barry Margolin
1989-01-10  2:50         ` William Thomas Wolfe,2847,
1989-01-11  9:22           ` Barry Margolin
1989-01-11 16:01             ` William Thomas Wolfe,2847,
1989-01-11 18:21               ` Barry Margolin
1989-01-12  2:43                 ` William Thomas Wolfe,2847,
1989-01-15  7:14                   ` Barry Margolin [this message]
  -- strict thread matches above, loose matches on Subject: below --
1999-08-18  0:00 garbage collection Ronald Ayoub
1999-08-18  0:00 ` tmoran
1999-08-18  0:00   ` Keith Thompson
1999-08-19  0:00     ` Tucker Taft
1999-08-19  0:00       ` Robert Dewar
1999-08-19  0:00       ` Robert Dewar
1999-08-20  0:00     ` tmoran
1999-08-20  0:00       ` Keith Thompson
1999-08-20  0:00         ` Matthew Heaney
1999-08-20  0:00           ` Keith Thompson
1999-08-21  0:00             ` Matthew Heaney
1999-08-21  0:00             ` Robert Dewar
1999-08-21  0:00               ` Matthew Heaney
1999-08-21  0:00           ` Robert Dewar
1999-08-21  0:00         ` Brian Rogoff
1999-08-21  0:00       ` Robert Dewar
1999-08-18  0:00 ` Pascal MALAISE
1999-08-20  0:00   ` David Botton
1999-08-18  0:00 ` Gisle S�lensminde
1999-08-18  0:00 ` Robert I. Eachus
1999-08-19  0:00   ` Gautier
1999-08-19  0:00     ` Robert I. Eachus
1999-08-20  0:00   ` Keith Thompson
1999-08-20  0:00     ` Robert Dewar
1996-10-24  0:00 Garbage Collection H Brett Bolen
1989-01-10 19:16 Erland Sommarskog
1989-01-11 16:10 ` William Thomas Wolfe,2847,
1989-01-05 23:26 Erland Sommarskog
1988-12-31  0:04 Erland Sommarskog
1989-01-05  8:13 ` William Thomas Wolfe,2847,
1988-12-28 19:20 Erland Sommarskog
1988-12-30  0:52 ` Bill Wolfe
1988-12-26 23:37 Erland Sommarskog
1988-12-27 21:24 ` William Thomas Wolfe,2847,
1988-12-28 16:09   ` Snorri Agnarsson
1988-12-30  0:46     ` Bill Wolfe
1988-12-27 22:24 ` Bob Hathaway
1988-12-18 20:12 Erland Sommarskog
1988-12-20 19:04 ` Bill Wolfe
1988-12-13 20:07 Erland Sommarskog
1988-12-15 19:13 ` William Thomas Wolfe,2847,
1988-12-07 15:22 Collective response to := messa ron
1988-12-11 19:11 ` Garbage Collection William Thomas Wolfe,2847,
1988-12-12  5:29   ` John Gateley
1988-12-12 18:19     ` William Thomas Wolfe,2847,
1988-12-13  1:02       ` Alexander Klaiber
1988-12-13 18:37         ` William Thomas Wolfe,2847,
1988-12-13 23:36           ` Alexander Klaiber
1988-12-14  3:26             ` William Thomas Wolfe,2847,
1988-12-14 17:16             ` Stephe Leake
1988-12-15 14:43             ` Thomas P. Morris
1988-12-14 23:30           ` John Gateley
1988-12-15 19:25             ` William Thomas Wolfe,2847,
1988-12-19 16:12               ` John Gateley
1988-12-20 19:34                 ` Bill Wolfe
1988-12-13 20:22         ` William Thomas Wolfe,2847,
1988-12-14  6:40           ` Richard A. O'Keefe
1988-12-14 17:43             ` William Thomas Wolfe,2847,
1989-01-02 17:51   ` ryer
1989-01-05  8:31     ` William Thomas Wolfe,2847,
1989-01-06 16:58   ` ryer
1989-01-08 19:24     ` William Thomas Wolfe,2847,
     [not found] <145@krafla.rhi.hi.is>
     [not found] ` <272@fang.ATT.COM>
1988-03-29 13:47   ` From Modula to Oberon Denis Fortin
1988-03-30 15:32     ` Lawrence Crowl
1988-03-30 22:41       ` Hans Boehm
1988-03-31  6:27         ` Garbage Collection Richard Harter
1988-03-31 19:49           ` Hans Boehm
1988-04-01  5:43             ` Richard Harter
1988-04-01 18:43               ` Hans Boehm
1988-04-04 23:14           ` 00704a-Liber
1986-03-16 22:24 Garbage collection "Alexander L. Wolf"
     [not found] <1979@mit-eddi.UUCP>
     [not found] ` <2144@mit-eddie.UUCP>
1984-06-18 19:28   ` Abstraction In Ada Jon Mauney
1984-06-22  7:47     ` Doug Alan
1984-06-25  2:15       ` brad
1984-07-17 10:34         ` garbage collection Eric Smith
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox