I am simulating a distributed system consisting of many servers, many more than I have cores.
Each simulated server runs in a std::thread. It looks like thread IDs are integers allocated in the order the threads are spawned. It also seems that the algorithm schedules the ready thread with the next largest thread ID. If there isn't one, it apparently selects the ready thread with the smallest ID.
The result is correlated behavior that I don't expect to see on the physical servers. Is there any way to randomize the selection of the next ready thread to run?