Re: [RFC] frandom - fast random generator module
From: bill davidsen
Date: Tue Oct 21 2003 - 17:29:26 EST
In article <20031021212136.GA15043@xxxxxxxxxxxxxx>,
Helge Hafting <helgehaf@xxxxxxxxxxxxx> wrote:
| On Tue, Oct 21, 2003 at 07:55:32PM +0000, bill davidsen wrote:
|
| > Your argument is correct, but this is data generation rather than
| > analysis. In doing simulation it's desirable to ensure that multiple
| > instances of a program don't use the same numbers.
| >
| > For instance, simulating user load against a server; I want the
| > simulation of human thinking time to be a number in the range n..m and
| > not to be the same for all threads. Sure I can get around that, and do,
| > but I wouldn't mind having a simple source of random bytes which was
| > quality PRNG and unique.
|
| Each thread use the same userspace pseudo-random generator (faster
| than any kernel implementation as you avoid the syscalls) and
| each initialize by a single read from urandom, so they get
| different series of numbers.
As noted, I do get around that... some care needs to be taken calling
random number generators from threads, since some have internal storage
in addition to the seed which can be provided by the caller.
--
bill davidsen <davidsen@xxxxxxx>
CTO, TMR Associates, Inc
Doing interesting things with little computers since 1979.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/