Hello Daniel,

Just a small note, there are atleast a few tenders where preemptive
scheduling is non-trivial (no signals), so I would recommend working
with the incremental GC.

Emery

On Wednesday, March 20, 2019 9:15:02 PM CET, [email protected] wrote:
Hello,

I am trying to port an experimental language runtime to Solo5. The runtime features a concurrent and parallel mark and sweep gc for the major heap, which can also be operated in single-threaded incremental mode. This way it can be used with Solo5. However I wonder if this would be a valid use case for adding SMP to the Solo5 runtime? Was something like this considered (also in the light of multicore Ocaml)? But I am not sure if there is a possibility to support additional worker jobs without adding all the threading primitives, which seems undesired.

If my gc is operated in incremental mode, to limit latency, I am using timeouts via a volatile boolean variable, which is triggered by a timer interrupt if the runtime is compiled for conventional Unix or Windows targets. For Solo5 I experimented with a timeout based on counters, estimating the number of iterations and polling the Solo5 monotonic clock. I am not sure how the Ocaml runtime handles that, but it seems to somehow compute the necessary slices based on the allocation rate instead of relying on some timeout? Would it make sense to add a primitive to the Solo5 API, which allows to interrupt incremental work, for example by using signal handler? Or is the recommended way of doing things to just poll the monotonic clock?

Daniel



Reply via email to