Hacker News new | ask | show | jobs
by wyldfire 1299 days ago
> thread interleavings

I was going to ask if it could do the flip side - instead of stabilizing the scheduler, make it less predictable.

AFAICT, it can! Awesome, looking forward to giving it a try.

   hermit run --chaos --seed-from=SystemRandom ./target/debug/hello_race;
1 comments

Yes indeed.

That concurrency testing capability is a pretty well-studied area and we implement a couple existing algorithms. The first is our adaptation of the PCT algorithm (ASPLOS'10 https://www.microsoft.com/en-us/research/wp-content/uploads/...). That's what you get by default with `--chaos`.

But we also have variations on straight up randomized scheduler (random thread selection at each time step).

rr chaos mode has its own take on this: https://robert.ocallahan.org/2016/02/introducing-rr-chaos-mo...

This study compares a few approaches - http://www.doc.ic.ac.uk/~afd/homepages/papers/pdfs/2016/TOPC....