Closed derekbruening closed 5 months ago
Hmm, every schedule is the same on Windows. The randomizer is seeded from the clock. Is the clock virtualization that bad on these runner VM's?
Hmm, every schedule is the same on Windows. The randomizer is seeded from the clock. Is the clock virtualization that bad on these runner VM's?
It looks like GetSystemTime just has poor granularity: it returns the same time throughout the whole test. QueryPerformanceCounter is much better and makes the test pass. But, there are several other uses of GetSystemTime so maybe a separate PR should update them all and then this one can merge it in. So I think this can be reviewed as-is; won't be merged until that Windows change is made separately and this becomes green.
Adds a new scheduler option randomize_next_input and corresponding launcher option -sched_randomize. When enabled, priorities and timestamps and FIFO ordering are ignored and instead a random next element from the ready queue is selected. This will be useful for schedule sensitivity studies.
Adds a unit test.
Tested manually end-to-end as well:
Fixes #6636