langroodi / Adaptive-AUTOSAR

Adaptive Runtime AUTOSAR Linux Simulator
MIT License
399 stars 159 forks source link

Questions about random numbers in deterministic execution #23

Closed luckeyhy closed 1 year ago

luckeyhy commented 1 year ago

6018b1b928d84940d2437d9ea83c1a7 Sorry to bother you, but combined with the standard and your open source, I can't figure it out, I hope you can help answer, thank you very much! 1、Where does the random number assigned by GetRandom API to the workers in the worker pool come from? I see that the function you wrote is to directly obtain the random number of each cycle in the DeterministicClient instance, I think it should not be the case. 2、How does the deterministic random number assigned to container elements in the second paragraph achieve deterministic execution? Why assign random numbers to container elements and workers at the same time? Or is it that the random number assigned to container elements is obtained by workers performing the task. 3、The standard is very general. I would like to ask how to achieve deterministic execution of random numbers, including allocation to workers and container elements. Can this achieve deterministic execution?