garbage collecting the internet: a survey of distributed

44
Garbage Collecting the Internet: A Survey of Distributed Garbage Collection SALEH E. ABDULLAHI AND GRAEM A. RINGWOOD Queen Mary and Westfield College, University of London Internet programming languages such as Java present new challenges to garbage- collection design. The spectrum of garbage-collection schema for linked structures distributed over a network are reviewed here. Distributed garbage collectors are classified first because they evolved from single-address-space collectors. This taxonomy is used as a framework to explore distribution issues: locality of action, communication overhead and indeterministic communication latency. Categories and Subject Descriptors: C.2.4 [Computer-Communications Networks]: Distributed Systems; D.1.3 [Programming Techniques]: Concurrent Programming, Distributed Programming, Parallel Programming; D.4.2 [Operating Systems]: Storage Management; D.4.3 [File Systems Management] General Terms: Languages, Management, Performance, Reliability Additional Key Words and Phrases: Automatic storage reclamation, distributed object-oriented management, distributed file systems, distributed memories, memory management, network communication, distributed, object-oriented databases, reference counting 1. INTRODUCTION Efficient automatic garbage collection is so useful and so difficult to make unob- trusive that it has been a field of active research for over three decades. The problem was considered “solved” in the late ’80’s with state-of-the-art genera- tion scavengers employed by Smalltalk systems. Smalltalk was the major driv- ing force in the development of garbage collectors in the 1980s. The 1990s saw a significant technology shift to distrib- uted systems, which provide a further challenge to language and garbage-col- lection design. Unfortunately, the term distributed system has been applied to so wide a range of computing systems—loosely coupled, closely coupled, tightly cou- pled, array processors, dataflow, neural nets, etc. [Booth 1981]—as to become almost without meaning. For this re- view, following Lamport [1978], a sys- tem is classified as distributed if the end-to-end message transmission delay is significantly greater than the time between consecutive events of a process. Storage reclamation became a neces- sity when LISP pairs were introduced in the early 1960s [McCarthy 1981]. The lifetimes of such structures generally exceed the lifetime of modules that ac- cess them. Indeed, for Smalltalk the data structures are persistent. Moss [1990] defines a persistent store as one that outlives the execution of any pro- cess. The definition includes file sys- tems and databases. Atkinson et al. Permission to make digital / hard copy of part or all of this work for personal or classroom use is granted without fee provided that the copies are not made or distributed for profit or commercial advantage, the copyright notice, the title of the publication, and its date appear, and notice is given that copying is by permission of the ACM, Inc. To copy otherwise, to republish, to post on servers, or to redistribute to lists, requires prior specific permission and / or a fee. © 1998 ACM 0360-0300/98/0300–0330 $5.00 ACM Computing Surveys, Vol. 30, No. 3, September 1998

Upload: others

Post on 14-Jan-2022

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Garbage Collecting the Internet: A Survey of Distributed

Garbage Collecting the Internet: A Survey of Distributed GarbageCollectionSALEH E. ABDULLAHI AND GRAEM A. RINGWOOD

Queen Mary and Westfield College, University of London

Internet programming languages such as Java present new challenges to garbage-collection design. The spectrum of garbage-collection schema for linked structuresdistributed over a network are reviewed here. Distributed garbage collectors areclassified first because they evolved from single-address-space collectors. Thistaxonomy is used as a framework to explore distribution issues: locality of action,communication overhead and indeterministic communication latency.

Categories and Subject Descriptors: C.2.4 [Computer-CommunicationsNetworks]: Distributed Systems; D.1.3 [Programming Techniques]: ConcurrentProgramming, Distributed Programming, Parallel Programming; D.4.2 [OperatingSystems]: Storage Management; D.4.3 [File Systems Management]

General Terms: Languages, Management, Performance, Reliability

Additional Key Words and Phrases: Automatic storage reclamation, distributedobject-oriented management, distributed file systems, distributed memories,memory management, network communication, distributed, object-orienteddatabases, reference counting

1. INTRODUCTION

Efficient automatic garbage collection isso useful and so difficult to make unob-trusive that it has been a field of activeresearch for over three decades. Theproblem was considered “solved” in thelate ’80’s with state-of-the-art genera-tion scavengers employed by Smalltalksystems. Smalltalk was the major driv-ing force in the development of garbagecollectors in the 1980s. The 1990s saw asignificant technology shift to distrib-uted systems, which provide a furtherchallenge to language and garbage-col-lection design.

Unfortunately, the term distributedsystem has been applied to so wide arange of computing systems—looselycoupled, closely coupled, tightly cou-

pled, array processors, dataflow, neuralnets, etc. [Booth 1981]—as to becomealmost without meaning. For this re-view, following Lamport [1978], a sys-tem is classified as distributed if theend-to-end message transmission delayis significantly greater than the timebetween consecutive events of a process.

Storage reclamation became a neces-sity when LISP pairs were introduced inthe early 1960s [McCarthy 1981]. Thelifetimes of such structures generallyexceed the lifetime of modules that ac-cess them. Indeed, for Smalltalk thedata structures are persistent. Moss[1990] defines a persistent store as onethat outlives the execution of any pro-cess. The definition includes file sys-tems and databases. Atkinson et al.

Permission to make digital / hard copy of part or all of this work for personal or classroom use is grantedwithout fee provided that the copies are not made or distributed for profit or commercial advantage, thecopyright notice, the title of the publication, and its date appear, and notice is given that copying is bypermission of the ACM, Inc. To copy otherwise, to republish, to post on servers, or to redistribute tolists, requires prior specific permission and / or a fee.© 1998 ACM 0360-0300/98/0300–0330 $5.00

ACM Computing Surveys, Vol. 30, No. 3, September 1998

Page 2: Garbage Collecting the Internet: A Survey of Distributed

[1983] insist that automatic garbagecollection is a vital component of persis-tence.

Many factors contribute to the in-creasing use of distributed systems, butthe most compelling is economics. Dis-tributed file servers are commonplaceand compute servers are now appear-ing. The problems of computer network-ing, heterogeneity, latency, and scale,are usually addressed by a hierarchy ofcommunication protocols. The term pro-tocol refers to a set of precisely definedconventions for communication betweencorresponding layers of the hierarchy ondifferent sites. The definition of the lay-ers and their protocols has been an areaof intensive research and standardiza-tion for two decades. One particular sev-en-layer model has been adopted as areference model for network software bythe International Standards Organiza-tion, ISO. The model, the ReferenceModel for Open Systems Interconnec-tion, is more commonly known as OSI.Unfortunately, the services offered bydifferent OSI layers are duplicated andconfused. The core concepts of reliabil-ity, flow control, and security can beaddressed at all layers [Peterson andDavie 1996]. By contrast, these conceptsare addressed in a single specific layerof the Internet protocols. This and thefact that code was bundled with BSD

Unix and made essentially free to uni-versities has made the Internet the defacto standard.

Prior to Lisp, Fortran was deliber-ately designed so that the size of thestorage required for the program wasknown at compile time. The distributedcounterpart of Fortran is Occam. Forsuch languages, memory managementis handled entirely by the compiler andno runtime support is necessary. Theselanguages impose considerable restric-tions on modularity and ease of expres-sion. For example, recursive procedurecalls and dynamic data structures areignored. Programming languages suchas Lisp, Prolog, and Smalltalk transpar-ently offer the programmer dynamicdata structures. Giving up the enor-mous productivity advantages of suchlanguages is a high price to pay fordistribution.

A new language that offers transpar-ent dynamic data structures, Java, isenjoying unprecedented popularity.What is different about Java is that it isespecially suited for programming In-ternet applications. The developers ofJava, Sun Microsystems, conceived thelanguage for programming consumerelectronics, such as toasters and micro-waves. This application favored an in-terpreted implementation like Lisp,Prolog, and Smalltalk. While Java wasunder development, the World WideWeb took the Internet by storm. Thedesign decisions made for Java made itideal for Internet applications. As aproof of concept, a web browser, Hot-Java included support for embeddedJava applets in HTML. Like other inter-preted languages such as Lisp, Prolog,and Smalltalk, Java provides automaticgarbage collection. In Sun’s early re-leases of Java, garbage collection wasslow. Later releases are beginning toprovide distributed garbage collection[Sun 1996].

This paper provides a review of dis-tributed garbage-collection schemesthat can be applied to autonomous sys-tems connected by a network. Acceptingthe Internet as the de facto standard

CONTENTS1 INTRODUCTION2 TAXONOMY OF SINGLE-ADDRESS-SPACE GAR-

BAGE COLLECTORS2.1 The Single-Address-Space Garbage Collection

Problem2.2 Direct Identification of Garbage (Reference

Counting)2.3 Indirect Identification of Garbage (Tracing)2.4 Hybrid Collectors

3 DISTRIBUTED GARBAGE COLLECTORS3.1 Direct Identification of Distributed Garbage3.2 Indirect Identification of Distributed Garbage3.3 Distributed Hybrid Collectors

4 CONCLUSIONS4.1 Overview4.2 Collector Comparison

5 BIBLIOGRAPHY AND REFERENCES

Garbage Collecting the Internet • 331

ACM Computing Surveys, Vol. 30, No. 3, September 1998

Page 3: Garbage Collecting the Internet: A Survey of Distributed

protocol, the title of this paper para-phrases the title of Lang et al. [1992].Empirical evidence [Abdullahi 1995]suggests this collector is the state of theart. Knuth [1973] reviewed (nondistrib-uted) collectors that appeared before1968, and Cohen [1981] brought thesurvey of papers up to 1981. The mostrecent review of (nondistributed) gar-bage collection is Wilson [1992] pre-sented at the International Workshop onMemory Management. A preliminaryversion of the present review [Abdullahiet al. 1992] appeared in this same work-shop. A second review of distributedgarbage collectors [Plainfosse and Sha-piro 1995] was presented at a subse-quent International Workshop of Mem-ory Management. Jones and Lins [1996]published the first textbook on garbagecollection, but it is mainly concernedwith nondistributed garbage collection;Jones [1996] maintains a webliographyon garbage collection.

Research on distributed garbage col-lection can be better understood as tri-al-and-error adaptation of ideas devel-oped for single-processor, single-addressspace collectors. For this reason, Section2 surveys and classifies nondistributedgarbage collectors. “Old hands” arewarned that some attempt is made torationalize the ontology of the subject.Section headings reflect the rationalizedrather than historical nomenclature.Using this classification, Section 3 grad-ually uncovers the issues of distribu-tion. Section 4 summarizes the prob-lems and proposed solutions.

2. TAXONOMY OF SINGLE-ADDRESS-SPACE GARBAGE COLLECTORS

2.1 The Single-Address-Space Garbage-Collection Problem

Garbage collection, GC, is an inevitableconsequence of programming languagesthat employ dynamic data structures.With dynamic data structures, the stateof a computation at any instant can beconsidered as a many-rooted, directedgraph called the computation graph

(Figure 1). The roots are distinguishedvertices that provide entry points to thegraph. The internal vertices of the com-putation graph are realized as cells,contiguous segments of memory. A cellis effectively a base address from whichoffsets may be legitimately accessed.Due to concern for garbage collection inobject-oriented languages, such asSmalltalk, cells (as everything in object-oriented languages) are called objects. Ifthe cells are not of fixed size, they com-monly have a terminator or a headerfield containing some indicator of thesize of the cell. The indicator may be thenumber of bytes in the cell or a pointerto the last byte of the cell. Runtime-typed languages such as Prolog andSmalltalk often have a header field de-scribing the data type of the cell. Edgesof the graph are realized by store ad-dress fields within cells.

Cells referenced directly or indirectlyfrom a root are said to be reachable,accessible, or live. As a computationprogresses, addition and deletion ofroots, vertices, and edges modify thegraph. As a result, some portions of thegraph become disconnected. Such cellsare said to be unreachable, inaccessible,or dead. These disconnected subgraphsmake no contribution to the result ofthe computation and are known as gar-bage. In Figure 1, a garbage cell is de-noted by a filled circle and an accessiblecell by an unfilled circle. Without reuse,the finite store available for allocatingnew vertices diminishes to zero. Gar-bage collection is the process by whichthe store occupied by garbage can bereused.

Such graph structures also occur incaches, file systems, and databases. Thestorage controlled by a file system ap-pears as a directed graph of blocks.Some blocks are indices that containreferences to other blocks. A file systemmaintains a file as long as its blocks canbe traced from the root block of the disk.The idea of collecting processes wasfirst addressed in the context of theActor language [Agha 1986; Kafura etal. 1990]. Each process, or actor, is ref-

332 • S.E. Abdullahi and G.A. Ringwood

ACM Computing Surveys, Vol. 30, No. 3, September 1998

Page 4: Garbage Collecting the Internet: A Survey of Distributed

erenced by its mailbox. Root actors arethose that interface directly with de-vices. One actor can communicate withanother if its mailbox is known. An ac-tor is garbage if it cannot be communi-cated with, indirectly, from a root actor.

Most imperative languages (e.g., Pas-cal, C, C11, etc.) place the responsibil-ity for cell allocation and reclamation onthe programmer. With such languages,the programmer must explicitly reclaimgarbage cells by using dispose, delete, orfree system calls. Explicit store manage-ment leads to two very common bugs:incompleteness (also called memoryleaks), a failure to reclaim all extantgarbage, and unsoundness (also calledthe dangling reference problem), thepremature reclaiming of accessible cells.Memory leaks can gradually accumu-late until the computation fails becauseno space is left to allocate a new cellneeded to complete the computation orstore a file. Even if the computationdoes not run out of space, a computationmay make little progress because ofthrashing. Following Denning [1968], acomputation with page faults every few

instructions is said to thrash. Memoryleaks can cause extreme nonlocality ofreference as live cells are dispersed overa large virtual address space.

Reclaiming cells prematurely by acareless use of delete or free can causethe other even more insidious bug, un-soundness. When memory is reclaimedtoo soon, the space occupied by a cellmay be reused while the cell is stillreachable from a root. The same storelocation may, therefore, be simulta-neously interpreted in different ways.Updates to one interpretation will causeunpredictable effects on the other. Un-soundness can be difficult to detect anddebug because computations tend to faillong after the event that caused theproblem.

The ontology, soundness, and com-pleteness derive from theorem proving.What is different here is that the tran-sitive closure of the references is dy-namic. Because the two problems aredifficult for programmers to address, awide variety of languages provide auto-matic allocation and reclamation aspart of their runtime system. In such

Figure 1. A representative, though small, state of a computation.

Garbage Collecting the Internet • 333

ACM Computing Surveys, Vol. 30, No. 3, September 1998

Page 5: Garbage Collecting the Internet: A Survey of Distributed

systems, the allocation routines (e.g.,CONS in Lisp) perform special actionsto reclaim space as necessary, oftenwhen a memory request cannot be satis-fied from the available free store. Callsto the deallocator (free or dispose) be-come unnecessary, as they are implicitin calls to the allocator. Dijkstra et al.[1978] introduce two useful abstractionsto the study of garbage collection. Themutator, M, abstracts the process thatperforms the computation, including al-location of a new cell. The process thatautomatically reclaims garbage is calledthe collector, C. Three kinds of mutatoroperations that affect the garbage col-lector can be distinguished:

• creation of an edge to a new vertex• creation of a new edge between exist-

ing vertices, and• destruction of an edge

Historically, the major drawback ofautomatic garbage collection was that itsignificantly detracted from the perfor-mance of the mutator, both by introduc-ing unpredictably long pauses in compu-tation and by using large proportions ofavailable processing cycles. Measure-ments of early Smalltalk-80 implemen-tations [Krasner 1983] indicate 20% to70% of runtime spent garbage collect-ing. Steele [1975] and Wadler [1976]reported collection overheads of be-tween 10% to 40% for Lisp, with pausetimes between mutation of 4.5 secondsevery 79 seconds [Foderaro 1981]. Inthe ’80s, state-of-the-art collectors forSmalltalk-80 achieved less than 5% col-lector overhead, with typically less than100-millisecond pause times [Ungar1992]. Assuming two orders of magni-tude increase in processor speed overthe decade, this represents an order ofmagnitude reduction in pause time.

Very few papers have considered filemanagement from the point of view ofgarbage collection [Rosenblum andOusterhout 1992]. There are, however,many tools that use the garbage-collec-tion techniques for optimizing and re-pairing hard disks, Unix’s fsck for ex-

ample. Many object-oriented databases,object servers and persistent storessuch as O2 [Delobel et al. 1995] andObject-Store [Lamb et al. 1991] havegarbage collectors. While there havebeen numerous papers on garbage col-lection of data structures, they tend tobe language-specific, which is problem-atical because some languages allow op-timizations that are not generally appli-cable. Language semantics can restrictthe topology of the computation graph,which may be cyclic, acyclic, or a poly-tree tree. (A polytree is a singly con-nected graph.) In unoptimized func-tional languages, the graph ispredominantly treelike [Clarke 1977].This is not the case for the purer object-oriented languages such as Smalltalk,which make extensive use of cyclic datastructures. The topology of the computa-tion graph in turn (as will become clear)constrains the type of collector that canbe effective.

Cohen [1981] refined the collector pro-cess, C [Dijkstra et al. 1978] to twosubprocesses: identification, I, and rec-lamation, R. This can be extended into ataxonomy of collectors by distinguishingtwo classes of identification, direct andindirect (Figure 2). Direct identificationof garbage (also called reference count-ing) identifies cells that have no refer-ences to them. Indirect identificationidentifies live cells—what remains ofthe total store must be unallocated storeand garbage. While direct identificationis local in nature, indirect identificationis global—it requires tracing live cellsfrom the roots. The latter is called thetracing family in Lang and Dupont[1987].

The form of reclamation depends onhow free-store is managed. It can bemanaged as a free-list (equally well as abitmap or buddy system) or a heap (lin-ear allocation) [Wilson et al. 1995]. Ifmanaged as a free-list, contiguous gar-bage can be coalesced to provide largercells. If managed as a heap, a singlereference, the top of heap, indicates thedivision between allocated and unallo-cated store. Reclamation can be per-

334 • S.E. Abdullahi and G.A. Ringwood

ACM Computing Surveys, Vol. 30, No. 3, September 1998

Page 6: Garbage Collecting the Internet: A Survey of Distributed

formed either by compacting or scaveng-ing.

Various collectors have been proposedthat seek to optimize different criteria.Some aim to minimize the ratio of timespent collecting to the time spent mu-tating; some aim to minimize the timetaken in any one invocation of the col-lector to provide predictable perfor-mance for reactive (interactive or real-time) systems; some aim to minimizethe space overhead (the additionalmemory required to identify and re-claim garbage; and some are concernedwith localization to prevent thrashingin virtual memory systems. The follow-ing sections further refine the taxon-omy, outlining the advantages and dis-advantages of different species.

2.2 Direct Identification of Garbage(Reference Counting)

Direct identification of garbage is ef-fected by a reference count: a record ofthe number of references to a cell [Col-lins 1960; Weizenbaum 1963]. Each cellcarries the space overhead of an extraheader field to hold the count.

2.2.1 Immediate Identification andReclamation

In the simplest form, garbage identifica-tion is coupled to mutation—after everymutation the count is adjusted. If as aresult of mutation a cell count falls to

zero, the cell is garbage and is re-claimed immediately [Collins 1960]. Thecollector reclaims cells recursively, dec-rementing the counts of referents andreclaiming as appropriate. This processis known, naturally enough, as recursivefreeing. It is illustrated using a slightlyelaborated informal notation introducedby Watson [1986]:

(M I) (M I)(M I). . .(R I) (R I) (R I). . .

(M I)(M I) (M I). . .(R I) (R I) . . . .

The parentheses indicate atomic ac-tions. The notation illustrates that re-cursive freeing can cause unboundedmutator delays.

A problem with immediate referencecounting is that one component of thetime spent in identification is propor-tional to the number of mutation opera-tions [Steele 1975; Ungar 1984]. Signif-icant time is also spent in recursivefreeing: 5% on Berkeley Smalltalk and1.9% on Dorado Smalltalk [Ungar1984]. Because recursive freeing is un-bounded, immediate reference countingcan cause indeterministically longpauses in mutation, and so is unsuit-able for reactive applications.

2.2.2 Deferred Reclamation

The problem of recursive freeing can bealleviated by deferring reclamation. Us-ing doubly linked free-list store man-agement [Weizenbaum 1963], a newly

Figure 2. Garbage collector taxonomy.

Garbage Collecting the Internet • 335

ACM Computing Surveys, Vol. 30, No. 3, September 1998

Page 7: Garbage Collecting the Internet: A Survey of Distributed

deallocated cell is placed on the end ofthe free-list, but its referents are notimmediately reclaimed. The referentsare reclaimed when the cell advances tothe head of the free-list. Only when thecell is reallocated are the counts ofits immediate referents decrementedand added to the free-list. In this re-gime, garbage collection is local, fine-grained and interleaved with muta-tion:

(M I) (M I) (R I) (M I) (M I)(R I). . .

Collectors that underestimate the ex-tent of garbage in a single invocation ofthe collector are said to be incomplete.Such temporarily (or permanently) un-identified or unreclaimed garbage isknown as floating garbage.

Deferred reclamation provides asmoother collection policy, one not sovulnerable to unbounded mutator de-lays. A scheme similar to Weizenbaum’sbut more suitable for arbitrary-size cellsis that of Glaser and Thomson [1985]. Ituses a to-be-decremented stack, TBD,instead of a doubly-linked list. In thisscheme, references to cells are pushedonto the TBD stack if they have a countof one that is due to be decremented.When cells are allocated from the stacktheir count is already one, so thescheme also manages to elide clearingand setting the count.

2.2.3 Deferred Identification

Deutsch and Bobrow [Deutsch 1976] ob-serve that frequently, over a series ofreference-counting operations, the netchange in a cell’s reference count issmall, if not nil. For example, whenduplicating a cell reference as a stackparameter to a procedure call, the cellacquires a reference that is lost once theprocedure call returns. If adjusting suchvolatile references can be deferred,many garbage-identification operationscan be elided.

Baden [1983] proposes such a schemefor Smalltalk-80, which was imple-mented by Miranda [1987]. Referencesto cells from roots, such as the stack,

are not included in a cell’s count. In-stead, root-only referenced cells are re-corded in a Zero Count Table (ZCT). If areference to a new cell is pushed on thecall stack (the typical way new cells jointhe computation graph), a reference isplaced in the ZCT. When a nonroot ref-erence-counting operation causes acell’s count to fall to zero, a reference isalso placed in the ZCT because it mightstill be referenced from a root. When theZCT fills up or when no free store isavailable for cell allocation, the collectorpreferentially reclaims cells referencedby the ZCT. Reference counts are firststabilized (made consistent) by scanningthe roots and increasing the count of allreferenced cells. The ZCT is emptied byscanning the table and any cell with azero count is freed. Finally, the rootsare scanned again and the counts ofcells referred to from roots are decre-mented. During this process any cellswhose counts return to zero are placedin the ZCT because they are now onlyreferenced by roots.

With this technique, stack pushes andpops are made without identification op-erations. Baden’s measurements of aSmalltalk-80 system suggest that thismethod eliminates 90% of the reference-count operations and reduces the totaltime spent on garbage collection by half[Baden 1983]. A potential disadvantageis that scanning the ZCT causes a pausein mutation. However, typical pausetimes are of a few milliseconds[Miranda 1987]; a further disadvantageis the extra storage required by theZCT.

2.2.4 Space Overhead and Overflow

Another drawback of reference countingis the space overhead of the count field.It has been observed [Krasner 1983]that the majority of cells have a smallcount. To reduce the space overhead,the size of the count field of a cell isoften chosen smaller than needed. Typi-cally, systems allocate one byte to holdthe count. To prevent overflow once acount becomes saturated, it is not al-

336 • S.E. Abdullahi and G.A. Ringwood

ACM Computing Surveys, Vol. 30, No. 3, September 1998

Page 8: Garbage Collecting the Internet: A Survey of Distributed

tered and no longer accurately reflectsthe number of references to the cell. Tominimize the test for saturation, asigned byte is used to hold the count; acount is saturated if the byte is nega-tive. This only allows a count to recordaccurately up to 127 references.

Clark’s measurements of Lisp pro-grams [Clark 1979] show that about97% of list cells have a reference countof 1. This suggests an extreme form ofsaturation using a single-bit count[Friedman and Wise 1977; Chikayamaand Kimura 1987]. A clear bit is used toindicate a single reference to a cell.When a second reference to the cell iscreated the bit is set. Once set, the bitcannot be cleared because, without trac-ing from the root, it cannot be deter-mined if the cell has more than onereference. To reclaim cells that acquiremore than one reference during theirlifetime, it is necessary to use a secondcollector that uses indirect identifica-tion. Because of the predominance ofsingle references, the indirect collectorwill be invoked considerably less oftenthan if it were used alone.

2.2.5 Memory Leaks

An important aspect of direct identifica-tion is its dependence on local informa-tion (the count). As a result of mutation,a subgraph may become detached fromthe computation graph, yet the refer-ence count of none of its cells is zero.This will happen if the mutator cangenerate cycles. Reference-countingschemes do exist that attempt to collectcycles of garbage, but they are complex[Friedman and Wise 1979], have signif-icant computational overheads and lackgenerality. Bobrow’s [1980] concern isfunctional languages while Brown-bridge [1985] specializes in combinatorgraph-reduction machines.

Brownbridge [1985] uses two types ofreference. Strong references form anacyclic graph of accessible cells, whileweak references complete cycles (Figure3). A weak reference is intended to ref-erence a cell with a strong reference. A

cell holds two reference counts: one forstrong references, SC, and the other,WC, for weak. When the deletion of astrong reference results in a zero SCand nonzero WC, there is a possiblecycle of garbage. To determine if the cellis garbage, Brownbridge’s scheme recur-sively traces the cells’ referents. If a cellis located with zero SC, the weak refer-ence is made strong. If a cell is locatedwith SC greater than one, the referenceis made weak and the search termi-nated. If the trace returns to the start-ing point without having located a cellwith SC greater than one, the cycle isgarbage and can be reclaimed.

Tracing can spread over arbitrarilylarge parts of the computation graph.The algorithm fails when there are in-tersecting cycles (e.g. Figure 4). Withtwo mutually referencing cycles, eachwill regard the other as an externalreference.

Hughes [1984] gives a scheme basedon identifying strongly connected com-ponents, SCCs, of a graph. SCCs arethose subgraphs for which there is acycle at each vertex. Such SCCs havetheir own reference count. SCCs aremerged to produce larger SCCs so thatno cycles of SCCs are formed. Duringmutation, SCCs can be created, de-stroyed, split, or amalgamated. The ma-jor complication is splitting. A split re-quires tracing the graph looking for

Figure 3. Weak and strong references.

Garbage Collecting the Internet • 337

ACM Computing Surveys, Vol. 30, No. 3, September 1998

Page 9: Garbage Collecting the Internet: A Survey of Distributed

newly formed SCCs—the tracing is un-bounded.

2.3 Indirect Identification of Garbage(Tracing)

The problem of cycles of garbage is usu-ally overcome by a collector that identi-fies garbage indirectly. Recursively tra-versing the computation graph from theroots identify all cells that are alive. Bydefault, the unvisited part of the storeis unallocated or garbage. By suchglobal means, cyclically connected sub-graphs that become disconnected are in-directly identified and can be collected.

2.3.1 Mark and Scan

In their simplest form (stop-the-world),mark-scan collectors delay collectionuntil the unallocated store is exhausted[McCarthy 1960]. Mutation is then tem-porarily suspended. Identification(marking) and reclamation (scanning)are treated as sequential phases. Theidentification phase traces the computa-tion graph from the roots, marking allaccessible cells. A single mark-bit is suf-ficient to indicate whether a cell is ref-erenced by cells reachable from a root.The marking phase concludes when allaccessible cells have been marked. Thesecond phase, a scan of the entire store,reclaims the unmarked cells and clearsthe marked ones. Consequently, mark-

scan has a much coarser grain thanreference counting:

M M M. . .(I I I. . .) (R R R. . .) M M M. . . .

The parentheses here indicate thatidentification and reclamation run tocompletion.

The mark-bit is a single-bit referencecount, but is different from the single-bit count of Section 2.2.4. The formerindicates zero and one or more refer-ences; the latter indicates one and morethan one reference. Immediate single-bit direct identification is also distin-guished from mark-scan by the periodsof time for which the mark bit is consis-tent. For mark-scan, the information isonly accurate at the end of the markphase. For immediate direct identifica-tion, it is made consistent after eachmutation. Deferred direct identificationreference counting is distinguished frommark-scan because it is incomplete.

If cells have differing sizes, allocationwill fragment the free store. When anallocation request is made, the free-listmay contain no free cells of the requiredsize, but may contain cells larger thanrequired. Typically, the allocator satis-fies a request by splitting a larger cellinto an allocated cell and a remainingfree fragment. Over time, the free-listbecomes composed of small fragments.Eventually a scenario can occur whereno free cell is large enough to meet theallocation, yet the total free space issufficient. The allocation may be met bycoalescing contiguous fragments.

Compaction can be provided by heapstore management [Cohen 1967]. Forfixed size cells, compaction can be per-formed by scanning the heap twice(known as a sweep). In the first pass,two references are used, one pointing tothe bottom of the heap, the other to thetop. The reference to the top of the heapis used to scan down until it referencesa marked cell. The reference to the bot-tom of the heap scans up until it comesto an unmarked cell. At this stage, thecontents of the cell indicated by the topreference is copied to the unmarked cell

Figure 4. Mutually referencing cycles.

338 • S.E. Abdullahi and G.A. Ringwood

ACM Computing Surveys, Vol. 30, No. 3, September 1998

Page 10: Garbage Collecting the Internet: A Survey of Distributed

(assuming the cells are the same size),the mark-bit is cleared and a forward-ing reference to the new cell placed in itsprevious position. When the two refer-ences meet, all marked cells have beenunmarked and compacted in the lowerpart of the heap. A second scan isneeded to readjust references to movedcells. Indirect references from cells inthe compacted area, by way of thecleared area, are made direct.

In some schemes compaction is con-trolled by the mutator. The allocator inBrouHaHa Smalltalk [Miranda 1987]checks whether the total size of freecells is insufficient, and if so, invokes acompactor. If compaction proves futile,the collector is invoked. Martin [1982]combines the marking phase with a re-arrangement of the references so thatcells can be moved more readily. Carls-son et al. [1990] present a variationsuitable for cells of varying sizes. Dur-ing the mark phase, the reference fieldsof the accessible cells (not the data) arecopied to a table. After sorting the ad-dresses, the reachable cells are com-pacted by “sliding” the cells to one endof the store.

Mark-scan has large pause times. Thescan time is proportional to the size ofthe store. In virtual memory systems,the collector may access numerouspages on secondary store, an inherentlyslow process. As such, mark-scan is un-suitable for reactive applications. Evenif the garbage collector goes into actioninfrequently, when it does no reaction ispossible.

2.3.2 Concurrent Mark-Scan

A major advantage of deferred directidentification is that identification andreclamation have a fine grain size. Thismakes it suitable for interactive andreal-time applications [Goldberg 1983].Dijkstra et al. [1978] describe a varia-tion of mark-scan in which the mutatorand the collector operate concurrently,called on-the-fly garbage collection. Theconcepts of mutator and collector werecoined in this context.

In the simple mark-scan scheme ofSection 2.3.1, concurrency is not possi-ble because of possible interference ofidentification with mutation. If a refer-ence to a new cell is added after theidentifier has passed over its referents,the new cell is not recognized as part ofthe computation graph and so collected.Dijkstra et al. achieve a decoupling ofthe mutator from the collector by intro-ducing a third state for a cell. The threestates referred to, perhaps inappropri-ately, as colors are white (unreachable);black (reachable); and gray (possiblyreachable). They can be realized by twomark bits.

Two or more processes, one or moreresponsible for mutation and exactlyone for collection, run concurrently:

M M(M I) M M. . .(I I I. . .) (R R R. . .)

(I I I. . .). . . .

The mutator aids the marker by settinga cell gray at the point of allocation. Inthe marking phase, the roots of thegraph are initially marked gray. Theidentification process scans the heapgraying all descendents of a gray celland then blackening the cell. As previ-ously, white cells are unreachable fromthe roots. In the scan phase, white cellsare reclaimed and black cells are whit-ened.

The collector is incomplete because itmay take two cycles to reclaim a deadcell. Dead gray cells are blackened inone invocation of the marker and thenwhitened in the next. With direct iden-tification, an incomplete collector un-derestimates the amount garbage cells.With indirect identification an incom-plete collector overestimates the livecells. Dijkstra et al.’s scheme allowsconcurrency of mutation and collection,but the phases of identification and rec-lamation are strictly serialized. Thishas the effect that a mutator may stillhave to wait until a collection finishes ifthere is no free store to make an alloca-tion. Starvation of the mutator isavoided by Queinnec et al. [1985].

Despite the decoupling the extra color

Garbage Collecting the Internet • 339

ACM Computing Surveys, Vol. 30, No. 3, September 1998

Page 11: Garbage Collecting the Internet: A Survey of Distributed

gives, concurrency of the mutator andcollector has to be carefully controlled toprevent unsoundness. Several pur-ported implementations have containedsubtle synchronization problems [An-drews 1991]. A sound solution requiresthe mutator and collector actions oftesting and changing colors to beatomic. Without atomic actions, concur-rency leads to lost updates, sometimescalled the test-and-set problem.

Wadler [1976] has shown that a con-current mark-scan collector uses agreater proportion of the computationtime than the sequential scheme. Thismight be expected because of the over-head of atomic operations and becausethe collector runs even when there is nogarbage to collect.

2.3.3 Scavenging Collectors

The generality and modularity of com-pacting mark-scan account for the at-tention it has received in the past threedecades. The language implementationsof the 1960s for which mark-scan collec-tion was originally intended had smallphysical memories (by current stan-dards). For small address spaces, theexecution cost of scanning the entirestore is negligible. With large modernsystems, compacting mark-scan is inef-ficient because of its global nature. Themarking phase inspects all accessiblecells while the sweep phase traversesthe whole store twice. Ungar [1984] re-ported that Fateman found mark-scanto take 25% to 40% of the mutator timeof Franz-Lisp programs. Wadler [1976]reported that typical Lisp programsspend from 10% to 30% of their timecollecting.

The cost of the scan phase of mark-scan is proportional to the total size ofstore. This phase can be eliminated if,rather than scanning, live cells are relo-cated as they are identified. The store ismanaged as two heaps, historicallycalled semi-spaces [Fenichel and Yochel-son 1969]. The mutator begins allocat-ing in from-space. When the heap isexhausted, the collector scavenges. A

scavenge is a simultaneous traversaland copy of the computation graphfrom from-space to the second heap,to-space:

M M M. . .(I R I R I R. . .)(R R R. . .) M M M . . . .

Multiple mutations are followed bycombined identification and reclama-tion. In Fenichel and Yochelson [1969],when each cell is moved to to-space, aforwarding reference is left behind.(This can be compared with the for-warding reference of mark-scan collec-tors, Section 2.3.1). After a scavenge, ascan of to-space is needed to redirectreferences to from-space. From-spacethen becomes free and can be reused.The two semi-spaces are flipped and themutator continues allocating in the newfrom-space. This combination of treetraversal and copying also has the ad-vantage of improving locality, which isbeneficial in virtual address spaces.

2.3.4 Incremental Scavenging

The Fenichel–Yochelson scheme ap-peared in the late 1960s, but only in thelate 1970s had technology changed suf-ficiently that new algorithms for gar-bage collection were required. Proces-sors became faster, memories becamelarger, and programs became signifi-cantly larger. There is a Parkinson’slaw in operation: programs expand tofill the memory available. As programdata increased from tens of kilobytes tomegabytes, the time required to collectgarbage increased dramatically. By thelate 1970s, pauses resulting from gar-bage collection could last tens of secondsor more. At this time, Baker [1978] pro-posed a modification of Cheney’s [1970]compacting algorithm that avoided sub-stantial collector interruptions.

In Baker’s incremental scavenger, themutator is given some responsibility forreclamation. After the from-space be-comes full, the mutator allocates newcells in the to-space. Each time the mu-tator allocates a cell in to-space, a num-ber of live cells are traced and copiedfrom from-space to to-space. This means

340 • S.E. Abdullahi and G.A. Ringwood

ACM Computing Surveys, Vol. 30, No. 3, September 1998

Page 12: Garbage Collecting the Internet: A Survey of Distributed

that the two semi-spaces are simulta-neously active. A consequence of this isthat mutation and collection are inter-leaved:

(M I R) (M I R I R). . . .

By distributing mutation through col-lection, the conservative scavenging col-lector gives bounded collection when cellsize is bounded. Baker examined theeffect of varying the number of cellstraced at each invocation on the mem-ory requirements. He concluded thatthe maximum memory requirement ofconservative scavenging is similar tothe use of two mutators running concur-rently. Scavenging schemes trade spacefor time because they require twoheaps. Consequently, they have muchhigher space overhead than eithermark-scan or reference-counting algo-rithms. A major reason for their successis that virtual memory appears cheap,so flagrant use of address space be-comes acceptable. It is, of course, paidfor by I/O costs.

Baker [1992] recently described a col-lector that is isomorphic to his originalconservative copying algorithm [Baker1978], but does not require relocation.Baker recognized that the “spaces” of ascavenging collector are just manifesta-tions of sets of cells. Any other reifica-tion of sets would do just as well. Allthat is necessary for any cell is to iden-tify which set (from-space or to-space) itbelongs to. It need not be copied if itsallegiance can be transferred from oneset to another. Baker requires two refer-ence fields and a color field for each cell.The reference fields link each cell intodoubly-linked lists that implement sets.The color field indicates which set a cellbelongs to. The colors of Baker can becompared with the colors of Dijkstra etal.’s [1978] concurrent mark-scan collec-tor. The colors gray and black serve todistinguish alternate collections.

In Baker [1992], all free store is ini-tially in from-set. An allocation refer-ence serves to divide the list into thepart that has been allocated and the

remaining “free” part. Allocation is asefficient as heap store management be-cause it only requires advancing thepointer by the size of the new cell. Whenthe free space is exhausted, the collectortraverses the reachable cells and“moves” them from the allocated from-set to to-set by unlinking the cell fromfrom-set, toggling its color field, andlinking it into to-set. When all thereachable cells have been traversed andreassigned from from-set to to-set, from-set is known to contain only garbage,and is therefore a list of free store.

Free-list store management is bestsuited to languages that use equal-sizecells. If cells of different sizes are man-aged, the free-list must be searched tofind a cell of appropriate size. This canlead to fragmentation, poor locality ofreference, and thrashing. These are justthe problems that copying solves.

2.3.5 Generation Scavenging

Lieberman and Hewitt [1983] observedthat cells tend to die young and thatlong-lived cells are typically very long-lived. Having to copy long-lived cells forevery invocation of the collector seemsextravagant. Baker [1992] and Dijkstraet al.’s [1978] collectors are incompleteand effectively distinguish new cellsfrom old cells with colors. Liebermanand Hewitt’s collector segregates cellsinto generations, each with its own pairof semi-spaces. Each generation may bescavenged without disturbing olderones. Younger generations are scav-enged more frequently. The youngestgeneration will be filled most rapidly,but on flipping very few cells survive.This drastically reduces the amount ofcopying. Generations can be created dy-namically when the youngest genera-tion fills up with cells that survive sev-eral flips.

Ungar [1984] presents a simpler,more efficient generation scavenger.This collector classifies cells as eithernew or old. Old cells live in a region ofstore called Old-Space, OS. Old cellsthat reference new ones are members of

Garbage Collecting the Internet • 341

ACM Computing Surveys, Vol. 30, No. 3, September 1998

Page 13: Garbage Collecting the Internet: A Survey of Distributed

the Remembered-Set, RS cells are addedto RS as a side effect of the mutator.Cells that no longer refer to new cellsare removed from RS when scavenging.All new cells must be reachable fromRS, and so RS behaves as roots for thenew cells. Any traversal of new cellsonly needs to start from RS.

Three heaps are used for the newcells: New-Space, NS, a large nurseryheap where new cells are spawned;Past-Survivor space, PS, which holdsnew cells that have survived previousscavenges; and Future-Survivor space,FS, which remains empty while the mu-tator is in operation. A scavenge copieslive cells from NS and PS to FS spaceand then flips PS and FS. Cells thathave survived more than a prescribednumber of flips are copied to OS, aprocess called tenuring. With Ungar’scollector, the mutator is stopped duringscavenging. This elides forwarding ref-erences and achieves some performancegains. While explicitly not concurrent,pause times are short because genera-tions are small. By carefully tailoringthe size of NS, FS, and PS, an imple-mentation of Ungar’s scheme for Small-talk manages to keep scavenge times toa median of 150 milliseconds occurringevery 16 seconds [Ungar 1984] on a Sunworkstation.

Other generation-based collectors in-clude: opportunistic collectors [Wilsonand Moher 1989]; ephemeral collectorsused in Symbolics machines [Moon1984]; and the Tektronix Smalltalk col-lector [McCullough 1983]. All threecommercial Smalltalk systems, Digital,Tektronix, and ParcPlace, adopted gen-eration scavengers [Ungar and Jackson1988]. The New Jersey SML compiler[Wilson 1992a] also includes a genera-tion collector. Demers et al. [1990] haveinvestigated a generation scheme com-bined with a mark-scan garbage collec-tor for use with Scheme, Mesa, and Cintermixed in one virtual memory. Be-fore Demers et al. [1990], many believedthat only scavenging collectors could bemade generational.

Wilson et al. [1990] show that genera-

tion scavengers typically have poor lo-cality of reference, but careful attentionto memory hierarchy issues greatly im-proves performance. They attributedthe small success recorded by severalresearchers in their attempts to im-prove locality to two flaws in traversalalgorithms. They failed to group datastructures in a manner reflecting theirhierarchical organization. What is moreimportant, they ignored the disastrousgrouping effects caused by reachingcells by linear traversal of hash tables(i.e., in pseudo-random order).

A generation scavenger that adapts tothe allocation patterns of applicationswas presented by Hudson and Diwan[1990]. This collector has a variablenumber of fixed-size (power of 2) gener-ations. The generations are placed instore at contiguous addresses. The gen-eration is apparent from the most sig-nificant bits of the address. Each gener-ation has its own to-space, from-space,and RS (remembered-set). RS is fed in-directly through a buffer containing ad-dresses of possible intergeneration ref-erences. The feeder may filter outduplicates, intrageneration referencesand nonreferences. When scavengingmore cells than a generation can accom-modate, a new generation is inserted.To retain the ordering, the younger gen-erations are shuffled backwards duringscavenging. Conservative collectors thatcopy cells when the mutator addressesthem have also been looked at by White[1980] and Kolodner [Kolodner et al.1989; 1991]. These reorder cells in theorder they are likely to be accessed inthe future, giving improved locality.However, the technique requires specialhardware. Other reordering optimiza-tions that don’t require special hard-ware work by reordering pages withinlarger units of disk transfer [Wilson1990].

Although generation collectors are themost complex single-processor collectionschemes, they suffer poor performanceif many cells live just long enough to bepromoted before dying, the so-calledpremature tenuring problem. Ungar and

342 • S.E. Abdullahi and G.A. Ringwood

ACM Computing Surveys, Vol. 30, No. 3, September 1998

Page 14: Garbage Collecting the Internet: A Survey of Distributed

Jackson propose an adaptive tenuringscheme based on extensive measure-ments of real Smalltalk runs [Ungar1988; 1992]. This scheme varies the te-nuring threshold depending on dynami-cally measured cell lifetimes. It alsoproposes a refinement that has beenincluded in the ParcPlace [1991] collec-tor. With languages like Smalltalk, in-teractive response is at a premium andmany large cells, mainly bit-maps andstrings, don’t contain references toother cells. To avoid copying these cells,they are segregated in a large-cell spaceand tenured to OS (old space) whenopportune.

Multigenerational collectors have tocope with the waterfall problem [McCul-lough 1983]: collecting a particular gen-eration requires collection of all youngergenerations. The result is that pausetimes will be longer for older genera-tions. While generation collectors collectintrageneration cycles, they cannot col-lect intergeneration cycles of referencesthat cross more than one generation.Some schemes do not attempt to scav-enge old generations. In persistentstores, reclamation of such garbage isoften left to off-line reorganization [Un-gar 1984], where a full garbage collec-tion is done after the system has beenstopped. The ParcPlace [1991] Small-talk-80 generation garbage collector isbacked up by a mark-scan compactorthat collects OS.

2.4 Hybrid Collectors

To tackle the memory leaks of cyclicstructures, Martinez et al. [1990] com-bine simple reference counting with alocal mark-scan. Besides the referencecount, an extra field holds the color ofthe cell: green, red, or blue. The generalidea is to perform a local mark-scanwhenever a reference to a shared sub-graph is deleted. That is, local mark-scan is initiated each time a reference isdeleted to a cell with counter greaterthan one. Marking starts from the de-leted reference, decrements the counter,and sets the color red (possible gar-

bage). The subgraph is then rescanned;any subgraphs with external references(nonzero count) are remarked green (ac-cessible) and their counts restored. Allother cells are marked blue (garbage).At the end of the cycle, all blue cells arepart of a dead cycle and may safely bereclaimed.

The algorithm has one major problem:the need to perform a local mark-scanevery time a reference to a shared cell isdeleted. This increases the complexityof the local mark-scan to O(n), where nis the size of the shared subgraph. Inunoptimized functional languages, moststructures have a reference count of one[Clarke 1977], and the cost of the algo-rithm is exactly the same as the stan-dard reference count. This is not thecase for purer object-oriented languageslike Smalltalk, which make extensiveuse of sharing and cyclic data struc-tures, making the overhead of thisscheme high.

Lins [1990] addresses the problem byintroducing an extra state informationin the form of a fourth color, black, anda control queue. This data allows themark-scan to be done lazily. As in Wei-zenbaum [1963] and Glaser and Thom-son [1985], subgraphs are not scannedimmediately, but are queued in a spe-cial list, the control queue, and the rootcells set black. When the allocator isunable to supply memory, the controlqueue is scanned to reclaim possiblegarbage cycles. Lins and Vasques [1991]found that, with appropriate manage-ment of the control queue, no unneces-sary calls to mark-scan are made.

Lins [1992] applies the concept of thecell age from generation scavenging tothe problem of cyclic reference counting.A second counter records the age ofcells. A global time counter is initializedto zero and is incremented every time acell is allocated from the free-list. Linsprofits from the age information in twoways. First, as most cells die young,mark-scan is initiated from the young-est cell in the control queue. Second, theage information gives a check on theabsence of cycles. A sufficient but not

Garbage Collecting the Internet • 343

ACM Computing Surveys, Vol. 30, No. 3, September 1998

Page 15: Garbage Collecting the Internet: A Survey of Distributed

necessary condition for the absence ofcycles is that younger cells do not refer-ence older cells. During cycle detection(red marking phase), a check for thecondition that the parent cells are olderthan their offspring is made. If at theend of the mark phase the condition istrue for all traced cells, the graph isacyclic. As a result, cells can be putdirectly into the free-list or restored totheir original status without having tobe set blue.

3. DISTRIBUTED GARBAGE COLLECTORS

For the purposes of this paper, a distrib-uted system means a collection of au-tonomous sites that share a communica-tion facility for exchanging messages.Each site has its own store, at least onemutator, and at least one stack. Thecomputation graph and roots are dis-tributed over a number of sites (Figure5). A similar structure is exhibited bydistributed file systems [Garnett andNeedham 1980], distributed object-ori-ented databases [Delobel et al. 1995]and web pages.

A reference to a cell in the same siteis said to be local. A reference to a cell

on another site is said to be remote.Four classes of garbage subgraphs areexemplified in Figure 5:

• intrasite acyclic garbage (e.g., v, w, x);• intrasite cyclic garbage (e.g., i, j, k,

m);• intersite acyclic garbage (e.g., n, r, t);• intersite cyclic garbage (e.g., c, d, h, l,

o).

Processing power is necessarily local-ized in sites. Each site has direct accessonly to those cells that live in its localstore. Access to a remote cell is achievedby sending a message to the site onwhich it lives to spawn a task to per-form the required operation. Becausethere is no global address space, refer-ence to a remote cell is necessarily indi-rect. A cell references a remote importrecord and the import record referencesa local cell. To simplify remote refer-ences, a cell can reference a local exportrecord that in turn references the re-mote import record (Figure 6).

Indirection due to the absence of ahomogeneous address space is com-pounded because message transmissionbetween sites is unreliable: messages

Figure 5. An illustrative, but small, distributed computation graph.

344 • S.E. Abdullahi and G.A. Ringwood

ACM Computing Surveys, Vol. 30, No. 3, September 1998

Page 16: Garbage Collecting the Internet: A Survey of Distributed

may be duplicated, delivered out of or-der or lost, and sites may temporarilybe incommunicado. Establishing reli-able message transmission betweencomputers is a complex problem. Thiscomplexity is handled in communicationsystems by the principle of division ofconcerns. The communication system islayered, lower layers guaranteeing ser-vice properties to higher layers. Typicalproperties offered to the applicationlayer are that

• messages are not lost,• messages are not duplicated, and• messages are delivered in mutual-

causal order (FOFI1) between pairs ofsites.

The Internet TCP/IP protocols haveemerged as the de facto open systeminterconnection. The main tasks of theInternet Protocol, IP layer are the frag-mentation of messages into packets andthe routing of packets to destinationmachines. The size of a packet is deter-mined dynamically by a number of fac-tors that include network loading. IPmakes a “best effort” to forward packetsto the next destination, but forwardingis not guaranteed. If a router is overrunwith packets, it discards them. If arouter fails, other routers send packetsalong alternative paths. Thus, packetsmay be duplicated, arrive out of se-quence, and take a relatively long timeto arrive intact at their destination.

Above the IP layer, TCP eliminatesduplicates and reassembles the packets

in their correct order. In more detail,TCP, like Unix, is byte-oriented. A se-quence number gives a position in thebyte stream of data so far exchanged. Achecksum is applied to each packet. Anumber of packets received intact(checksum agrees) can be acknowledgedith a byte position. A packet is retrans-mitted if it has not been acknowledgedafter a certain time, the time-out. Thetime-out is determined by network load-ing. Each message is received once andmessages between any two sites are re-ceived in the order in which they weresent—mutual causal ordering.

To add to the problem of reliable mes-sage transmission, a remotely spawnedtask is not acted upon immediately.Once accepted, the task is added to thetask queue and must wait its turn. Thismeans that remote tasks may take aconsiderable time (relative to machineinstruction execution) to be acted upon.Latency is the elapsed time between theissue of a remote task-request messageand when it is executed. The latency istypically orders of magnitude greaterthan an instruction cycle, particularlyfor RISC processors. For efficiency,avoiding processor idling while waitingfor a response is vital. In most evalua-tions of distributed garbage collection,communication overhead is the princi-pal metric. Published measurements[Bennett 1987; Schelvis and Bledoeg1988] indicate remote cell access to beslower than local by three to four ordersof magnitude.

Early distributed garbage collectorswere, naturally enough, based on sin-gle-address-space collectors. Develop-1 First Out First In.

Figure 6. A remote reference.

Garbage Collecting the Internet • 345

ACM Computing Surveys, Vol. 30, No. 3, September 1998

Page 17: Garbage Collecting the Internet: A Survey of Distributed

ments in distributed garbage collectioncan well be understood as the trial-and-error adaptation of the ideas developedfor single-processor, single-address-space collectors to the distributed envi-ronment. Garbage collection processes,mutation, identification, and reclama-tion, are necessarily decomposed accord-ing to site boundaries. The high cost ofcommunication relative to local compu-tation make efficient distributed gar-bage collection difficult enough. Thisproblem, as will be illustrated, is com-pounded by the problem of indetermin-istic latency.

3.1 Direct Identification of DistributedGarbage

It was noted in Section 2.2 that, withdirect identification, the processes ofidentification and mutation are local-ized. This initially seems ideally suitedto distribution, as (M I) phases can runconcurrently on different sites. Onlysmall portions of the graph that havebeen affected by a mutation need beconsidered for reclamation. These canbe reclaimed concurrently on differentsites. A straightforward attempt to usereference counting in distributed envi-ronments exposes the problem of inde-terministic latency. A succession of im-

provements elide the problem bytransferring successively more state in-formation from the cell to the reference.At the same time, these solutions re-duce the communication overhead.

3.1.1 Distributed Reference Counting

One of the earliest distributed refer-ence-counting collectors was describedby Nori [1979]. To preserve the refer-ence count invariant, it is essential thatmessages are not duplicated. Even if thecommunication system does filter dupli-cate messages, counts can become un-sound if a decrement count task is actedon before a corresponding incrementtask, as illustrated in Figures 7 and 8.In these timing diagrams, the horizon-tal axes indicate spatial distributionand the vertical axes increasing time. Amessage between sites is represented byan arrow—the tail of the arrow belowthe arrowhead reflects the latency. Sup-pose site A duplicates a reference to acell b on site B by sending a cp(@b)message to site C. (With a C-like nota-tion, @n denotes the reference to anentity denoted by n.) If either A or C isresponsible for incrementing the count,premature reception of a decrementcount task could lead to a dangling ref-erence.

Figure 7. Site A increments the count.

346 • S.E. Abdullahi and G.A. Ringwood

ACM Computing Surveys, Vol. 30, No. 3, September 1998

Page 18: Garbage Collecting the Internet: A Survey of Distributed

To prevent these race conditions, Ler-men and Maurer [1986] impose a proto-col (Figure 9) on remote duplication anddecrement tasks. When a site A thatholds a reference to a cell b on site Bwants to duplicate the reference on siteC, it sends an acknowledge-request mes-sage, ack_req(@b, @C), to site B in addi-tion to the copy message, cp(@b), to siteC. The copy message provides C with areference to b. The ack_req(@b, @C)

message informs B about the creation ofthe new reference. When site B acts onthe ack_req(@b, @C) task, it incrementsb’s reference count and sends an ac-knowledgment ack(@b) message to siteC. On arrival, this informs site C that cellb “knows” about the additional referenceto it. Lermen and Maurer’s [1986] proto-col ensures that site C cannot send adelete message, del(@b), to site B before itaccepts the ack(@b) message from B.

Figure 9. LM protocol.

Figure 8. Site C increments the count.

Garbage Collecting the Internet • 347

ACM Computing Surveys, Vol. 30, No. 3, September 1998

Page 19: Garbage Collecting the Internet: A Survey of Distributed

It is essential for soundness of theprotocol that the messages be deliveredin mutual causal order (FOFI) (Figure10). The crossing of message arrowsreflects the nonmutual causal order-ing. Suppose site A sends a del(@b)message to site B soon after sendingack_req(@b, @C). If these messages donot arrive at B in the order they weresent from A, there can be prematurereclamation of cell b.

3.1.2 Weighted Reference Count

An extension of reference counting thatelides the problem of nonmutual causalorder is WRC, weighted reference count-ing. There is some controversy as to itsorigin. The scheme was published at thesame conference by Watson and Watson[1987] and Bevan [1987]. Watson andWatson attribute the algorithm to Weng[1979], but Thomas [1981] creditsArvind. The idea is to associate a weightwith each reference. The count is onlydecremented, and so there can be norace conditions. The protocol guaranteespreserving an invariant—the sum ofweights of all the references to a cell isequal to the count of the cell.

To illustrate how weighted referencecounting works, a cell is represented bya triple (Figure 11). (In general, a cell

will have any number of referencefields, but one is sufficient to illustratethe mechanisms). When a cell is allo-cated (Figure 12), its count is set to themaximum the field can hold and theweight of the reference set equal to it.

When a reference is duplicated (Fig-ure 13), the weight of the reference isdivided between itself and the copy—itis not necessary to access the cell. Onlyone message is required to duplicate aremote reference. The sum of theweights of references pointing to the cellremains unchanged.

Figure 11. A cell with a single reference in WRC.

Figure 12. Creation of a new cell in WRC.

Figure 10. Non-FOFI order.

348 • S.E. Abdullahi and G.A. Ringwood

ACM Computing Surveys, Vol. 30, No. 3, September 1998

Page 20: Garbage Collecting the Internet: A Survey of Distributed

When a reference is destroyed (Figure14), its weight must be decrementedfrom the count to preserve the invari-ant. If this involves remote cells, a de-lete reference message, del(@cell,weight), is sent to the remote site host-ing the cell. If a cell’s count falls to zero,it is garbage and can be reclaimed.

Besides eliding race conditions, WRCreduces the communication overhead byeliminating the need for an incrementmessage when duplicating a reference.This is achieved at the cost of space forstoring a weight for each reference. Ifthe weight is always a power of two, toallow for equal division, the log2 of theweight can be stored. This provides animportant reduction in the space re-quirement. However, when a referenceis deleted, the weight must be converted(by shifting) to effect subtraction, soincreasing the overhead of identifica-tion.

A problem occurs, underflow, when areference weight of 1 needs to be dupli-cated. A reference with a total weight Wcan have at most W references, each ofweight 1. This could be overcome byadding a fixed number to the weight

and the count of the reference. But thisproposal is essentially the same as in-crementing the count, and so suffersfrom the same race conditions as naivereference counting (Section 3.1).

A sound solution is the use of indirec-tion illustrated in Figure 15. When aweight falls to one, an indirection allowsfurther duplication. This has the disad-vantage of requiring two messages toaccess a cell if a reference and its indi-rection live on different sites: one to thesite hosting the indirection and one tothe site hosting the cell. In a worst-casescenario, a long chain of indirectionscan be created. Once an indirection iscreated, it remains for ever. Rudalics[1990] calls this the domino problem. Areference consisting of a long chain ofremote indirections may even loop backto a local cell a number of times.

3.1.3 Generation Reference Count

Generation reference counting, GRC[Goldberg 1989], provides another solu-tion to the problem of duplicating a unitweight reference in WRC. This isachieved by replacing the weight by a

Figure 13. Duplication of a cell in WRC.

Figure 14. Deletion of a reference in WRC.

Garbage Collecting the Internet • 349

ACM Computing Surveys, Vol. 30, No. 3, September 1998

Page 21: Garbage Collecting the Internet: A Survey of Distributed

generation and a copy count. Each newlycreated reference is a zero generationreference. A copy of an ith-generationreference is an (i 1 1)th-generation ref-erence. The reference count is replacedby a table, called a ledger, which countsthe references from each generation.

To illustrate, a cell is represented bya quadruplet (Figure 16). (As previ-ously, a cell may have any number ofreferences but one again is sufficient toillustrate the mechanisms.) The ith ele-ment of the ledger contains a count ofith-generation references.

When a new cell is created (Figure17), the generation and count fields ofthe reference are cleared and the ledgeris initialized. (When, as in Figure 17,the ledger contains no relevant informa-tion it is omitted.) When a reference isduplicated (Figure 18), a new first-gen-eration reference is allocated.

When a reference is deleted (Figure

19a), a delete message del(@cell, n, cop-ies) is sent to the host site. On receipt,the host decrements the copy count forthe nth generation and increments thecount for the (n 1 1)st generation bythe number of copies made. As a result,some elements of the ledger may holdnegative values. This can occur whendelete messages for (n 1 1)th-genera-tion references are acted upon beforedelete messages for the nth-generationreferences. For example, in Figure 19b,if the copied reference is deleted, rather

Figure 15. Indirection to duplicate a reference of weight 1.

Figure 16. A single reference cell in GRC.

Figure 17. Allocating a new cell in GRC.

350 • S.E. Abdullahi and G.A. Ringwood

ACM Computing Surveys, Vol. 30, No. 3, September 1998

Page 22: Garbage Collecting the Internet: A Survey of Distributed

than the original, a ledger value will benegative. A ledger correctly indicatesoutstanding references to a cell for any

order in which delete messages are re-ceived. A cell is only reclaimed if all theledger entries are zero. This is only the

Figure 18. Duplicating a reference in GRC.

Figure 19. Reference deletion in GRC: (a) deleting a reference; (b) deleting a duplicated reference.

Garbage Collecting the Internet • 351

ACM Computing Surveys, Vol. 30, No. 3, September 1998

Page 23: Garbage Collecting the Internet: A Survey of Distributed

case if a delete message for every refer-ence has been received.

While GRC may have lower communi-cation overhead than WRC, it hasgreater computational and space re-quirements. If no underflow indirectionis needed, its communication overheadis the same as WRC, namely, one ac-knowledged message for each copy of aremote reference. Just as WRC is sus-ceptible to underflow, GRC ledgers canoverflow. Goldberg [1989] suggests us-ing indirection to solve this problem.Unlike WRC, the indirection will alwaysbe on the same site as the reference,thus adding no extra communicationoverhead.

3.1.4 Indirect Reference Count

Indirect reference counting, IRC [Ichi-sugi and Yonezawa 1990; Rudalics1990; Piquer 1991], provides a solutionto the problem of underflow in GRC.IRC replaces the generation by a refer-ence, parent, to the source of the copy.Each reference is a triplet (Figure 20).

The parent field is used to maintainan inverted diffusion tree of duplicatedreferences (Figure 21). The depth of areference in the tree is the generation.The number of vertices in the diffusiontree equals the total number of refer-ences to the root. The indirect referencecount counts the number of children ofeach vertex in the diffusion tree andcorresponds to the copy count of GRC.While WRC and GRC can be seen todivide state information between thecell and the reference, for IRC all stateinformation is maintained by the refer-ence.

When a new cell is created (Figure 22)the initial reference becomes the root ofa diffusion tree. When a reference isduplicated, the copy count is incre-

mented and the new reference linkedinto the diffusion tree (Figure 23). Re-mote duplication requires just one mes-sage.

If a copy is deleted, the parent copycount is decremented, resulting in(again) Figure 22. For a remote refer-ence this requires one message. Whilereferences in the body of the diffusiontree can be excised, only cells that areleaves of the diffusion tree (zero copycount) can be reclaimed, Figure 24.Thus, like WRC, IRC can accumulatelarge amounts of floating garbage. How-ever, an excised reference can be re-stored before its copy count reacheszero. This can be compared with de-ferred reclamation (Sect. 2.2.2).

3.1.5 Indirect Reference Listing (IRL)

Piquer [1991] suggests that the spaceoverhead of IRC is acceptable if it isused only for remote references. Follow-ing Fowler [1986], Shapiro et al. [1990]replace the copy count of IRC by a list ofreferences where duplicates have beendiffused. A reference is interpreted as ashortcut to the root of the diffusion tree.The additional space overhead of indi-rect reference listing, IRL, is justifiedby simpler management of messageloss, duplication, and latency. Plain-fosse and Shapiro [1992] describe a pro-totype implementation for Lisp; Birrellet al. [1993] describe an implementationfor remote objects in Modula3. Site fail-ure is detected by regular pinging. Theimport records of sites that do notpromptly acknowledge a ping are un-soundly deleted.

3.1.6 Trial Deletion

Vestal [1987] proposes trial deletion toremove cycles of garbage with indirectidentification. The algorithm is seededwith some cell suspected of being part ofa dead cycle. The method consists ofhypothetical recursive deletion of theseed and its referents and checking ifthis brings all the counts in the sub-graph to zero. A drawback of trial dele-

Figure 20. A reference in IRC.

352 • S.E. Abdullahi and G.A. Ringwood

ACM Computing Surveys, Vol. 30, No. 3, September 1998

Page 24: Garbage Collecting the Internet: A Survey of Distributed

tion is that, like recursive freeing, it isunbounded. Furthermore, seeds are cho-sen heuristically, so a bad choice canlead to wasted effort. The scheme can beseen as a generalization of Brownbridge[1985] (Section 2.2.5), where the strongcounter is used as a heuristic. Trialdeletion has the same problem asBrownbridge’s scheme, mutually refer-encing cycles.

3.2 Indirect Identification of DistributedGarbage

Mohammed-Ali [1984] describes a num-ber of variations of distributed mark-scan collectors. The simplest, sequentialmark-scan (referred to as [Mohammed-Ali 1984a] in Table I), is not a seriouscontender but provides a straw man tocompare improved versions.

3.2.1 Distributed Mark-Scan

Mohammed-Ali’s [1984a] sequentialmark-scan requires mutation to be sus-pended during garbage collection on all

sites. Across the sites, the processeshave the following synchronous behav-ior:

site A:M M M. . . u I I I. . . uR R R. . . u M M M. . .

: : u : u : u :site Z:

M M M. . . u I I I. . . u R R R. . . u M M M. . .

The vertical bars indicate global syn-chronization points.

Any site that has exhausted its freestore can initiate garbage collection bysending a request to some master site.This master may be designated stati-cally or determined dynamically. If dy-namic, the initiating site can be themaster but arbitration is necessary ifmore than one site simultaneouslyneeds to collect garbage. The mastersends a command to each site to sus-pend mutation. The master waits foreach site to report all messages in tran-sit have been received and acted upon.The master then directs each site tostart the identification (marking) pro-cess. Mohammed-Ali remarks that al-though fast, parallel breadth-firstmarking has high and unpredictablespace requirements that make it im-practical. The alternative, sequentialdepth-first marking, requires much lessspace. The master waits until each sitereports all messages in transit havebeen received and acted upon and localmarking is complete. The master thendirects each site to perform a local rec-lamation (scan). When all sites report

Figure 21. An inverted diffusion tree.

Figure 22. Allocating a new cell in IRC.

Garbage Collecting the Internet • 353

ACM Computing Surveys, Vol. 30, No. 3, September 1998

Page 25: Garbage Collecting the Internet: A Survey of Distributed

messages in transit and reclamation iscomplete, the master directs each to re-sume mutation.

Similar schemes have been imple-mented in Berkeley Smalltalk [Schelvisand Bledoeg 1988] and the Emerald ob-ject system [Black et al. 1987; Jul et al.1988]. The problem with such schemesis that without global termination therecan be interference between mutation,identification, and reclamation on dif-ferent sites. Synchronization isachieved by the master waiting for allsites to report phase completion. A ma-jor problem is that a slow site cannot bedistinguished from failed site. Moham-med-Ali [1984] observes that while onlyone site needs to collect garbage, theothers are compelled to do so. Further-more, forcing sites to synchronize re-quires all but one site to be idle waitingfor the last to complete (usually the onethat initiates the collection).

3.2.2 Distributed Concurrent Mark-Scan

Dijkstra et al.’s [1978] concurrent mark-scan, which allows mutation to continuewhile collecting garbage, seems bettersuited to multiple mutators. One of thefirst distributed adaptations was themarking-tree collector [Hudak and Keller1982]. In this variation, there is assumedto be a single root of the whole distributedcomputation graph. (This is the case forgraph reduction of functional languages.)Identification and mutation take placeconcurrently across sites:

Each recursive mark step in Dijkstraet al.’s scheme is replaced by a marktask. Each site maintains two taskqueues: one for mutation operations andone for collection operations. Termina-tion of the mark phase is detected byeach mark task of a leaf node spawning

a task that is propagated upward in themark tree. Tricolor marking, as in[Dijkstra et al. 1978], is used to recordthe identification state of a cell but theinterpretation of the colors is subtly dif-ferent. A white cell is one to which iden-tification has not yet propagated. Ini-tially, all cells are white and aftermarking is complete, white cells iden-tify garbage. A gray cell is one to whichmarking has propagated and fromwhich a mark task has been spawned foreach of its referents. A black cell is of oneof two types: a newly allocated cell or apreviously gray cell for which all of itsspawned marking tasks have terminated.

Mutator tasks and identifier taskscompete to modify cells. Each task hasto lock all cells it intends to modify toprevent lost updates. At the end of themarking (identification) phase, whitecells are garbage and all tasks referenc-ing white cells are garbage. The scan(reclamation) phase first terminates allredundant tasks and then collects allwhite cells. No locks are necessary inthe reclamation phase because there isno contention with the mutator. Thealgorithm is concurrent, but the phasesof identification and reclamation mustbe globally synchronized across sites.

Similar mark-scan collectors are de-scribed by Augusteijn [1987], Vestal[1987], and Derbyshire [1990]. Au-gusteijn [1987] describes the collectorfor the object-oriented languagePOOL-T. Communication between ob-jects is made using a rendezvous proto-

col with a sender suspending until itreceives a reply. A central synchroniza-tion object is introduced to establishand maintain global invariants.

As in the nondistributed version ofconcurrent mark-scan, the collector op-erates even when there is no garbage to

site A (mutator) : M M M. . .site A (collector) : I I I. . . u R R R. . . u I I I. . .

: : : :site Z (mutator) : M M M. . .site Z (collector) : I I I. . . u R R R. . . u I I I. . .

354 • S.E. Abdullahi and G.A. Ringwood

ACM Computing Surveys, Vol. 30, No. 3, September 1998

Page 26: Garbage Collecting the Internet: A Survey of Distributed

collect. Propagating gray marks causesa combinatorial avalanche of markingtasks. Because collectors generally donot batch remote tasks, this imposeshigh message traffic. If batched, spaceneeded for storing these requests cannotbe determined in advance.

3.2.3 Central Coordination of Local Collection

Mohammed-Ali [1984b] proposes thatlocal garbage collection might freeenough space for a site to continue with-out requiring a global collection. Adapt-ing the area concept of Bishop [1977]developed for large (virtual) addressspaces, each site is provided with anImport Record Table, IRT, which holdsall import records. The IRT is used asadditional roots for local garbage collec-tion. Grouping the export records in atable, the Export Record Table, ERT(Figure 25) restores the symmetry.

Liskov and Ladin [1986] use the cli-ent-server model to extend local mark-scan with centralized identification ofparts of the graph between import andexport records. Each local collector in-forms a server about the paths it knows

of. Local collectors query the centralizedservice for the current IRT. Dead inter-site cycles are detected by the central-ized service from the paths advised by thelocal collectors. The centralized servicebuilds a graph of intersite references anddetects dead cycles with a standard col-lector. While logically centralized, Liskovand Ladin’s [1986] scheme is physicallyreplicated to achieve high availability. Aclient communicates with a single replica;replicas stay up-to-date by exchangingbackground “gossip” messages.

By means of a counterexample, Ru-dalics [1990] demonstrates that the Lis-kov and Ladin [1986] scheme is unsound.A scenario can occur when a cell, such asb in Figure 26, has more than one refer-ence to it. If the local marker on site Ctraverses cell d before a, cell b will only betraversed once. At the end of collection,site C only informs the server of the pathbetween c and d and not the one betweena and c. The central server unsoundlyconcludes that d and c are garbage. Ru-dalics proposes two computationally ex-pensive solutions to overcome the prob-lem.

Figure 23. Duplicating a reference in IRC.

Figure 24. Deleting a reference in IRC.

Garbage Collecting the Internet • 355

ACM Computing Surveys, Vol. 30, No. 3, September 1998

Page 27: Garbage Collecting the Internet: A Survey of Distributed

3.2.4 Cell Migration

As with generation scavengers, Section2.3.5, local collection does not removegarbage subgraphs that cross siteboundaries. While generation scaven-gers give a temporal segregation ofcells, distributed systems have a spatialsegregation of cells. Following Bishop[1977], El-Habbash et al. [1990] proposemigrating cells so that intersite cyclescan be reclaimed by local collection (Fig-ure 27).

El-Habbash et al. introduce a Private-Table, PT, to provide complete location-independent addressing. Cells are parti-tioned into locality clusters, each withits own IRT, ERT, and PT. A cluster is alogical partition of cells in contrast to aphysical partition, a site. Ideally, a clus-ter has many more intracluster refer-ences than intercluster references. Thedivision of cells into locality clusters canbe compared with generation scaven-gers (Section 2.3.5), a division of cellsinto temporal clusters. Remotely refer-enced cells in a locality cluster are givenunique public identifiers, PIDs. Cellsthat are only referenced locally are notknown outside the cluster and are givenlocal identifiers, LIDs. The LIDs com-prise entries in PT. A major problem

with this scheme is generating uniquePIDs, particularly in a very large net-work.

Clusters are the unit of managementfor El-Habbash et al. [1990]. The objec-tive of management is to increase thelocality of reference of a cluster. Gar-bage collection is a by-product of in-creasing locality. To increase locality,cells may migrate from cluster to clus-ter via archive clusters. Subgraphs thatare only reachable from IRT are trans-ferred to an archive cluster. When anarchived cell is accessed from anothercluster, that cell and its subgraph aremoved to the referencing cluster. Cellsthat are not accessed remain in thearchive. Starting from the roots of acluster and traversing the subgraphsrooted in them, any cells encounteredremain in the cluster. Cells that are notreachable from the roots are moved toan archive. The cells that are not reach-able from any remote cells (roots ornonroots) in the cluster are garbage.

The El-Habbash et al. [1990] collectoris intended for use in persistent envi-ronments such as Smalltalk. A similarscheme for persistent store is describedby Moss [1990] for the Mneme project.Moss equates a persistent store with a

Figure 25. Distributed GC by local collection.

356 • S.E. Abdullahi and G.A. Ringwood

ACM Computing Surveys, Vol. 30, No. 3, September 1998

Page 28: Garbage Collecting the Internet: A Survey of Distributed

database, but cell retention is based onreachability (in garbage collection) asopposed to explicit deletion (in the data-base sense).

One problem with cell migration as ameans of collecting intercluster cycles isthrashing. Migration can lead to a sce-nario (Figure 27a) where a is migratedto D, d to C and c to A. El-Habbash etal. [1990] propose a total ordering onclusters (such as name ordering) toavoid thrashing. A cell can only migrateto an inferior cluster. A more seriousproblem is that archival garbage collec-tion is controlled by setting time limitson access. With slow sites this will leadto unsoundness.

3.2.5 Pipelined Local Collections

As with generation scavenging, copyinglarge cells is expensive. Mohammed-Ali[1984c] suggests that garbage thatcrosses site boundaries can be collectedif at the end of a local collection a siteinforms other sites of the export recordsit holds. A message containing a refer-ence may be in transit when a localcollection is invoked. This can lead to acell not being identified as live. Moham-med-Ali proposes each site be providedwith a temporary Transport Table, TT,

which records in-transit references.These are moved to IRT or ERT whenthey are acknowledged.

Rudalics [1986] describes a distrib-uted collector adapted from Baker’s[1978] incremental scavenger. Each sitehas two semi-spaces used for garbage-collecting local cells. The upper part ofeach semi-space is used for exportrecords. The import records are linkedin either of three lists. The first two actas semi-spaces for external references,while the third corresponds to Moham-med-Ali’s TT. As with single-address-space generation scavengers, neitherRudalics nor Mohammed Ali’s scheme isable to identify cycles of garbage thatspan more than one site.

Hughes [1985] describes a way ofpipelining local collections that can de-tect intersite cycles of garbage. This isachieved by propagating timestamps inplace of marks. Import and exportrecords are initialized with a globalclock [Lamport 1978]. Necessary condi-tions for a global clock are that theunderlying message-passing systemguarantees that messages are not lost,duplicated, and arrive in mutual causalorder (FOFI). An export record reach-able from a local root is marked with

Figure 26. Rudalic’s counterexample.

Garbage Collecting the Internet • 357

ACM Computing Surveys, Vol. 30, No. 3, September 1998

Page 29: Garbage Collecting the Internet: A Survey of Distributed

the time at which the local markingphase started. An export record tracedfrom an import record adopts the time-stamp of the traced import record.

At the end of a local collection, exportrecord timestamps are sent to corre-sponding import records. If the time-stamp of the export record is greaterthan the import record, the importrecord timestamp is updated. When re-ceipt of all such messages has been ac-

knowledged, the local clock is incre-mented to the greatest propagatedtimestamp. In this way, the timestampof a dead import or export record re-mains constant while live ones increase.

Import records that carry a times-tamp less than some threshold are re-claimed. The threshold is the least localtimestamp. Hughes determines thethreshold using Rana’s [1983] termina-tion algorithm. A problem is that a slow

Figure 27. Cell migration: (a) intersite cycle of garbage; (b) migration of two cells.

358 • S.E. Abdullahi and G.A. Ringwood

ACM Computing Surveys, Vol. 30, No. 3, September 1998

Page 30: Garbage Collecting the Internet: A Survey of Distributed

site unwilling to initiate a local collec-tion will leave the threshold at the ini-tial value. This is the case even when aslow site does not hold any remote refer-ences.

3.3 Distributed Hybrid Collectors

While WRC, GRC, and IRC elide raceconditions (and at the same time reducethe communication overhead), they suf-fer the same problem as their single-address-space progenitors: memoryleaks due to cycles of garbage. Worsestill, the cycles may be intersite, such aso-c-h in Figure 5.

Lins and Jones [1991] give an adapta-tion of the cyclic reference countingschemes of Martinez et al. [1990] andLins [1990] to the distributed environ-ment. The algorithm combines WRC(Section 3.1.2) with Lins’ [1990] localmark-scan (Section 2.4). The algorithmhas the same problem as its progenitor:the need to perform a local mark-scanevery time a reference to a shared sub-graph is deleted. Successive attempts toaddress these problems are presentedby Jones and Lins [1992, 1993]. As ad-mitted by the authors, the scheme hasfour deficiencies. The first is that recla-mation of garbage cycles may be de-layed indefinitely. Second, the schemehas higher storage overheads thanWRC. Third, the three phases of gar-bage collection require termination de-tection. Last, unlike Hudak and Keller[1982], the scheme cannot detect norremove tasks that become redundantdue to garbage collection. Dehne andLins [1994] attempt to address theseproblems. The scheme allows sites toperform local mark-scan without theneed to synchronize the phases eitheron a single site or across sites. Thisrequires six colors.

Piquer [1991] suggests that the spaceoverhead of IRC (Section 3.1.4) is ac-ceptable if it is only used for remotereferences. Intersite cycles can be col-lected by cell migration and local directidentification collectors. Inverted diffu-sion trees (Section 3.1.4) can easily sup-

port cell migration with an overhead ofonly one decrement message betweensource and destination sites. The migra-tion of a cell requires a change of theroot in the diffusion tree (Figure 28).This operation is trivial, as the old rootis known: the new root is extracted fromthe tree and the old root added as achild of the new root. The extractioncosts one “decrement” message and theaddition is done locally at the respectivesites (the new and old roots). Like ElHabbash [1992], a total ordering onsites will avoid thrashing of migration.Cell migration can, however, lead tounsoundness if references to the old lo-cation of a cell are in transit while a cellemigrates.

Shapiro et al. [1992a] describe anRPC (remote procedure call) implemen-tation of a hybrid collector that usesIRL (Section 3.1.5) for remote refer-ences and local tracing collectors. Thegarbage collector is tightly coupled withan object management system. The cellfinder RPC handles cell deletion andsite crashes. When given an indirect(parent) reference, the procedure lo-cates the cell referred to. In this way,the reference field is completed lazily.Other RPCs include reference-sending,cell migration, cycle-detection, and ab-normal termination.

As in Hughes [1985] (Section 3.2.5),messages in Shapiro et al. [1992a] aretime-stamped by a local monotonic (in-creasing) clock. Each IRT entry isstamped with the clock value of the lastcorresponding message sent. UnlikeIRC (Section 3.1.4), remote references tothe same cell each have separate importrecords. Each site maintains a vector ofhighest time-stamped messages re-ceived from other sites. Unlike Hughes[1990], clocks on different sites need notbe synchronized; a total count of trans-mitted (mutator and control) messagesis sufficient for the purpose. To detectduplicated or lost messages, a list ofexport records is sent to the site refer-encing them.

When a mutator exports a referenceto another site, it is first added to the

Garbage Collecting the Internet • 359

ACM Computing Surveys, Vol. 30, No. 3, September 1998

Page 31: Garbage Collecting the Internet: A Survey of Distributed

local IRT. Both the IRT and the ERTare incomplete (overestimates). Localgarbage collection proceeds from bothlocal roots and the IRT. Shapiro et al.use two colors in local marking. A cellaccessible from the local root is markedgreen. A cell accessible only from theIRT is marked red. The collector re-moves garbage entries in the ERT send-ing update information to the IRT en-tries in appropriate sites. This, in turn,allows previously referenced IRT en-tries to be collected. Unlike the distrib-uted concurrent mark-scan collectors(Section 3.2.2) the interface between theglobal collector and other components(i.e., the mutator and the cell finder) islimited to just the IRT and ERT. Up-dates to IRT and ERT can occur inparallel with other activities.

In a prototype distributed Small-talk-80 system, Bennett [1987] de-scribes a scheme that pipelines localdeferred-reference-counting collectorsthrough global-reference-counting andmark-scan collectors. The global collec-tors rely on the local collection to enu-merate the export records, called proxycells. Bennett’s fast global referencecounter relies on cells in alternate col-lection cycles being distinguishable.Each IRT entry has a flag that identi-fies import records created since thestart of a collection. This is similar tothe gray color of Dijkstra et al. [1978].During a local collection, each site enu-merates its export records and for eachsends a message that increases the ex-ternal reference count in its correspond-ing IRT entry. After this marking

phase, live remotely referenced cellshave a nonzero external referencecount. Each site then scans its IRT andremoves those cells with a zero externalreference count that were in existencebefore the start of the cycle (i.e., notgray). Any referents not referenced lo-cally are reclaimed by the site’s localcollector.

Bennett’s fast collector cannot detectintersite cycles. The second, slower col-lector is a mark-scan algorithm. Themarking phase proceeds from those cellsin the IRT that also have local refer-ences (determined by the local referencecount). References are followed to ex-port records and messages are sent tothe remote sites to continue the traceremotely. At the end of the phase, inter-site cycles have not been marked andcan be removed from the IRT.

Lang et al. [1992] describes a schemethat pipelines local tracing collectorsthrough a global reference-counting col-lector. When an ERT entry is reclaimed,a decrement message is sent to the sitehosting the corresponding importrecord. If the decrement action bringsits counter to zero, the IRT entry isreclaimed. This is the only mechanismfor reclaiming IRT entries. It is sound,since sites that are down do not senddecrement messages.

Lang et al.’s [1992] sites are orga-nized into groups that cooperate to re-move garbage cycles that span theirmembers. The groups can be hierarchi-cal with the largest containing all thesites. Collection begins with group es-tablishment. The composition of a group

Figure 28. Cell migration in an inverted diffusion tree.

360 • S.E. Abdullahi and G.A. Ringwood

ACM Computing Surveys, Vol. 30, No. 3, September 1998

Page 32: Garbage Collecting the Internet: A Survey of Distributed

can be determined statically or dynami-cally, but is independent of collection. Asite would contemplate group collectiononly if local collection does not freeenough space for the mutator to con-tinue. When a site fails to cooperate, thegroup is reorganized to exclude it andcollection continues without losing workalready done. Messages with acknowl-edgments and time-outs are used to de-tect noncooperating sites. Multiple over-lapping group collections can besimultaneously active if each group as-sociates a unique identifier to a collec-tion.

A group cooperates to collect theirERTs by direct identification. Local gar-bage collection is used to transmitmarks from IRTs to ERTs. For eachgroup collection, IRT and ERT entrieshave a mark that is local to the group.IRT entries may be marked soft or hard.The ERT entries may be marked hard,soft, or none. Effectively, an IRT entry ismarked hard if it is needed outside thegroup or is accessible from a root of asite in the group. It is marked soft if itis referenced only from another memberof the group.

Local garbage collection has twomarking phases. In the first phase, theinitial marks of IRT entries are deter-mined from the reference count and ref-erences from members of the group (af-ter Christopher [1984]). All marks onERT entries are reset to none. Markingproceeds from both local roots and hardIRT entries. Any ERT entry reached bythis tracing is marked hard. In the sec-ond phase, tracing starts from the softIRT entries. Any ERT entry reached ismarked soft if it is not already markedhard.

After a local garbage collection, theERT entries that are marked none aregarbage. They can be reclaimed whilesending decrement messages to the IRTentries they reference. ERT entriesmarked hard (and the IRT they refer-ence) are reachable either from a hardIRT entry or from a local root. When anERT entry is known to be hard, itsmark has to be propagated to the IRT

entry it references (if it is in the group).When a new remote reference is cre-ated, the associated IRT entry ismarked emphhard (as in the distributedversion of concurrent mark-scan (Sec-tion 3.2.2)) since it is necessarily acces-sible from a root.

After n such marking cycles, where nis the number of sites a cycle spans, allhard IRT entries are directly or indi-rectly accessible from a root or from asite outside the group. IRT entriesmarked soft are inaccessible, and canthus be safely reclaimed. Such soft IRTentries are set to reference nil ratherthan a local cell. The unreachable off-spring of these IRT entries will be re-claimed by the next local GC. Similarly,the ERT entries that were kept aliveexclusively by these entries will be re-claimed by the next local GC. The recla-mation of such an ERT entry causes thesending of a decrement message to theIRT entry it references. In the case ofdead cycles, dead IRT entries in thecycle eventually receive decrement mes-sages from all the dead ERT entriesthat reference them. Hence their refer-ence counts decrease to zero and theyare eventually reclaimed by the refer-ence-counting mechanism. This protocolis conservative as it achieves a deferredreclamation instead of a synchronizeddeletion of dead cells.

A problem with the Lang et al. collec-tor is the propagation of ERT entries toIRT entries after a local collection. It isonly safe to assume that soft ERT en-tries are garbage after all hard markingmessages have been received—thus itrequires a group termination-detectionalgorithm. If the group consists of allthe sites, the problem is similar toHughes [1985].

4. CONCLUSIONS

The problems of distributed garbage col-lection appear to be the same as those ofsingle-computer collection: complete-ness and soundness. Soundness cannotbe compromised. According to Juul andJul [1992], the broad spectrum of collec-

Garbage Collecting the Internet • 361

ACM Computing Surveys, Vol. 30, No. 3, September 1998

Page 33: Garbage Collecting the Internet: A Survey of Distributed

tors is explained by the tradeoff be-tween completeness, the ability to col-lect all garbage, and expediency, theability to satisfy mutator allocation re-quests unobtrusively. The problems ofconcurrency have been met in concur-rent mark-scan collectors (Section2.3.2). The problems of localization havebeen met in scavenging collectors (Sec-tion 2.3.3) and large address space col-lectors [Bishop 1977]. But the lack ofsynchrony of distributed systems posesquestions of what completeness andsoundness mean. Garbage collection, infact, is a microcosm that exhibits all theproblems of distribution [Vestal 1987].

4.1 Overview

The early distributed garbage collectorswere, naturally enough, based on sin-gle-address-space collectors. Single-ad-dress-space collectors were surveyedand classified in Section 2; this classifi-cation is used to explore the issues ofdistribution in Section 3.

A straightforward attempt to use ref-erence counting in distributed envi-ronments (Section 3.1.1) exposes theproblem of indeterministic latency. Asuccession of improvements (Sections3.1.2, 3.1.3, 3.1.4) elide the problem bytransferring successively more state in-formation to the reference. At the sametime, these solutions reduce the commu-nication overhead.

All indirect identification schemes failto solve the main difficulty with refer-ence counting, memory leaks due to cy-clic structures. The concurrent mark-scan collector (Section 2.3.2) initiallyseems appropriate for distribution, butsuffers from avalanches of markingmessages. A critique of global stop-the-world synchronization mark-scan sug-gests pipelining local collections to col-lect garbage subgraphs that cross siteboundaries (Section 3.2.5).

As demonstrated by Rudalics [1990],Liskov and Ladin’s [1986] centralizedclient-server collector permits unsoundscenario (Section 3.2.3). The error inLiskov and Ladin was corrected by

Laden and Liskov [1992] using a globalclock after Hughes [1985]. The termina-tion protocol is not required because thecentral service determines the thresh-old. Noncooperating sites still suppressthe threshold value. As noted by Sha-piro et al. [1994], an unsound scenariowas implicitly and wrongly assumed notto occur in Shapiro et al. [1992a]. Sha-piro et al. [1992b] corrects the error.The origin of these anomalies and therace conditions of reference counting isindeterministic message latency.

Because in a distributed system la-tency is indeterministic, time is relativ-istic [Babaoglu and Marzullo 1993]. Lo-cal task scheduling provides only apartial order on events. The partial or-der can be extended to a total causalorder using local vector clocks or aglobal clock. However, the total order isnot unique. As there is no unique totalorder, so there is no unique meaning ofcompleteness and soundness. Hughes[1985] (Section 3.2.5) uses a global clockfor termination detection. Tel and Mat-tern [1993] show that IRC (Section3.1.4) is equivalent to Dijkstra andScholten’s [1989] termination-detectionalgorithm. A global clock requires thatthe transport layer provide mutualcausal order [Babaoglu and Marzullo1993]. Unlike Hughes [1985], Shapiro etal. [1992b] do not assume that thetransport layer provides a reliable mes-sage-passing system. Instead, garbagecollection and reliable message-passingare integrated using vector clocks.

The current implementation of Javauses a distributed collection based onBirrell et al.’s [1993] collector forModula-3, Section 3.1.5. Unlike Shapiroet al. [1992a], Java’s remote methodinvocation is built directly on sockets.Sockets are an API (application pro-gramming interface) to TCP. The archi-tecture adds two further layers on top ofTCP [Sun 1996] (Figure 29). The migra-tion layer provides facilities for cell (ob-ject) migration. As Smalltalk was a ma-jor driving force in the development ofsingle-address-space garbage collectors,

362 • S.E. Abdullahi and G.A. Ringwood

ACM Computing Surveys, Vol. 30, No. 3, September 1998

Page 34: Garbage Collecting the Internet: A Survey of Distributed

it is likely that Java will play a similarrole for distributed garbage collection.

The problem of slow and noncooperat-ing sites is partially solved by Lang etal., Section 3.3, who exclude slow sitesfrom a group collection without any lossof work. This grouping strategy is simi-lar to those used by single-address-space-generation scavengers.

4.2 Collector Comparison

Numerous schemes have been proposedfor distributed garbage collection, butlittle has been done in the way of sys-tematic comparison. Zorn [1989] catego-rizes the evaluation of garbage collectorsinto language-specific implementations,analytic studies and simulation. Previ-ous evaluation of single-site garbagecollectors boasts representatives of allthree classes. Ungar [1984; 1987] de-scribes several single-address-space im-plementations of generation-scavenginggarbage collectors (Section 2.3.5 forSmalltalk). His performance metrics in-clude CPU overhead, pause length, peakmain memory use, and backing storeaccess. Ungar reported the averageCPU overhead as 1.5% and averagepause times of 150ms every 16 seconds.These measurements were on Berkeley

Tab

le1.

Dis

trib

uted

Dir

ect

Iden

tific

atio

nS

chem

es

Au

thor

(s)

and

year

ofpu

blic

atio

nP

ause

Spa

ceO

verh

ead

Com

mO

verh

ead

Syn

chro

niz

atio

nO

verh

ead

Loc

alC

olle

ctio

nR

emov

alof

inte

rsit

ecy

cles

Not

es

Ler

men

and

Mau

rer

[198

6]L

ow(r

ecu

rsiv

efr

eein

g)R

efco

un

t3*

(rem

refs

copi

ed)

Ref

dele

tion

MI

phas

eN

o

Th

omas

[198

1];

Wat

son

and

Wat

son

[198

7];

Bev

an[1

987]

Low

(rec

urs

ive

free

ing)

Cou

nt

once

ll&

wei

ght

onre

fere

nce

rem

refs

1re

min

dire

ctio

ns

Non

eM

Iph

ase

No

Un

derf

low

.In

dire

ctio

ns

ondi

ffer

ent

site

s.

Gol

dber

g[1

989]

Low

(rec

urs

ive

free

ing)

Led

ger

once

ll,

gen

erat

ion

&co

pyco

un

ton

refe

ren

ce

rem

refs

Non

eM

Iph

ase

No

Ove

rflo

w.

Indi

rect

ion

son

sam

esi

te.

Piq

uer

[199

1]L

ow(r

ecu

rsiv

efr

eein

g)C

opy

cou

nt

and

pare

nt

for

each

ref.

rem

refs

Non

eM

Iph

ase

No

No

indi

rect

ion

s.

Figure 29. Migration and remote reference lay-ers.

Garbage Collecting the Internet • 363

ACM Computing Surveys, Vol. 30, No. 3, September 1998

Page 35: Garbage Collecting the Internet: A Survey of Distributed

Table 2. Distributed Indirect Identification Schemes

Author(s) andyear of publication Pause Space Overhead Comm

OverheadSynchronization

Overhead Local Collection Removal ofintersite cycles Notes

Mohammed-Ali[1984a];Schelvis &Bledoeg [1988]

High (stopmutation)

Mark High 2*terminationdetection.Centralized.

No (network widemarking)

Yes Basis forcomparison.

Hudak & Keller[1982]

Low (concurrentmutator)

Mark High Terminationdetection 1local locks.Centralized.

No (network widemarking)

Yes Mutation andcollection inparallel.

Ladin & Liskov[1992]

Medium(collecting localspace)

Intersite graph High Terminationdetection.Centralized butreplicated.

Yes (site) Yes (centralized) Client/server(replicated).

Mohammed-Ali[1984b]

Medium Mark Low (remoterefs)

None Yes (site) No No collection ofgarbage whichcrosses sites.

El-Habbash,Harris & Horn[1990]

Medium Mark and tables Low None Yes (cluster) Yes (migration) Object-orienteddistributedpersistentenvironment.

Mohammed-Ali[1984c]

Medium Mark and TTtable

Low (remoterefs)

Ack messages intransit

Yes (site) No Pipelines localcollections

Hughes [1985] Medium timestamps Low Terminationdetection

Yes (site) Yes Pipelines localcollections.

364•

S.E

.A

bdu

llahi

and

G.A

.R

ingw

ood

AC

MC

ompu

ting

Su

rveys,V

ol.30,

No.

3,S

eptember

1998

Page 36: Garbage Collecting the Internet: A Survey of Distributed

Smalltalk, an implementation of theSmalltalk-80 system for Sun worksta-tions.

Evaluation of distributed garbage col-lection is much more difficult, and onlylanguage-specific comparisons havebeen reported so far. A number of au-thors have evaluated collectors for dis-tributed versions of Smalltalk. Bennett[1987] (Section 3.3) adds a global gar-bage collector to multiple Smalltalk-80incarnations with their own local collec-tor. His performance metric was com-munication overhead. Bennett reportedthat on average remote messages areslower than local messages by a factorof 1000. The measured system consistedof two Sun-2 diskless workstations con-nected by a 10 megabit/second Ether-net. Schelvis and Bledoeg [1988] alsoevaluated collectors for distributedSmalltalk implemented on a network ofSun workstations running BerkeleyUNIX. These included a conservativegeneration-scavenging collector. Schel-vis and Bledoeg conclude that remotesend is approximately 500 times slowerthan local send. In addition, the cost ofremote computation is reported at about45% slower than local computation.

Plainfosse and Shapiro [1992] reportan implementation of Shapiro et al.[1990], SGP, for Lisp. Measurements forthe number of messages and the CPUoverhead are given. They comparedSGP with the indirect reference countcollector (IRC, Section 3.1.4). The CPUoverhead shows that SGP is on average20% slower than with no garbage collec-tion and 10% slower than IRC. This wascontrary to the expectation that distrib-uted garbage collection is communica-tion-bound. The number of control mes-sages sent in the SGP protocol is 70–80% lower than the IRC protocol.Plainfosse and Shapiro attribute thedifference to the “buffering” strategy ofthe SGP protocol. These measurementswere taken on a Parsytec board com-posed of transputers (T800) with onemegabyte of memory each, hosted by aSun.

Distributed garbage collection is com-

Tab

le3.

Dis

trib

uted

Hyb

rid

Sch

emes

Au

thor

(s)

and

year

ofpu

blic

atio

nP

ause

Spa

ceO

verh

ead

Com

mO

verh

ead

Syn

chro

niz

atio

nO

verh

ead

Loc

alC

olle

ctio

nR

emov

alof

inte

rsit

ecy

cles

Not

es

Deh

ne

and

Lin

s[1

994]

Low

(rec

urs

ive

free

ing)

Ref

cou

nt,

colo

r,co

ntr

olh

eap

&2

queu

es

3*(r

emre

fsco

pied

)1

2*(s

usp

ect

cycl

icre

mre

fs)

Non

e(d

oubt

ful)

MI

phas

eY

es(l

azy

mar

k-

scan

)A

ddre

sses

the

issu

eof

syn

chro

niz

atio

n

Sh

apir

o,D

ick

man

&P

lain

foss

e[1

992b

]

Med

ium

(sit

eco

llec

tion

)T

able

sL

owN

one

Yes

(sit

e)Y

es(m

igra

tion

)L

ow-l

evel

dist

ribu

ted

obje

ctsu

ppor

tsy

stem

.B

enn

ett

[198

7]M

ediu

m(t

raci

ng

RC

T)

Fla

gged

entr

yre

cord

(RC

T)

rem

refs

Non

eY

es(s

ite)

Not

real

lyU

ses

ase

con

d,m

ark

-sc

an,

coll

ecto

rto

rem

ove

cycl

es.

Lan

g,Q

uei

nn

ec&

Piq

uer

[199

2]M

ediu

m(s

ite

coll

ecti

on)

Tab

les

Med

ium

(mar

kin

gen

try

item

s)gr

oup

term

inat

ion

dete

ctio

n.

Yes

(sit

e)Y

esA

site

not

resp

ondi

ng

ina

tim

ely

man

ner

isex

clu

ded

from

aco

llec

tion

wit

hou

tlo

ssof

wor

k.

Garbage Collecting the Internet • 365

ACM Computing Surveys, Vol. 30, No. 3, September 1998

Page 37: Garbage Collecting the Internet: A Survey of Distributed

plex and a realistic empirical compari-son of distributed collectors has beenlacking. The Ph.D. thesis of one of theauthors [Abdullahi 1995] addresses thisproblem. It appears that the features ofdistributed garbage collectors are deli-cately balanced. Improvements in oneaspect are made to the detriment ofanother. These results will be reportedelsewhere [Abdullahi and Ringwood1996]. In lieu of quantitative informa-tion, Tables I, II, and III give a qualita-tive comparison of representative dis-tributed collectors described in thisreview. Where qualification is appropri-ate and known, as in pause, space andcommunication overhead, a rank of low,medium, and high is given. These arequalitative and relative terms. An orderof magnitude or further explanation,where available, is given; otherwise thesource of such overhead is given.

ACKNOWLEDGMENT

The authors are grateful to the referees for point-ing out omissions and misconceptions in the draft.Referees’ requests for clarification prompted someof the rationalization of the ontology. Both au-thors contend that serious omissions and miscon-ceptions that still remain are entirely the fault ofthe other author.

BIBLIOGRAPHY AND REFERENCES

ABDULLAHI, S. E. 1992. Managing computermemory: Dynamic allocation and deallocationstrategies. In Proceedings of the 2nd Confer-ence on Information Technology and its Appli-cations (Leicester UK, Dec. 19–20), 25–40.

—. 1994. Recycling garbage. In Proceedings ofthe 3rd Conference on Information Technologyand its Applications (Leicester, UK, April2–3), 192–197.

—. 1995. Empirical studies of distributed gar-bage collection. Ph.D. thesis, Dec. 1995. Univ.of London.

ABDULLAHI, S. E. AND EDEMENANG, E. J. A.1993. A comparative study of dynamic mem-ory management techniques. Advances inModel. Anal. 15, 2, 17–31.

ABDULLAHI, S. E. AND RINGWOOD, G. A. 1996.Empirical studies of distributed garbage col-lection parts I, II, and III. TR, Dept. of Com-puter Science, QMW College, Univ. of London.

ABDULLAHI, S. E., MIRANDA, E. E., AND RINGWOOD,G. A. 1992. Collection schemes for distrib-

uted garbage. In Proceedings of the Interna-tional Workshop on Memory Management (St.Malo, France). LNCS 637, Springer-Verlag,43–81.

AGHA, G. 1986. Actors: A Model of ConcurrentComputation in Distributed Systems, MITPress, Cambridge, MA.

ALMES, G., BORNING, A., AND MESSINGER, E.1983. Implementing a Smalltalk-80 systemon the Intel 432: A feasibility study. In Small-talk-80: Bits of History, Words of Advice, Ad-dison-Wesley, 175–187.

AMSALEG, L., GRUBER, O., AND FRANKLIN, M.1995. Efficient incremental garbage collec-tion for workstation-server database systems.In Proceedings of the 21st International Con-ference on Very Large Data Bases (Zurich,Switzerland).

ANDREWS, G. R. 1991. Concurrent Program-ming—Principles and Practice. Benjamin/Cummings.

APPLEBY, K., CARLSSON, M., HARIDI, S., AND SAH-LIN, D. 1983. Garbage collection for Prologbased on WAM. Commun. ACM 31, 6, 719–741.

ARNBORG, S. 1974. Optimal memory manage-ment in a system with garbage collection. BIT14, 375–381.

ARVIND, V. K. AND IANNUCCI, R. A. 1987. Twofundamental issues in multiprogramming. InProceedings of the Conference on Parallel Pro-cessing in Science and Engineering (Bonn-BadGodesberg), 61–68.

ATKINSON, M. P., BAILEY, P. J., CHISHOLM, K. J.,COCKSHOTT, P. W., AND MORRISON, R. 1983.An approach to persistent programming.Computer J. 26, 4, 360–365.

AUGUSTEIJN, L. 1987. Garbage collection in adistributed environment. In PARLE’87—Par-allel Architectures and Languages Europe.LNCS 259, Springer-Verlag, 75–93.

BABAOGLU, O. AND MARZULLO, K. 1993. Consis-tent global states of distributed systems: Fun-damental concepts and mechanisms. In Dis-tributed Systems, Addison-Wesley.

BADEN, S. B. 1983. Low-overhead storage recla-mation in the Smalltalk-80 virtual machine.In Smalltalk-80: Bits of History, Words ofAdvice, Addison-Wesley, 331–342.

BAECKER, H. D. 1972. Garbage collection forvirtual memory computer systems. Commun.ACM 15, 11, 981–986.

BAKER, H. G. 1978. List processing in real-timeon a serial computer. Commun. ACM 21, 4,280–294.

—. 1992. The treadmill: Real-time garbage col-lection without motion sickness. ACM SIG-PLAN Not. 27, 3 (March), 66–70.

BAL, H. 1990. Programming Distributed Sys-tems, Prentice Hall, Englewood Cliffs, NJ.

BALLARD, S. AND SHIRRON, S. 1983. The design

366 • S.E. Abdullahi and G.A. Ringwood

ACM Computing Surveys, Vol. 30, No. 3, September 1998

Page 38: Garbage Collecting the Internet: A Survey of Distributed

and implementation of VAX/Smalltalk-80. InSmalltalk-80: Bits of History, Words of Ad-vice, Addison-Wesley, 127–150.

BARACH, D. R., TAENZER, D. H., AND WELLS, R. E.1982. A technique for finding storage alloca-tion errors in C-language programs. ACMSIGPLAN Not. 17, 5 (March), 16–23.

BARTBARA, L. AND RIRKA, L. 1986. Highly-avail-able distributed services and fault-tolerantdistributed garbage collection. In Proceedingsof the 5th Symposium on the Principles ofDistributed Computing (Aug.), ACM, 29–39.

BARTLETT, J. F. 1990. A generational, compact-ing garbage collector for C11. Position paper,ECOOP/OOPSLA ’90 Workshop on GarbageCollection.

BATES, R. L., DYER, D., AND KOOMEN, J. A. G. M.1982. Implementation of Interlisp on theVAX. In Proceedings of the ACM Symposiumon Lisp and Functional Programming (Pitts-burgh, PA, Aug. 15–18, 81–87.

BEKKERS, Y. AND COHEN, J. 1992. General dis-cussions. In Proceedings of the InternationalWorkshop on Memory Management (St. Malo,France). LNCS 637, Springer-Verlag.

BEKKERS, Y., RIDOUX, O., AND UNGARO, L.1992. Dynamic memory management for se-quential logic programming languages. InProceedings of the International Workshop onMemory Management (St. Malo, France).LNCS 637, Springer-Verlag, 82–102.

BEN-ARI, M. 1984. Algorithms for on-the-flygarbage collection. ACM Trans. Program.Lang. Syst. 6, 333–344.

BENNETT, J. K. 1987. The design and imple-mentation of distributed Smalltalk. OOPSLA’87. ACM SIGPLAN Not. 22, 12, 318–330.

BENGTSSON, M. AND MAGNUSSON, B. 1990. Real-time compacting garbage collection. Positionpaper. In Proceedings of the ECOOP/OOPSLA ’90 Workshop on Garbage Collection.

BEVAN, D. I. 1987. Distributed garbage collec-tion using reference counting. In PARLE ’87—Parallel Architectures and Languages Europe.LNCS 259, Springer-Verlag, 176–187.

BLACK, A., HUTCHINSON, N., JUL, E., LEVY, H., AND

CARTER, L. 1987. Distribution and abstracttypes in Emerald. ACM Trans. Softw. Eng. 13,1, 65–76.

BIRRELL, A., EVERS, D., NELSON, G., OWICKI, S.,AND WOBBER, E. 1993. Distributed garbagecollection for network objects. TR 116, DigitalEquipment Corp. Research Center.

BISHOP, B. 1977. Computer systems with verylarge address space and garbage collection,Ph.D. thesis, MIT, Cambridge, MA.

BOBROW, D. G. 1980. Managing reentrantstructures using reference counts. ACMTrans. Program. Lang. Syst. 2, 3, 269–273.

BOEHM, J. AND WEISER, M. 1988. Garbage col-

lection in an uncooperative environment.Softw. Pract. Exper. 18, 9, 807–820.

BROOKS, R. A., GABRIEL, R. P., AND STEELE,G. L. 1982. S-1 common Lisp implementa-tion. In Proceedings of the ACM Symposiumon Lisp and Functional Programming (Pitts-burgh, PA, Aug. 15–18), 108–113.

BROWNBRIDGE, D. R. 1985. Cyclic referencecounting for combinator machines. In Func-tional Programming Languages and Com-puter Architecture. LNCS 201, Springer-Ver-lag, 273–288.

CARLSSON, S., MATTSSON, C., AND BENGTSSON,M. 1990. A fast expected-time compactinggarbage collection algorithm. Position paper.In Proceedings of the ECOOP/OOPSLA ’90Workshop on Garbage Collection.

CHAMBERS, C., UNGAR, D., AND LEE, E. 1989. Anefficient implementation of SELF: A dynami-cally-typed object-oriented language based onprototypes. OOPSLA ’89, ACM SIGPLAN Not.24, 10, 49–70.

CHAMBERS, F. B., DUCE, D. A., AND JONES, G. P.,EDS. 1984. Distributed Computing, Aca-demic Press. London.

CHENEY, C. J. 1970. A non-recursive list com-pacting algorithm. Commun. ACM 13, 11,677–678.

CHIKAYAMA, T. AND KIMURA, Y. 1987. Multiplereference management. In Flat GHC, ICLP,MIT Press, 276–293.

CLARK, D. W. AND GREEN, C. C. 1977. An empir-ical study of list structure in Lisp. Commun.ACM 20, 2, 78–86.

CLARK, D. W. AND GREEN, C. C. 1977. A note onshared list structure in Lisp. Inf. Process.Lett. 7, 6, 312–314.

COHEN, J. 1981. Garbage collection of linkeddata structures. ACM Comput. Surv. 13, 3,341–367.

COHEN, J. AND NICOLAU, A. 1983. Comparison ofcompacting algorithms for garbage collection.ACM Trans. Program. Lang. Syst. 5, 4, 532–553.

COHEN, J. AND TRILLING, L. 1967. Remarks ongarbage collection using a two level storage.BIT 7, 1, 22–30.

COLLINS, G. E. 1960. A method for overlappingand erasure of lists. Commun. ACM 3, 12,655–657.

COULOURIS, G. F., DOLLIMORE, J., AND KINDBERG,T. 1994. Distributed Systems: Conceptsand Design 2nd ed., Addison-Wesley.

COURTS, R. 1988. Improving locality of refer-ence in a garbage-collecting memory manage-ment system. Commun. ACM 31, 9, 1128–1138.

CRICHLOW, J. M. 1988. An Introduction to Dis-tributed and Parallel Computing. PrenticeHall, Englewood Cliffs, NJ.

Garbage Collecting the Internet • 367

ACM Computing Surveys, Vol. 30, No. 3, September 1998

Page 39: Garbage Collecting the Internet: A Survey of Distributed

DAVIES, D. J. M. 1984. Memory occupancy pat-terns in garbage collection systems. Commun.ACM 27, 8, 819–825.

DAWSON, J. L. 1982. Improved effectivenessfrom a real-time Lisp garbage collector. InProceedings of the ACM Symposium on Lispand Functional Programming (Pittsburgh,PA, Aug. 15–18), 159–167.

DEHNEN, F. AND LINS, R. D. 1994. Distributedcyclic reference counting. In Parallel and Dis-tributed Computing (Theory and Practice).LNCS 805, Springer-Verlag, 95–100.

DELLAR, C. N. R. 1980. Removing backing storeadministration from the CAP operating sys-tem. Oper. Syst. Rev. 14, 4, 9–41.

DELOBEL, C., LECLUSE, C., AND RICHARD, P. 1995.Databases: from Relational to Object-OrientedSystems. ITP.

DENNING, P. J. 1968. Thrashing: its causes andprevention. In Proceedings of the AFIPS Na-tional Computer Conference, 915–922.

DERBYSHIRE, M. H. 1990. Mark-scan garbagecollection on a distributed architecture. Lispand Symbolic Comput. 3, 2, 135–170.

DETLEFS, D. L. 1990a. Concurrent garbage col-lection for C11. Tech. Rep. CMU-CS-90-119,School of Computer Science, Carnegie MellonUniv., Pittsburgh, PA.

—. 1990b. Concurrent, atomic garbage collec-tion. Position paper. ECOOP/OOPSLA ’90Workshop on Garbage Collection.

—. 1991. Concurrent, atomic garbage collec-tion. Ph.D. thesis, Tech. Rep. CMU-CS-90-177, Dept. of Computer Science, CarnegieMellon Univ., Pittsburgh, PA.

DEMERS, A., WEISER, M., HAYES, B., BOEHM, H.,BOBROW, D., AND SHENKER, S. 1990. Combin-ing generational and conservative garbage col-lection: framework and implementations. InProceedings of the ACM Symposium on Princi-ples of Programming Languages, 261–269.

DETREVILLE, J. 1990. Experience with garbagecollection for Modula-21 in the Topaz envi-ronment. In Proceedings of the ECOOP/OOPSLA ’90 Workshop on Garbage Collection,position paper.

DEUTSCH, L. P. 1983. The Dorado Smalltalk-80implementation: Hardware architecture’s im-pact on software architecture. In Smalltalk-80: Bits of History, Words of Advice, Addison-Wesley, Reading, MA, 113–125.

DEUTSCH, L. P. AND BOBROW, D. G. 1976. Anefficient, incremental, automatic garbage col-lector. Commun. ACM 19, 9, 522–526.

DICKMAN, P. 1991. Distributed object manage-ment in a non-small graph of autonomousnetworks with few failures. Ph.D. thesis, Uni-versity of Cambridge.

DIJKSTRA, E. W. AND SCHOLTEN, C. S. 1989.Termination detection for diffusing computa-tions. Inf. Process. Lett., 11.

DIJKSTRA, E. W., LAMPORT, L., MARTIN, A. J., ANDSTEFFENS, E. F. M. 1978. On-the-fly gar-bage collection: An exercise in cooperation.Commun. ACM 21, 11, 966–975.

DOLEY, D., DWORK, C., AND STOCKMEYER, L. 1987.On the minimal synchronism needed for dis-tributed consensus. J. ACM 34, 1, 77–97.

EDELSON, D. AND POHL, I. 1990. The case forgarbage collector in C11. In Proceedings ofthe ECOOP/OOPSLA ’90 Workshop on Gar-bage Collection, position paper.

EL-HABBASH, A., HORN, C., AND HARRIS, M. 1990.Garbage collection in an object oriented,

distributed, persistent environment. In Pro-ceedings of the ECOOP/OOPSLA ’90 Work-shop on Garbage Collection, position paper.

FALCONE, J. R. AND STINGER, J. R. 1983. TheSmalltalk-80 implementation at Hewlett-Packard. In Smalltalk-80: Bits of History,Words of Advice, Addison-Wesley, Reading,MA, 79–112.

FENICHEL, R. R. AND YOCHELSON, J. C. 1969. ALISP garbage-collector for virtual-memorycomputer systems. Commun. ACM 12, 11,611–612.

FERREIRA, P. 1990. Storage reclamation. In Pro-ceedings of the ECOOP/OOPSLA ’90 Work-shop on Garbage Collection, position paper.

FERREIRA, P. AND SHAPIRO, M. 1994. Garbagecollection and DSM consistency. In Proceed-ings of the First Symposium on OperatingSystems Design and Implementation,229–241.

FISCHER, M. J., LYNCH, N. A., AND PATERSON,M. S. 1985. Impossibility of distributedconsensus with one faulty process. J. ACM 32,2, 374–382.

FISHER, D. A. 1974. Bounded workspace gar-bage collection in an address-order preservinglist processing environment. Inf. Process. Lett.3, 1, 29–32.

FODERARO, J. K. AND FATEMAN, R. J. 1981.Characterization of VAX Macsyma. In Pro-ceedings of the 1981 ACM Symposium onSymbolic and Algebraic Computation, 14–19.

FOWLER, R. J. 1986. The complexity of usingforwarding addresses for decentralized objectfinding. In Proceedings of the Fifth AnnualACM Symposium on Principles of DistributedComputing, 108–120.

FRIEDMAN, D. P. AND WISE, D. S. 1976. Garbagecollecting a heap which includes a scattertable. Inf. Process. Lett. 5, 6, 161–164.

FRIEDMAN, D. P. AND WISE, D. S. 1977. Theone-bit reference count. BIT 17, 351–359.

FRIEDMAN, D. P. AND WISE, D. S. 1979.Reference counting can manage the circularenvironments of mutual recursion. Inf. Pro-cess. Lett. 8, 1, 41–45.

FUCHS, M. 1995. Garbage collection on an opennetwork. In Memory Management, Proceed-

368 • S.E. Abdullahi and G.A. Ringwood

ACM Computing Surveys, Vol. 30, No. 3, September 1998

Page 40: Garbage Collecting the Internet: A Survey of Distributed

ings of the IWMM95, LNCS 986, H. G. Baker,Ed., Springer-Verlag, New York, 251–265.

GABRIEL, R. P. AND MANSINTER, L. M. 1982.Performance of Lisp systems. In Proceedingsof the ACM Symposium on Lisp and Func-tional Programming (Pittsburgh, PA, August15–18), 123–142.

GARNETT, N. H. AND NEEDHAM, R. M. 1980. Anasynchronous garbage collector for the Cam-bridge file server. Oper. Syst. Rev. 14, 4, 36–40.

GELERNTER, H., HANSEN, J. R., AND GERBERRICH,C. L. 1960. A FORTRAN-compiled list pro-cessing language. J. ACM 7, 2, 87–101.

GLASER, H. W. AND THOMPSON, P. 1985. Lazygarbage collection. Softw. Pract. Exper. 17, 1,1–4.

GOLDBERG, A. AND ROBSON, D. 1983. Smalltalk-80, The Language and its Implementation.Addison-Wesley, Reading, MA, 674–681.

GOLDBERG, B. 1989. Generational referencecounting: A reduced communication distrib-uted storage reclamation scheme. In Pro-gramming Languages Design and Implemen-tation, ACM SIGPLAN Not. 24, 313–321.

HANSEN, W. J. 1969. Compact list representa-tion: Definition, garbage collection, and sys-tem implementation. Commun. ACM 12, 9,499.

HAYES, B. 1990a. Open systems require conser-vative garbage collectors. In Proceedings ofthe ECOOP/OOPSLA ’90 Workshop on Gar-bage Collection, position paper.

—. 1990b. Using key object opportunism to col-lect old objects. OOPSLA ’91, ACM SIGPLANNot. 26, 11, 33–46.

HICKEY, T. AND COHEN, J. 1984. Performanceanalysis of on-the-fly garbage collection. Com-mun. ACM 27, 11, 341–367.

HOARE, C. A. R. 1974. Optimization of storesize for garbage collection. Inf. Process. Lett.2, 6, 165–166.

HUDAK, P. 1982. Object and task reclamationin distributed applicative processing systems.Ph.D. Thesis, University of Utah.

—. 1986. A semantic model of reference count-ing and its abstraction (detailed summary). InProceedings of the 1986 ACM Conference onLisp and Functional Programming (MIT),351–363.

HUDAK, P. AND KELLER, R. M. 1982. Garbagecollection and task deletion in distributed ap-plicative processing systems. In Proceedingsof the ACM Symposium on Lisp and Func-tional Programming (Pittsburgh, PA, Au-gust), 168–178.

HUDSON, R. AND DIWAN, A. 1990. Adaptive gar-bage collection for Modula-3 and Smalltalk. InProceedings of the ECOOP/OOPSLA ’90Workshop on Garbage Collection, position pa-per.

HUGHES, J. 1984. Reference counting with cir-

cular structures in virtual memory, applica-tive systems. Tech. Rep., Programming Re-search Group, Oxford University.

—. 1985. A distributed garbage collection algo-rithm. In Functional Programming Lan-guages and Computer Architecture, LNCS201, Springer-Verlag, New York, 256–272.

INMOS LIMITED 1984. Occam ProgrammingManual, Prentice-Hall, Englewood Cliffs, NJ.

JOHNSON, D. 1991. The case for a real barrier.ACM SIGPLAN Not. 26, 4, 279–281.

JONES, R. E. 1996. http://www.ukc.ac.uk/com-puter_science/Html/Jones/gc.html.

JONES, R. E. AND LINS, R. D. 1992. Cyclicweighted reference counting without delay.Tech. Rep. TR 28-92, UKC Computing Lab,University of Kent at Canterbury.

JONES, R. E. AND LINS, R. D. 1993. Cyclicweighted reference counting without delay. InProceedings of PARLE’93—Parallel Architec-tures and Languages Europe, LNCS 694,Springer-Verlag, New York, 712–715.

JONES, R. E. AND LINS, R. D. 1996. GarbageCollection: Algorithms for Automatic DynamicMemory Management. Wiley, New York.

JONKERS, H. B. M. 1979. A fast garbage com-paction algorithm. Inf. Process. Lett. 9, 1, 26–30.

JUL, E., LEVY, H., HUTCHINSON, N., AND BLACK,A. 1988. Fine-grained mobility in the Em-erald system. ACM Trans. Comput. Syst. 6, 1,109–133.

JUUL, N. C. 1990. Report. In Proceedings of theECOOP/OOPSLA ’90 Workshop on GarbageCollection in Object-Oriented Systems.

JUUL, N. C. AND JUL, E. 1992. Comprehensiveand robust garbage collection in a distributedsystem. In Proceedings of the InternationalWorkshop on Memory Management (St. Malo,France), LNCS 637, Springer-Verlag, NewYork, 103–115.

KAFURA, D., WASHABAUGH, D., AND NELSON,J. 1990. Garbage collection of actors. InECOOP/OOPSLA ’90 Proceedings of Work-shop on Garbage Collection, 126–134.

KAIN, R. Y. 1969. Block structures, indirect ad-dressing and garbage collection. Commun.ACM 12, 7, 395–398.

KNOWLTON, K. C. 1965. A fast storage allocator.Commun. ACM 8, 10, 623–625.

KNUTH, D. E. 1973. The Art of Computer Pro-gramming; Vol 1: Fundamental Algorithms.Addison-Wesley, Reading, MA.

KOLODNER, E. 1991. Atomic incremental gar-bage collection and recovery for large stableheap, implementing persistent object bases:Principles and practice. In Proceedings of theFourth International Workshop on PersistentObject Systems, Morgan-Kaufmann, San Ma-teo, CA.

Garbage Collecting the Internet • 369

ACM Computing Surveys, Vol. 30, No. 3, September 1998

Page 41: Garbage Collecting the Internet: A Survey of Distributed

KOLODNER, E., LISKOV, B., AND WEIHL, W. 1989.Atomic garbage collection: Managing a stableheap. In Proceedings of the 1989 ACM SIG-MOD International Conference on the Man-agement of Data, 15–25.

KRASNER, G., ED. 1983. Smalltalk-80: Bits ofHistory, Words of Advice, Addison-Wesley,Reading, MA.

LADIN, R. AND LISKOV, B. 1992. Garbage collec-tion of a distributed heap. In Proceedings ofthe International Conference on DistributedComputing Systems, 708–715.

LAMB, C., LANDIS, G., ORENSTEIN, J., AND WEINREB,D. 1991. The Object Store database sys-tem. Commun. ACM 34, 10, 50–63.

LAMPORT, L. 1978. Time, clocks and the order-ing of events in a distributed system. Com-mun. ACM 21, 7, 558–565.

LANG, B. AND DUPONT, F. 1987. Incremental in-crementally compacting garbage collection. InSIGPLAN ’87—Symposium on Interpretersand Interpretive Techniques, 253–263.

LANG, B., QUEINNEC, C., AND PIQUER, J. 1992.Garbage collecting the world. In Proceedingsof the Nineteenth Annual ACM SIGPLAN-SIGACT Symposium on Principles of Pro-gramming Languages (POPL ’92).

LERMEN, C. W. AND MAURER, D. 1986. A proto-col for distributed reference counting. In Pro-ceedings of the 1986 ACM Conference on Lispand Functional Programming (MIT),343–350.

LI, K. 1988. Real-time concurrent collection inuser mode. In Proceedings of the ECOOP/OOPSLA ’90 Workshop on Garbage Collection.

LI, K., APPEL, A. W., AND ELLIS, J. R. 1988.Real-time concurrent collection on stock mul-tiprocessors. In Proceedings of the ACM SIG-PLAN ’88 Conference on Programming Lan-guage Design and Implementation, 11–20.

LIEBERMAN, H. AND HEWITT, C. 1983. A real-time garbage collector based on the lifetimesof objects. Commun. ACM 26, 6, 419–429.

LINDSTROM, G. 1974. Copying list structures us-ing bounded workspace. Commun. ACM 17, 4,198–202.

LINS, R. D. 1992a. Cyclic reference countingwith lazy mark-scan. Inf. Process. Lett. 44,215–220.

—. 1992b. Generational cyclic reference count-ing. Tech. Rep. TR 22-92 UKC ComputingLab, University of Kent at Canterbury.

LINS, R. D. AND VASQUES, M. A. 1991. A com-parative study of algorithms for cyclic refer-ence counting. TR 92 UKC Computing Lab,University of Kent at Canterbury, August.

LINS, R. D. AND JONES, R. E. 1991. Cyclicweighted reference counting. TR 95, UKCComputing Lab. Tech. Rep., University ofKent at Canterbury, December.

LISKOV, B. AND LADIN, R. 1986. Highly-avail-

able distributed services and fault-tolerantdistributed garbage collection. In Proceedingsof the Fifth Symposium on the Principles ofDistributed Computing, ACM, New York, 29–39.

MARTIN, J. J. 1982. An efficient garbage com-paction algorithm. Commun. ACM 25, 8, 571–581.

MARTINER, A. D., WACHENCHAUZER, R., AND LINS,R. D. 1990. Cyclic reference counting withlocal mark-scan. Inf. Process. Lett. 34, 31–35.

MARTINEZ, A. D., WACHENCHAUER, R., AND LINS,R. D. 1990. Cyclic reference counting withlocal mark-scan. Inf. Process. Lett. 34, 31–35.

MCCARTHY, J. 1960. Recursive functions ofsymbolic expressions and their computationby machine: Part I. Commun. ACM 3, 4, 184–195.

—. 1981. History of Lisp. In History of Pro-gramming Languages, R. L. Wexelblat, Ed.,Academic Press, 173–183.

MCCULLOUGH, P. L. 1983. Implementing theSmalltalk-80 system: The Tektronix experi-ence. In Smalltalk-80: Bits of History, Wordsof Advice, Addison-Wesley, Reading, MA, 59–78.

MEYERS, R. AND CASSERES, D. 1983. AnMC68000-based Smalltalk-80 system. InSmalltalk-80: Bits of History, Words of Ad-vice, Addison-Wesley, Reading, MA, 175–187.

MIRANDA, E. 1987. BrouHaHa—a portableSmalltalk interpreter. OOPSLA ’87, ACMSIGPLAN Not. 22, 12, 354–365.

MOHAMMED-ALI, K. A. 1984a,b,c. Object-ori-ented storage management and garbage col-lection in distributed processing systems. Ac-ademic Dissertation, Royal Institute ofTechnology, Dept. of Computer Systems,Stockholm, Sweden.

MOON, D. 1984. Garbage collection in a largeLisp system. In Proceedings of the 1984 ACMSymposium on Lisp and Functional Program-ming, 235–246.

MORRIS, F. L. 1978. A time- and space-efficientgarbage compaction algorithm. Commun.ACM 21, 8, 662–665.

—. 1979. On a comparison of garbage collectiontechniques. Commun. ACM 22, 10, 571.

MOSS, J. E. B. 1990. Garbage collecting persis-tent object stores. In Proceedings of theECOOP/OOPSLA ’90 Workshop on GarbageCollection, position paper.

NEWELL, A. AND TONGE, F. M. 1960. An intro-duction to IPL-V. Commun. ACM 3, 205–211.

NEWMAN, I. A. AND WOODWARD, M. C. 1982.Alternative approaches to multiprocessor gar-bage collection. In Proceedings of the 1982International Conference on Parallel Process-ing (Ohio State University, Columbus, OH,August), 205–210.

NEWMAN, I. A., STALLARD, R. P., AND WOODWARD,

370 • S.E. Abdullahi and G.A. Ringwood

ACM Computing Surveys, Vol. 30, No. 3, September 1998

Page 42: Garbage Collecting the Internet: A Survey of Distributed

M. C. 1982. Performance of parallel gar-bage collection algorithms. Comput. Stud. 166(Sept.).

NILSEN, K. 1988. Garbage collection of stringsand linked data structures in real time.Softw. Pract. Exper. 18, 7, 613–640.

NILSEN, K. AND SCHMIDT, W. J. 1990. Hardwaresupport for garbage collection of linked ob-jects and arrays in real time. In Proceedingsof the ECOOP/OOPSLA ’90 Workshop onGarbage Collection, position paper.

NORI, A. K. 1979. A storage reclamationscheme for applicative multiprocessor sys-tems. Masters Thesis, Department of Com-puter Science, University of Utah.

NORTH, S. C. AND REPPY, J. H. 1987. Concur-rent garbage collection on stock hardware. InFunctional Programming Languages andComputer Architecture, LNCS 274, Springer-Verlag, New York, 113–133.

OZAWA, T., HOSOI, A., AND HATTORI, A. 1990.Generation type garbage collection for paral-lel logic languages. NACLP, MIT Press, Cam-bridge, MA, 291–305.

PARC-PLACE 1991. Objectworks/Smalltalk Re-lease 4 User’s Guide. Memory Management,229–237.

PETERSON, L. L. AND DAVIE, B. S. 1996.Computer Networks: A Systems Approach.Morgan-Kaufmann, San Mateo, CA.

PEYTON-JONES, S. L. 1987. The Implementationof Functional Programming Languages. Pren-tice-Hall, Englewood Cliffs, NJ.

PIQUER, J. M. 1991. Indirect reference count-ing: A distributed garbage collection algo-rithm. In Proceedings of PARLE ’91—ParallelArchitectures and Languages Europe, LNCS505, Springer-Verlag, New York, 150–165.

—. 1995. Indirect mark and sweep. In MemoryManagement, Proceedings of IWMM95, H. G.Baker, Ed., LNCS 986, Springer-Verlag, NewYork, 268–282.

PLAINFOSSE, D. 1994. Distributed garbage col-lection and reference management in the Soulobject support system. Ph.D. Thesis, Univer-site Paris.

PLAINFOSSE, D. AND SHAPIRO, M. 1992. Experi-ence with fault-tolerant garbage collection ina distributed Lisp system. In Proceedings ofthe International Workshop on Memory Man-agement (St. Malo, France), LNCS 637,Springer-Verlag, New York, 116–133.

PLAINFOSSE, D. AND SHAPIRO, M. 1995. A surveyof distributed garbage collection techniques.In Proceedings of the International Workshopon Memory Management (Kinross, UK), LNCS986, Springer-Verlag, New York, 211–249.

QUEINNEC, C., BEAUDOING, B., AND QUEILLE,J. 1989. Mark DURING sweep rather thanmark THEN sweep. In Proceedings of PARLE’89—Parallel Architectures and Languages

Europe, LNCS 365, Springer-Verlag, NewYork.

RANA, S. P. 1983. A distributed solution to thedistributed termination problem. Inf. Process.Lett. 17, 43–46.

ROSENBLUM, M. AND OUSTERHOUT, J. K. 1992.The design and implementation of a log-struc-tured file system. ACM Trans. Comput. Syst.10, 1, 26–52.

RUDALICS, M. 1986. Distributed copying gar-bage collection. In Proceedings of the 1986ACM Conference on Lisp and Functional Pro-gramming, MIT, Cambridge, MA, 364–372.

—. 1990. Correctness of distributed garbagecollection algorithms. TR 90-40.0, JohannesKepler Universitat, Linz.

SCHELVIS, M. 1989. Incremental distribution oftimestamp packets: A new approach to dis-tributed garbage collection. OOPSLA ’89,ACM SIGPLAN Not. 24, 10, 37–48.

SCHELVIS, M. AND BLEDOEG, E. 1988. The imple-mentation of a distributed Smalltalk. InECOOP Proceedings (August), LNCS 322,Springer-Verlag, New York, 212–232.

SCHORR, H. AND WAITE, W. M. 1967. An effi-cient machine-independent procedure for gar-bage collection in various list structures.Commun. ACM 10, 8, 501–506.

SHAPIRO, M., DICKMAN, P., AND PLAINFOSSE, D.1992a. Robust, distributed references andacyclic garbage collection. In ACM Sympo-sium on Principles of Distributed Computing(Vancouver).

SHAPIRO, M., DICKMAN, P., AND PLAINFOSSE,D. 1992b. SSP chains: Robust, distributedreferences and acyclic garbage collection.Tech. Rep. TR INRIA.

SHAPIRO, M., PLAINFOSSE, D., AND GRUBER, O.1990. A garbage detection protocol for a re-alistic distributed object-support system.Tech. Rep. TR INRIA 1320.

SHAPIRO, M., PLAINFOSSE, D., FERREIRA, P., AND

AMSALEG, L. 1994. Some key issues in thedesign of distributed garbage collection andreferences. Tech. Rep. TR INRIA.

SHARMA, R. AND SOFFA, M. L. 1991. Parallelgenerational garbage collection. OOPSLA 91,ACM SIGPLAN Not. 26, 11, 16–32.

SHAW, R. A. 1987. Empirical analysis of a Lispsystem. Ph.D. Thesis, Stanford University,Stanford, CA. February, 1988.

STANDISH, T. A. 1980. Data Structures Tech-niques. Addison-Wesley, Reading, MA.

STEELE, G. L. 1975. Multiprocessing compacti-fying garbage collection. Commun. ACM 18, 9,495–508.

STEENKISTE, P. 1987. Lisp on a reduced-instruc-tion-set processor: Characterization and opti-mization. Ph.D. Dissertation. TR CSL-TR-87-324, Stanford University, March.

Garbage Collecting the Internet • 371

ACM Computing Surveys, Vol. 30, No. 3, September 1998

Page 43: Garbage Collecting the Internet: A Survey of Distributed

SUN 1997. [http://java.sun.com/products/jdk/1.1/docs/guide/rmi/index.html.

TANENBAUM, A. S. 1989. Computer Networks.Prentice-Hall, Englewood Cliffs, NJ.

TEL, G. AND MATTERN, F. 1993. The derivationof distributed termination detection algo-rithms from garbage collection schemes. ACMTrans. Program. Lang. Syst. 15, 1, 1–35.

TERESHIMA, M. AND GOTO, E. 1978. Genetic or-der and compactifying garbage collector. Inf.Process. Lett. 7, 1, 27–32.

TICK, E. 1988. Memory Performance of PrologArchitectures. Kluwer, Norwell, MA.

TUCK, B. 1990. OSI and Library Services. Li-brary and Information Briefings, Universityof Westminster.

UNGAR, D. M. 1984. Generation scavenging: Anon-disruptive high performance storage rec-lamation algorithm. In Proceedings of theACM SIGSOFT/SIGPLAN Software Engi-neering Symposium on Practical Software De-velopment Environments (April), 157–167.

—. 1987. The Design and Evaluation of a HighPerformance Smalltalk System. An ACM Dis-tinguished Dissertation 1986, MIT Press,Cambridge, MA.

UNGAR, D. M. AND JACKSON, F. 1988. Tenuringpolicies for generation-based storage reclama-tion. OOPSLA ’88 ACM SIGPLAN Not. 23, 11,1–17.

UNGAR, D. M. AND JACKSON, F. 1992. An adap-tive tenuring policy for generation scaven-gers. ACM Trans. Program. Lang. Syst. 14, 1,1–27.

UNGAR, D. M. AND PATTERSON, D. A. 1983.Berkeley Smalltalk: Who knows where thetime goes? In Smalltalk-80: Bits of History,Words of Advice, Addison-Wesley, Reading,MA, 189–206.

VESTAL, S. C. 1987. Garbage collection: An ex-ercise in distributed, fault-tolerant program-ming. Ph.D. Thesis, Department of ComputerScience, University of Washington, Seattle,WA, January.

WADLER, P. L. 1976. Analysis of an algorithmfor real-time garbage collection. Commun.ACM 19, 9, 491–500.

WATSON, I. 1986. An analysis of garbage collec-tion for distributed systems. TR Departmentof Computer Science, University of Manches-ter.

WATSON, P. AND WATSON, I. 1987. An efficientgarbage collection scheme for parallel com-puter architecture. In Proceedings of PARLE’87—Parallel Architectures and LanguagesEurope, LNCS 259, Springer, 432–443.

WEGBREIT, B. 1972. A generalized compactinggarbage collector. Comput. J. 15, 3, 204–208.

WEIZENBAUM, J. 1962. Knotted list structures.Commun. ACM 5, 3, 161–165.

—. 1963. Symmetric list processor. Commun.ACM 6, 9, 524–544.

WENG, J. 1979. An abstract implementation fora generalized data-flow language. TR MIT/LCS/228, MIT Laboratory for Computer Sci-ence.

WHITE, J. L. 1980. Address/memory manage-ment for a gigantic Lisp environment or GCconsidered harmful. In Record of the 1980Lisp Conference, 119–127.

WILSON, P. R. 1990. Some issues and strategiesin heap management and memory hierar-chies. In Proceedings of the ECOOP/OOPSLA’90 Workshop on Garbage Collection, positionpaper.

—. 1992. Uniprocessor garbage collection tech-niques. In Proceedings of the InternationalWorkshop on Memory Management (St. Malo,France), LNCS 637, Springer-Verlag, NewYork, 1–42.

WILSON, P. R. AND MOHER, T. G. 1989. Design ofthe opportunistic garbage collector. OOPSLA’89, ACM SIGPLAN Not. 24, 10, 23–35.

WILSON, P. R., JOHNSTONE, M. S., NEELY, M., ANDBOLES, D. 1995. Dynamic storage alloca-tion: A survey and critical review. In Proceed-ings of the International Workshop on MemoryManagement (Kinross, UK), LNCS 986,Springer-Verlag, New York, 1–116.

WILSON, P. R., LAM, M. S., AND MOHER, T. G.1990. Caching considerations for genera-tional garbage collection: A case for large andset-associative caches. TR UIC-EECS-90-5,December.

WILSON, P. R., LAM, M. S., AND MOHER, T. G.1991. Effective “static-graph” reorganizationto improve locality in garbage-collected sys-tems. In Proceedings of the ACM SIGPLAN’91 Conference on Programming Language De-sign and Implementation (Toronto), 177–191.

WOLCZKO, M. AND WILLIAMS, I. 1990. Garbagecollection in high-performance system. In Pro-ceedings of the ECOOP/OOPSLA ’90 Work-shop on Garbage Collection, position paper.

WOODWARD, M. C. 1981. Multiprocessor gar-bage collection—a new solution. Comput.Stud. 115.

ZAVE, D. A. 1975. A fast compacting garbagecollector. Inf. Process. Lett. 3, 167–169.

ZORN, B. 1989. Comparative performance eval-uation of garbage collection algorithms. Ph.D.Thesis, EECS Department, University of Cal-ifornia, Berkeley.

—. 1990. Designing systems for evaluation: Acase study of garbage collection. In Proceed-ings of the ECOOP/OOPSLA ’90 Workshop onGarbage Collection, position paper.

—. 1992a. The measured cost of conservativegarbage collection. TR CU-CS-573-92. Depart-ment of Computer Science, University of Col-orado, Boulder, April.

372 • S.E. Abdullahi and G.A. Ringwood

ACM Computing Surveys, Vol. 30, No. 3, September 1998

Page 44: Garbage Collecting the Internet: A Survey of Distributed

—. 1992b. Evaluating models of memory allo-cation. TR CU-CS-603-92, Department ofComputer Science, University of Colorado,Boulder, July.

ZORN, B. AND GRUNWALD, D. 1992. Empiricalmeasurements of six allocation-intensive C

programs. ACM SIGPLAN Not. 27, 12 (Dec.),71–80.

ZORN, B. AND HILFINGER, P. 1988. A memoryallocation profiler for C and Lisp programs. InProceedings of Summer 1988 USENIX Confer-ence (San Francisco, June).

Received March 1996; revised November 1997; accepted November 1997

Garbage Collecting the Internet • 373

ACM Computing Surveys, Vol. 30, No. 3, September 1998