On 11/14/06, Joseph Wakeling <[EMAIL PROTECTED]> wrote:
I usually take the present time as the seed, unless I specifically want to enter one by hand: could I just take several times? (I admit that's probably not a good idea on a system where taking the time takes all of a fraction of a second:-).
View the problem like this: you need a pool of k random words for your k threads. For debugging purposes, it makes sense if you can initialize that pool to a fixed set of values. For actual simulation runs (don't do this for cryptography), you could initialize the pool in one of the ways described earlier, or you could read 4*k (or 8*k) random bytes from /dev/random or /dev/urandom if you have it. As you point out yourself, reading the system time k times in quick succession is not such a good idea. Depending on your OS (Linux, FreeBSD, Solaris, ...) and hardware, you may have hardware and/or software support for entropy pools. For example, I have access to a machine that has /dev/hwrng and has rngd running to read it and replenish /dev/random. -- mj _______________________________________________ Help-gsl mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-gsl
