Replies: 3 comments 2 replies
-
It is unclear for me what you are exactly struggling with, but I try to answer your questions (and the questions within those questions) based on my understanding. 1.1- As far as I know, the standard does not specify the source of the random number. So, it can be a regular pseudo random number generator as long as it matches the safety/security requirement of the component you are designing. 1.2- I do not see any reason why it should not be the case (if I understand your point correctly). Deterministic client should guarantee that the random number stays the same in a specific cycle while calling 2.1- It is not specified in the standard how you need to assign random numbers to the elements in the container. As long as all the elements are waiting for the same activation cycle, they need to receive a same random number (if they need actually a random number for their processing). The only requirement here is that the container provides an iterator for the assignment. 2.2- No, it is not at the same time; you've already answered that:
3.1- That section of the standard IS NOT about how to achieve deterministic execution of random numbers but it IS about how to generate random numbers to achieve deterministic execution. So, for that you still can refer to the current implementation within the project. 3.2- Of course not. The idea of the deterministic client is to HELP us to achieve deterministic execution by providing us some tools (e.g., random number, time stamp, worker, etc.) via its API. However, we still can violate deterministic execution in our tasks assigned to the workers. |
Beta Was this translation helpful? Give feedback.
-
I am not sure if such a categorizing you described is aligned with the standard, but the last time I read document, I did not have the same impression (but still I can not deny your understanding). So, the two levels you mentioned not fit the context IMHO. While workers or the process are executing in the current cycle, they will get the same random number (regardless they were a worker or the process itself). |
Beta Was this translation helpful? Give feedback.
-
First of all, I cannot guarantee that what I've implemented is correct. It has been implemented based on my understanding which can be wrong. Regarding your post of SWS-EM-02225, the |
Beta Was this translation helpful? Give feedback.
-
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?
Beta Was this translation helpful? Give feedback.
All reactions