Hacker News new | ask | show | jobs
by zatkin 4442 days ago
So, would a possible solution be to check how many people are using the random generator at once? If only one process is currently accessing /dev/urandom, then avoid the spinlock and problem solved. Or, I am completely wrong.
2 comments

If there is only one process, then no spinlock contention, so no problem.

The problem comes with multiple processes competing for the lock.

Would a possible solution be to check how many people are using the random generator...?

One preson may have multiple processes reading from /dev/urandom.