[HN Gopher] Garbage Collection in a Large Lisp System (1984) [pdf]
___________________________________________________________________
Garbage Collection in a Large Lisp System (1984) [pdf]
Author : mepian
Score : 36 points
Date : 2023-08-21 14:21 UTC (8 hours ago)
(HTM) web link (dl.acm.org)
(TXT) w3m dump (dl.acm.org)
| tekknolagi wrote:
| This is a good paper. It's the one I read some years ago that
| made semispace garbage collection click for me.
| smokel wrote:
| I once read that in the olden days, one would work away on a
| machine for some time, and when evening came, you'd start the
| garbage collection process to write all relevant data to tape,
| from which you'd start again the next morning.
| jjtheblunt wrote:
| i'm not sure if this is related, but i think Lisp systems
| traditionally let you save the core image to restart in the
| same state.
| vindarel wrote:
| related: the Immix inspired parallel-mark-region GC developed by
| Hayley Patton got merged recently into SBCL (https://github.com/s
| bcl/sbcl/commit/40276b25370f2af1e1870d3b...).
|
| https://github.com/sbcl/sbcl/blob/master/doc/internals-notes...
|
| https://applied-langua.ge/~hayley/swcl-gc.pdf
|
| build with ./make.sh --without-gencgc --with-
| mark-region-gc (on x86-64/Linux and x86-64/macOS only at the
| moment).
| the-smug-one wrote:
| >Kandria, a commercial game written in Common Lisp [14 ], is
| used in a more complex benchmark. The game uses a mixture of
| object-oriented code and numerical code with unboxed arrays.
| The game is configured identically to the retail version, using
| a 4GB heap. We played the same part of the game for a few
| minutes with each collector configuration10, and record the
| distribution of how long it takes to produce each frame (frame
| times), and the distribution of pause times in the kandria
| benchmark.
|
| That's a fun benchmark to have. Seems like gencgc is better
| than the new GC anyway wrt pause times?
|
| >Very few objects survive garbage collection in Kandria, with
| less than a megabyte surviving out of a 200 megabyte nursery.
|
| From this sentence I'm going to guess that Kandria performs a
| lot of per-frame allocations. Having a bump-pointer arena for
| this which is reset per-frame would probably be quite nice.
|
| The Acknowledgements section is crazy haha, with mentions such
| as Cliff Click (OG Hotspot JIT compiler architect) and Larry
| Masinter (Xerox PARC Interlisp) along with the nice SBCL and
| Kandria devs.
| gumby wrote:
| Is anyone still using transporting (copying) collectors these
| days? Without forwarding pointers you can only do it via stop and
| copy.
|
| I'm not sure I'd want to implement forwarding pointers without
| hardware support for transparency.
| chubot wrote:
| ??? Just about all high performance GCs use moving GCs for the
| young/fast generation, to get bump allocation
|
| Examples:
|
| The whole v8 lineage of VMs, and SpiderMonkey followed shortly
| thereafter
|
| Java Hotspot and most fast alternatives
|
| Femtolisp used to bootstrap Julia is a moving GC with no
| generations
|
| Forwarding is not really a problem, the algorithm is well known
|
| Rooting is a difficult problem in many contexts -- both C and
| webassembly.
|
| You need precise rooting to implement moving GC, that's the
| main implementation issue
|
| (On my phone, sorry no links)
| monocasa wrote:
| Yeah, because you need a copying collector to be generational
| and to compact. You do have to stop, but you don't have to stop
| normal execution threads for very long (under a millisecond for
| ZGC, and the time doesn't scale with heap size).
| aardvark179 wrote:
| A lot of engineering has gone into GCs over the years to avoid
| the need to stop the world when copying objects around, and no
| hardware support is needed for the pointer chasing. You do need
| support for atomic swaps and sometimes some MMU tricks but
| other than that you're good.
| kryptiskt wrote:
| It's quite common with generational GCs, The nursery is small
| and many objects die early, so not a lot has to copied in minor
| collections. I've never seen one without forwarding pointers,
| it seems to me that they are necessary for updating all
| references.
___________________________________________________________________
(page generated 2023-08-21 23:00 UTC)