Re: [RFC] frandom - fast random generator module

From: Helge Hafting
Date: Tue Oct 21 2003 - 16:13:16 EST


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.

Helge Hafting
-
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/