Hacker News new | ask | show | jobs
by rptb1 5020 days ago
This is a really interesting topic and I could fill your screens with a wall of text. It's true that the MPS currently does not collect concurrently, however the only thing that makes it not-concurrent is a critical point in the Shield abstraction where the MPS seeks to gain privileged access to memory (usually in order to scan it for GC). The critical point is where ShieldExpose in shield.c has to call ShieldSuspend to preserve the shield invariants. This is the only point in the MPS that prevents concurrency, and the rest of the MPS is designed to support it.

The restriction could be removed if either:

  * the MPS could use a different set of protections to the mutator program

  * the mutator program uses a software barrier
The first one is tricky, and the second one just hasn't come up in any implementation we've been asked to make yet. Given a VM, it could happen, and the MPS would be concurrent.

So, I believe there's nothing fundamentally non-concurrent about the MPS design. It's kind of waiting to happen.

[I've put this in a comment in the code. Thanks for making me write it down :)]