Subject: Re: System clock resolution and random numbers
To: Rick Byers <rickb@iaw.on.ca>
From: Michael L. VanLoon -- HeadCandy.com <michaelv@MindBender.serv.net>
List: current-users
Date: 04/30/1997 23:11:10
>I'm working on an application that needs as-random-as-possible values. 
>I've been using the tv_usec from gettimeofday as the seed.  My question
>is, what is the resolution of tv_usec?  Is it possible to say that it will
>only ever be a certain subset of possible values?  I assume it's very
>difficult to predict the exact value at any given time (because subsequent
>calls return significantly different values).
>
>Is there any better way to make a random number?  I don't like the idea of
>having a 32 bit seed because that limits the possible outcomes to 2^32.
>Has their been any thought into putting a random number generator in the
>kernel, and are there any patches to do this?  I would think this would be
>nearly perfect since it would be impossible to find the pattern unless you
>had root/physical access.

I just read an article where some SGI engineers are using Lava Lamps
and color digitizing cameras for near-perfectly-random generators.
Who wants to incorporate that into the kernel? :-)

-----------------------------------------------------------------------------
  Michael L. VanLoon                           michaelv@MindBender.serv.net
        --<  Free your mind and your machine -- NetBSD free un*x  >--
    NetBSD working ports: 386+PC, Mac 68k, Amiga, Atari 68k, HP300, Sun3,
        Sun4/4c/4m, DEC MIPS, DEC Alpha, PC532, VAX, MVME68k, arm32...
    NetBSD ports in progress: PICA, others...
-----------------------------------------------------------------------------