Cowhide! MIT Daniel has developed the latest results of garbage collection algorithms in the field of real-time systems, compiled into a PDF manual for online sharing

Write in front

The benefits of garbage collection technology to programming are self-evident. It can fundamentally solve the memory management problems in the software development process and greatly improve development efficiency.

For developers, while enjoying the convenience brought by the garbage collection mechanism, have they ever thought about the secrets hidden behind it? When selecting technology, how to evaluate the possible impact of garbage collection on performance? Face programming How to configure and tune the various garbage collection-related parameters provided by the language?

Today, my friends are blessed. The editor specially brings you this secret book that starts from the garbage memory algorithm and has a deep grasp of the garbage algorithm technology implementation. I believe that through this article, developers can have a deeper understanding of garbage collection related issues, The working modes of different collectors. Let's take a look at this book written by MIT Daniel! ! !

Chapter 1: Introduction

  • 1.1 Explicit memory release
  • 1.2 Automatic dynamic memory management
  • 1.3 Comparison between garbage collection algorithms
  • 1.4 Performance disadvantages
  • 1.5 Experimental method

MIT Daniel shares the latest results of garbage collection algorithms in the field of real-time systems PDF manual

 

Chapter 1 begins with a discussion of why automatic memory management is needed, and briefly introduces methods for comparing different garbage collection strategies. The chapter concludes with an introduction to abstract notation and pseudo-code descriptions throughout the book.

Chapter 2: Marking-Cleaning and Recycling

  • 2.1 Mark-sweep algorithm
  • 2.2 Three-color abstraction
  • 2.3 Improved mark sweeping algorithm
  • 2.4 Bitmap mark
  • 2.5 Lazy cleaning
  • 2.6 Cache miss during the marking process
  • 2.7 issues to consider

MIT Daniel shares the latest results of garbage collection algorithms in the field of real-time systems PDF manual

 

Chapter 3: Marking-Sorting and Recycling

  • 3.1 Double pointer collation algorithm
  • 3.2 Lisp 2 algorithm
  • 3.3 Lead Sorting Algorithm
  • 3.4 Single traversal algorithm
  • 3.5 Issues to be considered

MIT Daniel shares the latest results of garbage collection algorithms in the field of real-time systems PDF manual

 

Chapter 4: Copy recycling

  • 4.1 Half area copy and recovery
  • 4.2 Traversal order and locality
  • 4.3 Issues to consider

MIT Daniel shares the latest results of garbage collection algorithms in the field of real-time systems PDF manual

 

Chapter 5: Reference Counting

  • 5.1 Advantages and disadvantages of reference counting algorithm
  • 5.2 Improve efficiency
  • 5.3 Delayed reference counting
  • 5.4 Combining reference counting
  • 5.5 Circular citation|use count
  • 5.6 Restricted domain citation|use count
  • 5.7 Issues to consider

MIT Daniel shares the latest results of garbage collection algorithms in the field of real-time systems PDF manual

 

Chapters 2-5 describe the four classic garbage collection algorithms in detail, which are mark-sweep algorithm, mark-sort algorithm, copy type collection algorithm, and reference counting algorithm. This article has conducted in-depth research on these recovery algorithms, and paid special attention to their implementation on modern hardware facilities.

Chapter 6: Comparison of Garbage Collectors

  • 6.1 Throughput
  • 6.2 Pause time
  • 6.3 Memory space
  • 6.4 Implementation of the collector
  • 6.5 Adaptive system
  • 6.6 Unified garbage collection theory

MIT Daniel shares the latest results of garbage collection algorithms in the field of real-time systems PDF manual

 

Chapter 6 deeply compares the recycling strategies and algorithms introduced in Chapters 2 to 5, and evaluates their respective advantages and disadvantages and their applicability in different situations.

Chapter 7: Memory Allocation

  • 7.1 Sequential distribution
  • 7.2 Free list allocation
  • 7.3 Memory fragmentation
  • 7.4 Partition adaptive allocation
  • 7.5 Combination of partition adaptive allocation and simple air-closed linked list allocation
  • 7.6 Other issues to consider
  • 7.7 Memory allocation in concurrent systems
  • 7.8 Issues to consider

MIT Daniel shares the latest results of garbage collection algorithms in the field of real-time systems PDF manual

 

The memory reclamation strategy also depends on the memory allocation strategy. Chapter 7 introduces a variety of different memory allocation techniques, and further explores the differences in allocation strategies between automatic garbage collection and explicit memory management.

Chapter 8: Division of Heap Memory

  • 8.1 Terminology
  • 8.2 Why partition
  • 8.3 How to partition
  • 8.4 When to partition

MIT Daniel shares the latest results of garbage collection algorithms in the field of real-time systems PDF manual

 

The first 7 chapters assume that all objects in the heap use the same management strategy, but according to many factors, this is not a good design strategy. Chapter 8 discusses why the heap needs to be divided into multiple different spaces, and how to manage these spaces.

Chapter 9: Generational Garbage Collection

  • 9.1 Example
  • 9.2 Time measurement
  • 9.3 Generational Hypothesis
  • 9.4 Generation and heap layout
  • 9.5 Multiple generations
  • 9.6 Age record
  • 9.7 Adaptation to program behavior
  • 9.8 Intergenerational pointers
  • 9.9 Space management
  • 9.10 Middle-aged priority recycling
  • 9.11 Belt recycling frame
  • 9.12 Application of heuristic methods in generational garbage collection
  • 9.13 Issues to consider
  • 9.14 Abstract generational garbage collection

MIT Daniel shares the latest results of garbage collection algorithms in the field of real-time systems PDF manual

 

Chapter 9 introduces one of the most successful object management strategies: generational garbage collection.

Chapter 10: Other Partitioning Strategies

  • 10.1 Large Object Space
  • 10.2 Recycler based on object topology
  • 10.3 Hybrid mark sweeping and copying collector
  • 10.4 Bookmark collector
  • 10.5 Super Reference Counting Collector
  • 10.6 Issues to consider

MIT Daniel shares the latest results of garbage collection algorithms in the field of real-time systems PDF manual

 

Chapter 10 introduces the management strategy of large objects and other partitioning strategies.

Chapter 11: Runtime Interface

  • 11.1 Object allocation interface
  • 11.2 Pointer search
  • 11.3 Object table
  • 11.4 References from external code
  • 11.5 Stack Barrier
  • 11.6 Safe collection points and evaluator suspension
  • 11.7 Recycling of code
  • 11.8 Read and write barriers
  • 11.9 Address Space Management
  • 11.10 Application of Virtual Memory Page Protection Strategy
  • 11.11 Choice of heap size
  • 11.12 Issues to consider

MIT Daniel shares the latest results of garbage collection algorithms in the field of real-time systems PDF manual

 

In the process of building a garbage collector, connecting with other parts of the runtime system is one of the most complicated. Therefore, Chapter 11 uses a whole chapter to introduce the runtime interface, including pointer lookup, code locations that can safely initiate garbage collection, read-write barriers, etc.

Chapter 12: Language-specific content

  • 12.1 End
  • 12.2 Weak references
  • 12.3 Issues to consider

MIT Daniel shares the latest results of garbage collection algorithms in the field of real-time systems PDF manual

 

Chapter 12 discusses specific language-related content, including termination mechanisms and weak references.

Chapter 13: Preliminary Knowledge of Concurrent Algorithms

  • 13.1 Hardware
  • 13.2 Hardware memory consistency
  • 13.3 Hardware primitives
  • 13.4 Advance guarantee
  • 13.5 Symbolic notation of concurrent algorithms
  • 13.6 Mutually Exclusive
  • 13.7 Work sharing and end detection
  • 13.8 Concurrent data structure
  • 13.9 Transactional memory
  • 13.10 Issues to consider

MIT Daniel shares the latest results of garbage collection algorithms in the field of real-time systems PDF manual

 

Chapter 13 discusses the new opportunities and challenges that modern hardware systems bring to the implementers of the garbage collector. At the same time, it introduces the relevant algorithms for synchronization, progress, termination, and consistency.

Chapter 14: Parallel Garbage Collection

  • 14.1 Is there enough work to be parallelized?
  • 14.2 Negative cut balance
  • 14.3 Synchronization
  • 14.4 Classification of parallel collection
  • 14.5 Parallel marking
  • 14.6 Parallel replication
  • 14.7 Parallel cleaning
  • 14.8 Parallel collation
  • 14.9 Issues to consider

MIT Daniel shares the latest results of garbage collection algorithms in the field of real-time systems PDF manual

 

Chapter 14 describes how to use multiple threads for garbage collection while suspending all application threads.

Chapter 15: Concurrent Garbage Collection

  • 15.1 Correctness of concurrent collection
  • 15.2 Related barrier technologies for concurrent recycling
  • 15.3 Issues to consider

MIT Daniel shares the latest results of garbage collection algorithms in the field of real-time systems PDF manual

 

Chapter 16: Concurrent Markup Sweep Algorithm

  • 16.1 Initialization
  • 16.2 End
  • 16.3 Allocation
  • 16.4 Concurrency of marking process and cleaning process
  • 16.5 Instant marking
  • 16.6 Abstract Concurrent Recycling Framework
  • 16.7 issues to consider

MIT Daniel shares the latest results of garbage collection algorithms in the field of real-time systems PDF manual

 

Chapter 17: Concurrent Copy, Concurrent Sorting Algorithm

  • 17.1 Concurrent replication of subjects: Baker's algorithm
  • 17.2 Brooks yanks the barrier
  • 17.3 Self-Delete Read Barrier
  • 17.4 Reproduction
  • 17.5 Multi-version copy
  • 17.6 Sapphire Collector
  • 17.7 Concurrent collation algorithm
  • 17.8 Issues to consider

MIT Daniel shares the latest results of garbage collection algorithms in the field of real-time systems PDF manual

 

Chapter 18: Concurrent Reference Counting Algorithms

  • 18.1 Review of Simple Reference Counting Algorithm
  • 18.2 Buffer reference count
  • 18.3 Circular reference counting processing in a concurrent environment
  • 18.4 Obtaining heap snapshot
  • 18.5 Sliding view index|use count
  • 18.6 Issues to consider

MIT Daniel shares the latest results of garbage collection algorithms in the field of real-time systems PDF manual

 

Chapters 15-18 introduce a variety of different types of concurrent collectors, all of which relax the requirement of "everything is at rest", and the recycling process only needs to introduce a very short pause to the user program.

Chapter 19: Real-time Garbage Collection

  • 19.1 Real-time system
  • 19.2 Real-time recycling scheduling
  • 19.3 Work-based real-time recycling
  • 19.4 Real-time recovery based on gaps
  • 19.5 Time-based real-time recycling: Metronome collector
  • 19.6 Combination of multiple scheduling strategies: "Taxes and Expenses"
  • 19.7 Memory Fragmentation Control
  • 19.8 Issues to consider

MIT Daniel shares the latest results of garbage collection algorithms in the field of real-time systems PDF manual

 

Finally, Chapter 19 discusses the most challenging topic, the application of garbage collection in hard real-time systems.

to sum up

From beginning to end, this article pays close attention to the opportunities and limitations brought by modern hardware, and the consideration of local issues will run through the full text. Our default application may be multi-threaded. Although this article covers a lot of simpler and more traditional algorithms, we still spent nearly half of the article on parallel collection, incremental collection, concurrent collection, and real-time collection.

How about, reading through this, have you been fascinated by him? Then remember to forward + follow the editor, directly view the picture below, scan the code to add or private message keywords [learning] to immediately enjoy the full PDF version.

What are you waiting for, hurry up and learn to improve! ! !

Guess you like

Origin blog.csdn.net/python6_quanzhan/article/details/108772490