July 10th, 2024

Copying collectors with block-structured heaps are unreliable

Copying collectors with block-structured heaps pose reliability challenges in garbage collection. Unpredictable post-collection fragmentation arises from non-commutative evacuation, exacerbated by multiple mutator threads. Mitigating this requires larger heap memory, emphasizing virtual memory and growable heaps for improved reliability.

Read original articleLink Icon
Copying collectors with block-structured heaps are unreliable

The article discusses the reliability challenges of copying collectors with block-structured heaps in garbage collection systems. While simple semi-space collectors offer reliability by ensuring a single heap size for successful allocation, block-structured heaps introduce unreliability due to non-commutative evacuation, leading to unpredictable post-collection fragmentation. The presence of multiple mutator threads further complicates reliability, as the size of the live object graph becomes non-deterministic during collection. Mitigating fragmentation-related unreliability can be achieved by increasing heap memory. The article emphasizes the benefits of virtual memory and growable heaps in managing reliability issues in garbage collection systems, especially in the presence of multiple mutator threads. It concludes by highlighting the importance of flexible heap sizes and the ability to allocate additional memory to enhance system reliability.

Related

Group Actions and Hashing Unordered Multisets

Group Actions and Hashing Unordered Multisets

Group actions are used to analyze hash functions for unordered sets and multisets, ensuring order-agnostic hashing. By leveraging group theory, particularly abelian groups, hash functions' structure is explored, emphasizing efficient and order-independent hashing techniques.

Tracing garbage collection for arenas

Tracing garbage collection for arenas

Tracing garbage collection in systems programming languages like C++, Rust, and Ada is compared to reference counting. A simplified tracing garbage collection approach inspired by Mark-and-Sweep is proposed for languages like Zig or Odin.

How GCC and Clang handle statically known undefined behaviour

How GCC and Clang handle statically known undefined behaviour

Discussion on compilers handling statically known undefined behavior (UB) in C code reveals insights into optimizations. Compilers like gcc and clang optimize based on undefined language semantics, potentially crashing programs or ignoring problematic code. UB avoidance is crucial for program predictability and security. Compilers differ in handling UB, with gcc and clang showing variations in crash behavior and warnings. LLVM's 'poison' values allow optimizations despite UB, reflecting diverse compiler approaches. Compiler responses to UB are subjective, influenced by developers and user requirements.

Mix-testing: revealing a new class of compiler bugs

Mix-testing: revealing a new class of compiler bugs

A new "mix testing" approach uncovers compiler bugs by compiling test fragments with different compilers. Examples show issues in x86 and Arm architectures, emphasizing the importance of maintaining instruction ordering. Luke Geeson developed a tool to explore compiler combinations, identifying bugs and highlighting the need for clearer guidelines.

Learning C++ Memory Model from a Distributed System's Perspective (2021)

Learning C++ Memory Model from a Distributed System's Perspective (2021)

The article explores C++ memory model in distributed systems, emphasizing std::memory_order for synchronization. It covers happens-before relationships, release-acquire ordering, and memory_order_seq_cst for total ordering and synchronization across threads.

Link Icon 2 comments
By @bjourne - 9 months
But this only happens if the copying collectors' space is growable and discontinuous. I think a better scheme is to just use copying for the young generation and mark and sweep for the older ones. Structuring the heap into blocks seem quite misguided, imo.
By @chrisjj - 9 months
> a form of soft reliability

A form of reliability that is unreliable, right? :)