Creating the same random numbers
Hi, for my evaluation of different kernel modules which rely on randomness I need the same set of random numbers for each of them. Is there any chance that I can get a random number which depends on a kind of seed value? So if I start with the same seed value, the same random numbers should be generated. Is there any way in the kernel to achieve this? Thanks for your hints, Andreas Leppert
On Sat, Jan 29, 2011 at 2:09 PM, Andreas Leppert <wudmx@web.de> wrote:
Hi,
for my evaluation of different kernel modules which rely on randomness I need the same set of random numbers for each of them.
Is there any chance that I can get a random number which depends on a kind of seed value? So if I start with the same seed value, the same random numbers should be generated.
If the same numbers are generated, then how can you call it random?
Is there any way in the kernel to achieve this?
Thanks for your hints, Andreas Leppert
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Apart from the obvious consideration that repeating numbers are NOT random anymore, I guess what the original question asker wanted to know is: I need to generate some random numbers (so I need a PRNG). Then, I need to save these random numbers somewhere so I can use them over and over again to check some kernel modules. Can't you simply write a C program that generates, say, 1 million random values, writes them to a file, and then use them? Enrico Granata Computer Science & Engineering Department (EBU3B) - Room 3240 office phone 858 534 9914 University of California, San Diego On Jan 29, 2011, at 11:34 AM, Anuz Pratap Singh Tomar wrote:
On Sat, Jan 29, 2011 at 2:09 PM, Andreas Leppert <wudmx@web.de> wrote: Hi,
for my evaluation of different kernel modules which rely on randomness I need the same set of random numbers for each of them.
Is there any chance that I can get a random number which depends on a kind of seed value? So if I start with the same seed value, the same random numbers should be generated.
If the same numbers are generated, then how can you call it random?
Is there any way in the kernel to achieve this?
Thanks for your hints, Andreas Leppert
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Hi, On Sat, Jan 29, 2011 at 07:34:21PM +0000, Anuz Pratap Singh Tomar wrote:
for my evaluation of different kernel modules which rely on randomness I need the same set of random numbers for each of them.
Is there any chance that I can get a random number which depends on a kind of seed value? So if I start with the same seed value, the same random numbers should be generated.
If the same numbers are generated, then how can you call it random?
I want to compare different kernel modules which all require some data based on randomness. But I can only compare them correctly, if they get the same random data at a certain stage. I do only need this (the "fixed random numbers") for my evaluation!
participants (3)
-
Andreas Leppert -
Anuz Pratap Singh Tomar -
Enrico Granata