Re:Make your program slower with threads
by pjbringer on Sunday December 07, 2014 @05:44AM
(#8711839)
This exact problem had me worried when I heard about OpenBSD's arc4random, and how they've been promoting a pervasive use of it. I haven't taken the time to look at how they solve the problem of contention, while still maximizing the unpredictability of the random number generator's state by using it.
[ Parent
| on HN ]
I don't think threads are all that popular near the OpenBSD group. Most daemons handle multiple connections asynchronously without threads, and if that's not enough, multiple processes may be used to process multiple requests simultaneously.
arc4random() is simply a locking wrapper for the underlying rng.
Aren't you supposed to use arc4random once to seed a high-quality pseudorandom generator? From what I understand, seeding a high-quality PRNG with good source of randomness is really all you need.
arc4random is their high-quality pseudorandom generator that's seeded from a good source of randomness (namely, the getentropy system call).