3 ms·
@rptb1: MPS appears to have been designed in a single core era, and it would be great if you would address any architectural changes that were made to address
by eternalban 14y ago
@rptb1:
MPS appears to have been designed in a single core era, and it would be great if you would address any architectural changes that were made to address the current prevailing multi-core platforms.
/tia
[edit: removed ref to the azul q]
- rptb1 14y agoYes indeed I'm very aware of this. The overall architecture and abstractions can support efficient multi-core operation, but the implementation is behind. Development is mostly paid for by single-threaded clients at the moment! But I have plans. Well spotted, by the way. Most of the problems are around the bottleneck of stopping threads on other cores in order to get privileged access to memory while preserving their consistent view of the heap. What the MPS needs is its own protection map. Most OSs don't help much with that, although Mac OS X, for a while, allowed you to map the same physical RAM at two addresses with different protections. Sadly, no longer.
- rayiner 14y agoMPS is thread safe, but doesn't do concurrent collection. Not really that different than most GC's besides the JVM's.
- rptb1 14y agoThis 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 :)]