21,870 research outputs found
Recommended from our members
Comparing Mostly-copying and Mark-sweep Conservative Collection
Many high-level language compilers generate C code and then invoke a C compiler for code generation. To date, most, of these compilers link the resulting code against a conservative mark-sweep garbage collector in order to reclaim unused memory. We introduce a new collector, MCC, based on an extension of mostly-copying collection.We analyze the various design decisions made in MCC and provide a performance comparison to the most widely used conservative mark-sweep collector (the Boehm-Demers-Weiser collector). Our results show that a good mostly-copying collector can outperform a mature highly-optimized mark-sweep collector when physical memory is large relative to the live data. A surprising result of our analysis is that cache behavior can have a greater impact on overall performance than either collector time or allocation time.Engineering and Applied Science
Using Low Level Linear Memory Management for Type-Preserving Mark-Sweep Garbage Collector
Efficient low-level systems such as garbage collectors need more control over memory than safe high-level languages usually provide. Due to this constraint, garbage collectors are typically written in unsafe languages such as C. A collector of this form usually resides as a trusted primitive runtime service outside the model of the programming language. The type safety of these languages depends on the assumption that the garbage collector will not violate any typing invariants. However, no realistic systems provide proof of this assumption. A garbage collector written in a strongly typed language can guarantee not only the safety of the garbage collector and the program being garbage collected (mutator), but also the interaction between the collector and the mutator. Removing the garbage collector from the trusted computing base has many additional benefits: Untrusted code could be given more control over memory management without sacrificing security. Low-level code such as device drivers could interface in a safe way with a garbage collector. For these and the growing prevalence of garbage collectors in the typical programming system necessitate a safe solution. Previous research by Wang et al introduced a safe copying collector based on regions, where the live graph structure of the heap is copied from an old region to a newer region. This paper seeks to improve the efficiency of type-preserving garbage collection with the introduction of a type-preserving mark and sweep garbage collector
Garbage Collector for PNtalk Objects
Tato práce se zabývá návrhem a implementací garbage collectoru pro virtuální stroj jazyka PNtalk. Jsou v ní popsány a zhodnoceny jednotlivé přístupy a konkrétní algoritmy pro automatickou správu paměti a detailne popsáno jejich využití v praktické implementaci pro vitruálne stroje PNtalku, které jsou implementovány v Smalltalku a C++. Práce uvádí čtyři rodiny algoritmů, a to rodiny mark-sweep, mark-compact, kopírovací algoritmy a počítání referencí. Nejprve jsou popsány sekvenční verze algoritmů, které zastavují běh hlavního programu (mutátoru), pak jsou uvedeny jejich paralelní a nakonec konkurentní verze, které běh mutátoru nezastavují. Práce též uvádí generační model garbage collectingu.Výsledkem práce je vypracování generačního garbage collectoru pro jazyk PNtalk, vypracování testů a na jejich zakladě odměření optimálních parametrů.This thesis deals with the designing of a garbage collector for the PNtalk virtual machine. It describes and rates the approaches and algorithms for an automatic memory management. Four algorithm families ale presented: mark-sweep, mark-compact, copying algorithms and reference counting. At first it describes sequential forms, that pauses running of the main program (mutator), then it describes parallel and concurent forms, that do not pauses the mutator. The thesis also presents generational model of garbage collecting. The following sections briefly introduces object orientated Petri nets. The result of this thesis is the design of the generational garbage collector for the PNtalk virtual machine.
A Library for Binary Decision Diagrams
Cieľom tejto práce je vytvoriť jednoducho použiteľnú knižnicu, ktorá bude poskytovať základné prostriedky pre manipuláciu booleovských funckií prostredníctvom šiestich rôznych variánt binárnych rozhodovacích diagramov - BDD, ZDD, CBDD, CZDD, TBDD a ESRBDD. Knižnica je implementovaná v ISO C, používa zatvorené hashovanie, referencovanie uzlov založené na indexoch, garbage collector na princípe mark and sweep algoritmu a vytváranie diagramov založené na depth-first prechode. Implementované varianty týchto diagramov boli porovnané na benchmarkoch a hoci optimálna voľba varianty závisí na riešenom probléme, vo všeobecnosti sa ako najlepšia voľba z pohľadu veľkosti výsledného grafu a zároveň CPU času ukázali TBDD.The aim of this thesis is to create an easy-to-use library that will provide the basic means for Boolean function manipulation based on six different variants of Binary Decision Diagrams - BDD, ZDD, CBDD, CZDD, TBDD, and ESRBDD. The library is implemented in the ISO C programming language, uses closed hashing, index-based node referencing, mark and sweep based garbage collector and diagram construction is based on classical depth-first traversal. The implemented variants of these diagrams were compared on benchmarks and although the optimal choice of decision diagram variant depends on given problem, in general TBDD proved to be the best choice in terms of the resulting graph size and also CPU time.
Automated Verification of Practical Garbage Collectors
Garbage collectors are notoriously hard to verify, due to their low-level
interaction with the underlying system and the general difficulty in reasoning
about reachability in graphs. Several papers have presented verified
collectors, but either the proofs were hand-written or the collectors were too
simplistic to use on practical applications. In this work, we present two
mechanically verified garbage collectors, both practical enough to use for
real-world C# benchmarks. The collectors and their associated allocators
consist of x86 assembly language instructions and macro instructions, annotated
with preconditions, postconditions, invariants, and assertions. We used the
Boogie verification generator and the Z3 automated theorem prover to verify
this assembly language code mechanically. We provide measurements comparing the
performance of the verified collector with that of the standard Bartok
collectors on off-the-shelf C# benchmarks, demonstrating their competitiveness
System Description for a Scalable, Fault-Tolerant, Distributed Garbage Collector
We describe an efficient and fault-tolerant algorithm for distributed cyclic
garbage collection. The algorithm imposes few requirements on the local
machines and allows for flexibility in the choice of local collector and
distributed acyclic garbage collector to use with it. We have emphasized
reducing the number and size of network messages without sacrificing the
promptness of collection throughout the algorithm. Our proposed collector is a
variant of back tracing to avoid extensive synchronization between machines. We
have added an explicit forward tracing stage to the standard back tracing stage
and designed a tuned heuristic to reduce the total amount of work done by the
collector. Of particular note is the development of fault-tolerant cooperation
between traces and a heuristic that aggressively reduces the set of suspect
objects.Comment: 47 pages, LaTe
A Cyclic Distributed Garbage Collector for Network Objects
This paper presents an algorithm for distributed garbage collection and outlines its implementation within the Network Objects system. The algorithm is based on a reference listing scheme, which is augmented by partial tracing in order to collect distributed garbage cycles. Processes may be dynamically organised into groups, according to appropriate heuristics, to reclaim distributed garbage cycles. The algorithm places no overhead on local collectors and suspends local mutators only briefly. Partial tracing of the distributed graph involves only objects thought to be part of a garbage cycle: no collaboration with other processes is required. The algorithm offers considerable flexibility, allowing expediency and fault-tolerance to be traded against completeness
Formal Derivation of Concurrent Garbage Collectors
Concurrent garbage collectors are notoriously difficult to implement
correctly. Previous approaches to the issue of producing correct collectors
have mainly been based on posit-and-prove verification or on the application of
domain-specific templates and transformations. We show how to derive the upper
reaches of a family of concurrent garbage collectors by refinement from a
formal specification, emphasizing the application of domain-independent design
theories and transformations. A key contribution is an extension to the
classical lattice-theoretic fixpoint theorems to account for the dynamics of
concurrent mutation and collection.Comment: 38 pages, 21 figures. The short version of this paper appeared in the
Proceedings of MPC 201
Garbage collection can be made real-time and verifiable
An efficient means of memory reclamation (also known as Garbage Collection) is essential for Machine Intelligence applications where dynamic storage allocation is desired or required. Solutions for real-time systems must introduce very small processing overhead and must also provide for the verification of the software in order to meet the application time budgets and to verify the correctness of the software. Garbage Collection (GC) techniques are proposed for symbolic processing systems which may simultaneously meet both real-time requirements and verification requirements. The proposed memory reclamation technique takes advantage of the strong points of both the earlier Mark and Sweep technique and the more recent Copy Collection approaches. At least one practical implementation of these new GC techniques has already been developed and tested on a very-high performance symbolic computing system. Complete GC processing of all generated garbage has been demonstrated to require as little as a few milliseconds to perform. This speed enables the effective operation of the GC function as either a background task or as an actual part of the application task itself
- …