Garbage Collection Introduction and Overview Christian Schulte Programming Systems Lab Universität...
-
Upload
william-fletcher -
Category
Documents
-
view
216 -
download
0
Transcript of Garbage Collection Introduction and Overview Christian Schulte Programming Systems Lab Universität...
![Page 1: Garbage Collection Introduction and Overview Christian Schulte Programming Systems Lab Universität des Saarlandes, Germany schulte@ps.uni-sb.de.](https://reader031.fdocuments.net/reader031/viewer/2022013100/55142f33550346dd488b5ee4/html5/thumbnails/1.jpg)
Garbage CollectionIntroduction and Overview
Christian SchulteProgramming Systems Lab
Universität des Saarlandes, Germany
![Page 2: Garbage Collection Introduction and Overview Christian Schulte Programming Systems Lab Universität des Saarlandes, Germany schulte@ps.uni-sb.de.](https://reader031.fdocuments.net/reader031/viewer/2022013100/55142f33550346dd488b5ee4/html5/thumbnails/2.jpg)
Purpose of Talk
Explaining basic concepts terminology
Garbage collection… …is simple …can be explained at a high-level
Organization
![Page 3: Garbage Collection Introduction and Overview Christian Schulte Programming Systems Lab Universität des Saarlandes, Germany schulte@ps.uni-sb.de.](https://reader031.fdocuments.net/reader031/viewer/2022013100/55142f33550346dd488b5ee4/html5/thumbnails/3.jpg)
Purpose of Talk
Explaining basic concepts terminology
(never to be explained again) Garbage collection…
…is simple …can be explained at a high-level
Organization
![Page 4: Garbage Collection Introduction and Overview Christian Schulte Programming Systems Lab Universität des Saarlandes, Germany schulte@ps.uni-sb.de.](https://reader031.fdocuments.net/reader031/viewer/2022013100/55142f33550346dd488b5ee4/html5/thumbnails/4.jpg)
Overview
What is garbage collection objects of interest principal notions classic examples with assumptions and properties
Discussion software engineering issues typical cost areas of usage why knowledge is profitable
Organizational Material Requirements
![Page 5: Garbage Collection Introduction and Overview Christian Schulte Programming Systems Lab Universität des Saarlandes, Germany schulte@ps.uni-sb.de.](https://reader031.fdocuments.net/reader031/viewer/2022013100/55142f33550346dd488b5ee4/html5/thumbnails/5.jpg)
Overview
What is garbage collection objects of interest principal notions classic examples with assumptions and properties
Discussion software engineering issues typical cost areas of usage why knowledge is profitable
Organizational Material Requirements
![Page 6: Garbage Collection Introduction and Overview Christian Schulte Programming Systems Lab Universität des Saarlandes, Germany schulte@ps.uni-sb.de.](https://reader031.fdocuments.net/reader031/viewer/2022013100/55142f33550346dd488b5ee4/html5/thumbnails/6.jpg)
Garbage Collection…
…is concerned with the automatic reclamation of dynamically allocated memory after its last use by a program
![Page 7: Garbage Collection Introduction and Overview Christian Schulte Programming Systems Lab Universität des Saarlandes, Germany schulte@ps.uni-sb.de.](https://reader031.fdocuments.net/reader031/viewer/2022013100/55142f33550346dd488b5ee4/html5/thumbnails/7.jpg)
Garbage Collection…
dynamically allocated memory
…is concerned with the automatic reclamation of dynamically allocated memory after its last use by a program
![Page 8: Garbage Collection Introduction and Overview Christian Schulte Programming Systems Lab Universität des Saarlandes, Germany schulte@ps.uni-sb.de.](https://reader031.fdocuments.net/reader031/viewer/2022013100/55142f33550346dd488b5ee4/html5/thumbnails/8.jpg)
Garbage Collection…
dynamically allocated memory last use by a program
…is concerned with the automatic reclamation of dynamically allocated memory after its last use by a program
![Page 9: Garbage Collection Introduction and Overview Christian Schulte Programming Systems Lab Universität des Saarlandes, Germany schulte@ps.uni-sb.de.](https://reader031.fdocuments.net/reader031/viewer/2022013100/55142f33550346dd488b5ee4/html5/thumbnails/9.jpg)
Garbage Collection…
dynamically allocated memory last use by a program automatic reclamation
…is concerned with the automatic reclamation of dynamically allocated memory after its last use by a program
![Page 10: Garbage Collection Introduction and Overview Christian Schulte Programming Systems Lab Universität des Saarlandes, Germany schulte@ps.uni-sb.de.](https://reader031.fdocuments.net/reader031/viewer/2022013100/55142f33550346dd488b5ee4/html5/thumbnails/10.jpg)
Garbage collection…
Dynamically allocated memory Last use by a program Examples for automatic reclamation
![Page 11: Garbage Collection Introduction and Overview Christian Schulte Programming Systems Lab Universität des Saarlandes, Germany schulte@ps.uni-sb.de.](https://reader031.fdocuments.net/reader031/viewer/2022013100/55142f33550346dd488b5ee4/html5/thumbnails/11.jpg)
Kinds of Memory Allocation
static int i;
void foo(void) {
int j;
int* p = (int*) malloc(…);
}
![Page 12: Garbage Collection Introduction and Overview Christian Schulte Programming Systems Lab Universität des Saarlandes, Germany schulte@ps.uni-sb.de.](https://reader031.fdocuments.net/reader031/viewer/2022013100/55142f33550346dd488b5ee4/html5/thumbnails/12.jpg)
Static Allocation
By compiler (in text area) Available through entire runtime Fixed size
static int i;
void foo(void) {
int j;
int* p = (int*) malloc(…);
}
![Page 13: Garbage Collection Introduction and Overview Christian Schulte Programming Systems Lab Universität des Saarlandes, Germany schulte@ps.uni-sb.de.](https://reader031.fdocuments.net/reader031/viewer/2022013100/55142f33550346dd488b5ee4/html5/thumbnails/13.jpg)
Automatic Allocation
Upon procedure call (on stack) Available during execution of call Fixed size
static int i;
void foo(void) {
int j;
int* p = (int*) malloc(…);
}
![Page 14: Garbage Collection Introduction and Overview Christian Schulte Programming Systems Lab Universität des Saarlandes, Germany schulte@ps.uni-sb.de.](https://reader031.fdocuments.net/reader031/viewer/2022013100/55142f33550346dd488b5ee4/html5/thumbnails/14.jpg)
Dynamic Allocation
Dynamically allocated at runtime (on heap) Available until explicitly deallocated Dynamically varying size
static int i;
void foo(void) {
int j;
int* p = (int*) malloc(…);
}
![Page 15: Garbage Collection Introduction and Overview Christian Schulte Programming Systems Lab Universität des Saarlandes, Germany schulte@ps.uni-sb.de.](https://reader031.fdocuments.net/reader031/viewer/2022013100/55142f33550346dd488b5ee4/html5/thumbnails/15.jpg)
Dynamically Allocated Memory
Also: heap-allocated memory Allocation: malloc, new, …
before first usage Deallocation: free, delete, dispose, …
after last usage Needed for
C++, Java: objects SML: datatypes, procedures anything that outlives procedure call
![Page 16: Garbage Collection Introduction and Overview Christian Schulte Programming Systems Lab Universität des Saarlandes, Germany schulte@ps.uni-sb.de.](https://reader031.fdocuments.net/reader031/viewer/2022013100/55142f33550346dd488b5ee4/html5/thumbnails/16.jpg)
Getting it Wrong
Forget to free (memory leak) program eventually runs out of memory long running programs: OSs. servers, …
Free to early (dangling pointer) lucky: illegal access detected by OS horror: memory reused, in simultaneous use
programs can behave arbitrarily crashes might happen much later
Estimates of effort Up to 40%! [Rovner, 1985]
![Page 17: Garbage Collection Introduction and Overview Christian Schulte Programming Systems Lab Universität des Saarlandes, Germany schulte@ps.uni-sb.de.](https://reader031.fdocuments.net/reader031/viewer/2022013100/55142f33550346dd488b5ee4/html5/thumbnails/17.jpg)
Nodes and Pointers
Node n Memory block, cell
Pointer p Link to node Node access: *p
Children children(n) set of pointers to nodes referred by n
n
p
![Page 18: Garbage Collection Introduction and Overview Christian Schulte Programming Systems Lab Universität des Saarlandes, Germany schulte@ps.uni-sb.de.](https://reader031.fdocuments.net/reader031/viewer/2022013100/55142f33550346dd488b5ee4/html5/thumbnails/18.jpg)
Mutator
Abstraction of program introduces new nodes with pointer redirects pointers, creating garbage
![Page 19: Garbage Collection Introduction and Overview Christian Schulte Programming Systems Lab Universität des Saarlandes, Germany schulte@ps.uni-sb.de.](https://reader031.fdocuments.net/reader031/viewer/2022013100/55142f33550346dd488b5ee4/html5/thumbnails/19.jpg)
Nodes referred to by several pointers Makes manual deallocation hard
local decision impossible respect other pointers to node
Cycles instance of sharing
Shared Nodes
![Page 20: Garbage Collection Introduction and Overview Christian Schulte Programming Systems Lab Universität des Saarlandes, Germany schulte@ps.uni-sb.de.](https://reader031.fdocuments.net/reader031/viewer/2022013100/55142f33550346dd488b5ee4/html5/thumbnails/20.jpg)
Garbage collection…
Dynamically allocated memory Last use by a program Examples for automatic reclamation
![Page 21: Garbage Collection Introduction and Overview Christian Schulte Programming Systems Lab Universität des Saarlandes, Germany schulte@ps.uni-sb.de.](https://reader031.fdocuments.net/reader031/viewer/2022013100/55142f33550346dd488b5ee4/html5/thumbnails/21.jpg)
Last Use by a Program
Question: When is node M not any longer used by program? Let P be any program not using M New program sketch:
Execute P; Use M; Hence:
M used P terminates We are doomed: halting problem!
So “last use” undecidable!
![Page 22: Garbage Collection Introduction and Overview Christian Schulte Programming Systems Lab Universität des Saarlandes, Germany schulte@ps.uni-sb.de.](https://reader031.fdocuments.net/reader031/viewer/2022013100/55142f33550346dd488b5ee4/html5/thumbnails/22.jpg)
Safe Approximation
Decidable and also simple What means safe?
only unused nodes freed What means approximation?
some unused nodes might not be freed Idea
nodes that can be accessed by mutator
![Page 23: Garbage Collection Introduction and Overview Christian Schulte Programming Systems Lab Universität des Saarlandes, Germany schulte@ps.uni-sb.de.](https://reader031.fdocuments.net/reader031/viewer/2022013100/55142f33550346dd488b5ee4/html5/thumbnails/23.jpg)
Reachable Nodes
Reachable from root set processor registers static variables automatic variables (stack)
Reachable from reachable nodes
roo
t
![Page 24: Garbage Collection Introduction and Overview Christian Schulte Programming Systems Lab Universität des Saarlandes, Germany schulte@ps.uni-sb.de.](https://reader031.fdocuments.net/reader031/viewer/2022013100/55142f33550346dd488b5ee4/html5/thumbnails/24.jpg)
Summary: Reachable Nodes
A node n is reachable, iff n is element of the root set, or n is element of children(m) and m is
reachable
Reachable node also called “live”
![Page 25: Garbage Collection Introduction and Overview Christian Schulte Programming Systems Lab Universität des Saarlandes, Germany schulte@ps.uni-sb.de.](https://reader031.fdocuments.net/reader031/viewer/2022013100/55142f33550346dd488b5ee4/html5/thumbnails/25.jpg)
MyGarbageCollector
Compute set of reachable nodes Free nodes known to be not reachable Known as mark-sweep
in a second…
![Page 26: Garbage Collection Introduction and Overview Christian Schulte Programming Systems Lab Universität des Saarlandes, Germany schulte@ps.uni-sb.de.](https://reader031.fdocuments.net/reader031/viewer/2022013100/55142f33550346dd488b5ee4/html5/thumbnails/26.jpg)
Reachability:Safe Approximation
Safe access to not reachable node impossible depends on language semantics but C/C++? later…
Approximation reachable node might never be accessed programmer must know about this! have you been aware of this?
![Page 27: Garbage Collection Introduction and Overview Christian Schulte Programming Systems Lab Universität des Saarlandes, Germany schulte@ps.uni-sb.de.](https://reader031.fdocuments.net/reader031/viewer/2022013100/55142f33550346dd488b5ee4/html5/thumbnails/27.jpg)
Garbage collection…
Dynamically allocated memory Last use by a program Examples for automatic reclamation
![Page 28: Garbage Collection Introduction and Overview Christian Schulte Programming Systems Lab Universität des Saarlandes, Germany schulte@ps.uni-sb.de.](https://reader031.fdocuments.net/reader031/viewer/2022013100/55142f33550346dd488b5ee4/html5/thumbnails/28.jpg)
Example Garbage Collectors
Mark-Sweep
Others Mark-Compact Reference Counting Copying
skipped here read Chapter 1&2 of [Lins&Jones,96]
![Page 29: Garbage Collection Introduction and Overview Christian Schulte Programming Systems Lab Universität des Saarlandes, Germany schulte@ps.uni-sb.de.](https://reader031.fdocuments.net/reader031/viewer/2022013100/55142f33550346dd488b5ee4/html5/thumbnails/29.jpg)
The Mark-Sweep Collector
Compute reachable nodes: Mark tracing garbage collector
Free not reachable nodes: Sweep Run when out of memory: Allocation First used with LISP [McCarthy, 1960]
![Page 30: Garbage Collection Introduction and Overview Christian Schulte Programming Systems Lab Universität des Saarlandes, Germany schulte@ps.uni-sb.de.](https://reader031.fdocuments.net/reader031/viewer/2022013100/55142f33550346dd488b5ee4/html5/thumbnails/30.jpg)
Allocation
node* new() {
if (free_pool is empty)
mark_sweep();
…
![Page 31: Garbage Collection Introduction and Overview Christian Schulte Programming Systems Lab Universität des Saarlandes, Germany schulte@ps.uni-sb.de.](https://reader031.fdocuments.net/reader031/viewer/2022013100/55142f33550346dd488b5ee4/html5/thumbnails/31.jpg)
Allocation
node* new() {
if (free_pool is empty)
mark_sweep();
return allocate();
}
![Page 32: Garbage Collection Introduction and Overview Christian Schulte Programming Systems Lab Universität des Saarlandes, Germany schulte@ps.uni-sb.de.](https://reader031.fdocuments.net/reader031/viewer/2022013100/55142f33550346dd488b5ee4/html5/thumbnails/32.jpg)
The Garbage Collector
void mark_sweep() {
for (r in roots)
mark(r);
…
![Page 33: Garbage Collection Introduction and Overview Christian Schulte Programming Systems Lab Universität des Saarlandes, Germany schulte@ps.uni-sb.de.](https://reader031.fdocuments.net/reader031/viewer/2022013100/55142f33550346dd488b5ee4/html5/thumbnails/33.jpg)
The Garbage Collector
void mark_sweep() {
for (r in roots)
mark(r);
…
all live nodes marked
![Page 34: Garbage Collection Introduction and Overview Christian Schulte Programming Systems Lab Universität des Saarlandes, Germany schulte@ps.uni-sb.de.](https://reader031.fdocuments.net/reader031/viewer/2022013100/55142f33550346dd488b5ee4/html5/thumbnails/34.jpg)
Recursive Marking
void mark(node* n) {
if (!is_marked(n)) {
set_mark(n);
…
}
}
![Page 35: Garbage Collection Introduction and Overview Christian Schulte Programming Systems Lab Universität des Saarlandes, Germany schulte@ps.uni-sb.de.](https://reader031.fdocuments.net/reader031/viewer/2022013100/55142f33550346dd488b5ee4/html5/thumbnails/35.jpg)
Recursive Marking
void mark(node* n) {
if (!is_marked(n)) {
set_mark(n);
…
}
}nodes reachable from n marked
![Page 36: Garbage Collection Introduction and Overview Christian Schulte Programming Systems Lab Universität des Saarlandes, Germany schulte@ps.uni-sb.de.](https://reader031.fdocuments.net/reader031/viewer/2022013100/55142f33550346dd488b5ee4/html5/thumbnails/36.jpg)
Recursive Marking
void mark(node* n) {
if (!is_marked(n)) {
set_mark(n);
for (m in children(n))
mark(m);
}
}i-th recursion: nodes on path with length i
marked
![Page 37: Garbage Collection Introduction and Overview Christian Schulte Programming Systems Lab Universität des Saarlandes, Germany schulte@ps.uni-sb.de.](https://reader031.fdocuments.net/reader031/viewer/2022013100/55142f33550346dd488b5ee4/html5/thumbnails/37.jpg)
The Garbage Collector
void mark_sweep() {
for (r in roots)
mark(r);
sweep();
…
![Page 38: Garbage Collection Introduction and Overview Christian Schulte Programming Systems Lab Universität des Saarlandes, Germany schulte@ps.uni-sb.de.](https://reader031.fdocuments.net/reader031/viewer/2022013100/55142f33550346dd488b5ee4/html5/thumbnails/38.jpg)
The Garbage Collector
void mark_sweep() {
for (r in roots)
mark(r);
sweep();
…
all nodes on heap live
![Page 39: Garbage Collection Introduction and Overview Christian Schulte Programming Systems Lab Universität des Saarlandes, Germany schulte@ps.uni-sb.de.](https://reader031.fdocuments.net/reader031/viewer/2022013100/55142f33550346dd488b5ee4/html5/thumbnails/39.jpg)
The Garbage Collector
void mark_sweep() {
for (r in roots)
mark(r);
sweep();
…
all nodes on heap live
and not marked
![Page 40: Garbage Collection Introduction and Overview Christian Schulte Programming Systems Lab Universität des Saarlandes, Germany schulte@ps.uni-sb.de.](https://reader031.fdocuments.net/reader031/viewer/2022013100/55142f33550346dd488b5ee4/html5/thumbnails/40.jpg)
Eager Sweep
void sweep() {
node* n = heap_bottom;
while (n < heap_top) {
…
}
}
![Page 41: Garbage Collection Introduction and Overview Christian Schulte Programming Systems Lab Universität des Saarlandes, Germany schulte@ps.uni-sb.de.](https://reader031.fdocuments.net/reader031/viewer/2022013100/55142f33550346dd488b5ee4/html5/thumbnails/41.jpg)
Eager Sweep
void sweep() {
node* n = heap_bottom;
while (n < heap_top) {
if (is_marked(n)) clear_mark(n);
else free(n);
n += sizeof(*n);
}
}
![Page 42: Garbage Collection Introduction and Overview Christian Schulte Programming Systems Lab Universität des Saarlandes, Germany schulte@ps.uni-sb.de.](https://reader031.fdocuments.net/reader031/viewer/2022013100/55142f33550346dd488b5ee4/html5/thumbnails/42.jpg)
The Garbage Collector
void mark_sweep() {
for (r in roots)
mark(r);
sweep();
if (free_pool is empty)
abort(“Memory exhausted”);
}
![Page 43: Garbage Collection Introduction and Overview Christian Schulte Programming Systems Lab Universität des Saarlandes, Germany schulte@ps.uni-sb.de.](https://reader031.fdocuments.net/reader031/viewer/2022013100/55142f33550346dd488b5ee4/html5/thumbnails/43.jpg)
Assumptions
Nodes can be marked Size of nodes known Heap contiguous Memory for recursion available Child fields known!
![Page 44: Garbage Collection Introduction and Overview Christian Schulte Programming Systems Lab Universität des Saarlandes, Germany schulte@ps.uni-sb.de.](https://reader031.fdocuments.net/reader031/viewer/2022013100/55142f33550346dd488b5ee4/html5/thumbnails/44.jpg)
Assumptions: Realistic
Nodes can be marked Size of nodes known Heap contiguous Memory for recursion available Child fields known
![Page 45: Garbage Collection Introduction and Overview Christian Schulte Programming Systems Lab Universität des Saarlandes, Germany schulte@ps.uni-sb.de.](https://reader031.fdocuments.net/reader031/viewer/2022013100/55142f33550346dd488b5ee4/html5/thumbnails/45.jpg)
Assumptions: Conservative
Nodes can be marked Size of nodes known Heap contiguous Memory for recursion available Child fields known
![Page 46: Garbage Collection Introduction and Overview Christian Schulte Programming Systems Lab Universität des Saarlandes, Germany schulte@ps.uni-sb.de.](https://reader031.fdocuments.net/reader031/viewer/2022013100/55142f33550346dd488b5ee4/html5/thumbnails/46.jpg)
Mark-Sweep Properties
Covers cycles and sharing Time depends on
live nodes (mark) live and garbage nodes (sweep)
Computation must be stopped non-interruptible stop/start collector long pause
Nodes remain unchanged (as not moved) Heap remains fragmented
![Page 47: Garbage Collection Introduction and Overview Christian Schulte Programming Systems Lab Universität des Saarlandes, Germany schulte@ps.uni-sb.de.](https://reader031.fdocuments.net/reader031/viewer/2022013100/55142f33550346dd488b5ee4/html5/thumbnails/47.jpg)
Variations of Mark-Sweep
In your talk…
![Page 48: Garbage Collection Introduction and Overview Christian Schulte Programming Systems Lab Universität des Saarlandes, Germany schulte@ps.uni-sb.de.](https://reader031.fdocuments.net/reader031/viewer/2022013100/55142f33550346dd488b5ee4/html5/thumbnails/48.jpg)
Implementation
In your talk…
![Page 49: Garbage Collection Introduction and Overview Christian Schulte Programming Systems Lab Universität des Saarlandes, Germany schulte@ps.uni-sb.de.](https://reader031.fdocuments.net/reader031/viewer/2022013100/55142f33550346dd488b5ee4/html5/thumbnails/49.jpg)
Efficiency Analysis
In your talk…
![Page 50: Garbage Collection Introduction and Overview Christian Schulte Programming Systems Lab Universität des Saarlandes, Germany schulte@ps.uni-sb.de.](https://reader031.fdocuments.net/reader031/viewer/2022013100/55142f33550346dd488b5ee4/html5/thumbnails/50.jpg)
Comparison
In your talk…
![Page 51: Garbage Collection Introduction and Overview Christian Schulte Programming Systems Lab Universität des Saarlandes, Germany schulte@ps.uni-sb.de.](https://reader031.fdocuments.net/reader031/viewer/2022013100/55142f33550346dd488b5ee4/html5/thumbnails/51.jpg)
Application
In your talk…
![Page 52: Garbage Collection Introduction and Overview Christian Schulte Programming Systems Lab Universität des Saarlandes, Germany schulte@ps.uni-sb.de.](https://reader031.fdocuments.net/reader031/viewer/2022013100/55142f33550346dd488b5ee4/html5/thumbnails/52.jpg)
Overview
What is garbage collection objects of interest principal invariant classic examples with assumptions and properties
Discussion software engineering issues typical cost areas of usage why knowledge is profitable
Organizational Material Requirements
![Page 53: Garbage Collection Introduction and Overview Christian Schulte Programming Systems Lab Universität des Saarlandes, Germany schulte@ps.uni-sb.de.](https://reader031.fdocuments.net/reader031/viewer/2022013100/55142f33550346dd488b5ee4/html5/thumbnails/53.jpg)
Software Engineering Issues
Design goal in SE: decompose systems in orthogonal components
Clashes with letting each component do its memory management
liveness is global property leads to “local leaks” lacking power of modern gc methods
![Page 54: Garbage Collection Introduction and Overview Christian Schulte Programming Systems Lab Universität des Saarlandes, Germany schulte@ps.uni-sb.de.](https://reader031.fdocuments.net/reader031/viewer/2022013100/55142f33550346dd488b5ee4/html5/thumbnails/54.jpg)
Typical Cost
Early systems (LISP)
up to 40% [Steele,75] [Gabriel,85] “garbage collection is expensive” myth
Well engineered system of today
10% of entire runtime [Wilson, 94]
![Page 55: Garbage Collection Introduction and Overview Christian Schulte Programming Systems Lab Universität des Saarlandes, Germany schulte@ps.uni-sb.de.](https://reader031.fdocuments.net/reader031/viewer/2022013100/55142f33550346dd488b5ee4/html5/thumbnails/55.jpg)
Areas of Usage
Programming languages and systems Java, C#, Smalltalk, … SML, Lisp, Scheme, Prolog, … Modula 3, Microsoft .NET
Extensions C, C++ (Conservative)
Other systems Adobe Photoshop Unix filesystem Many others in [Wilson, 1996]
![Page 56: Garbage Collection Introduction and Overview Christian Schulte Programming Systems Lab Universität des Saarlandes, Germany schulte@ps.uni-sb.de.](https://reader031.fdocuments.net/reader031/viewer/2022013100/55142f33550346dd488b5ee4/html5/thumbnails/56.jpg)
Understanding Garbage Collection: Benefits
Programming garbage collection programming systems operating systems
Understand systems with garbage collection (e.g. Java) memory requirements of programs performance aspects of programs interfacing with garbage collection (finalization)
![Page 57: Garbage Collection Introduction and Overview Christian Schulte Programming Systems Lab Universität des Saarlandes, Germany schulte@ps.uni-sb.de.](https://reader031.fdocuments.net/reader031/viewer/2022013100/55142f33550346dd488b5ee4/html5/thumbnails/57.jpg)
Overview
What is garbage collection objects of interest principal invariant classic examples with assumptions and properties
Discussion software engineering issues typical cost areas of usage why knowledge is profitable
Organizational Material Requirements
![Page 58: Garbage Collection Introduction and Overview Christian Schulte Programming Systems Lab Universität des Saarlandes, Germany schulte@ps.uni-sb.de.](https://reader031.fdocuments.net/reader031/viewer/2022013100/55142f33550346dd488b5ee4/html5/thumbnails/58.jpg)
Material
Garbage Collection. Richard Jones and Rafael Lins, John Wiley & Sons, 1996.
Uniprocessor garbage collection techniques. Paul R. Wilson, ACM Computing Surveys. To appear.
Extended version of IWMM 92, St. Malo.
![Page 59: Garbage Collection Introduction and Overview Christian Schulte Programming Systems Lab Universität des Saarlandes, Germany schulte@ps.uni-sb.de.](https://reader031.fdocuments.net/reader031/viewer/2022013100/55142f33550346dd488b5ee4/html5/thumbnails/59.jpg)
Organization
Requirements Talk
duration 45 min (excluding discussion) Attendance
including discussion Written summary
10 pages to be submitted in PDF until Mar 31st, 2002
Schedule weekly starting Nov 14th, 2001 next on Dec 5th, 2001
![Page 60: Garbage Collection Introduction and Overview Christian Schulte Programming Systems Lab Universität des Saarlandes, Germany schulte@ps.uni-sb.de.](https://reader031.fdocuments.net/reader031/viewer/2022013100/55142f33550346dd488b5ee4/html5/thumbnails/60.jpg)
Topics For You!
The classical methods Copying 1. [Brunklaus, Guido
Tack] Mark-Sweep 2. [Schulte, Hagen
Böhm] Mark-Compact 3. [Schulte, Jens Regenberg] Reference Counting 6. [Brunklaus, Regis Newo]
Advanced Generational 4. [Brunklaus, Mirko
Jerrentrup] Conservative (C/C++) 5. [Schulte, Stephan
Lesch] Incremental & Concurrent 7. [Brunklaus, Uwe Kern]
![Page 61: Garbage Collection Introduction and Overview Christian Schulte Programming Systems Lab Universität des Saarlandes, Germany schulte@ps.uni-sb.de.](https://reader031.fdocuments.net/reader031/viewer/2022013100/55142f33550346dd488b5ee4/html5/thumbnails/61.jpg)
Invariants
Only nodes with rc zero are freed RC always positive