3 ms·
> 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! Awes
by wyldfire 4y 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;
- rrnewton 4y agoYes 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/2016/02/asplos277-pct.pdf 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-mode.html 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.pdf http://www.doc.ic.ac.uk/~afd/homepages/papers/pdfs/2016/TOPC....