Re: Random function.

"Arthur Flatau" <[email protected]>
Newsgroups gmane.lisp.allegro
Message-ID <[email protected]>
>   The probability of two programs initializing [a random seed]
>    within exactly the same window is probably less than lightning striking the 
>    user.

> Not so - it happened to me quite often.  I was starting batch Allegro
> jobs on a dual-processor Sun, using a script.  The random seed was
> inited early in the job, and often came out the same for both
> processes.  My hypothesis was that the random seed was based on a
> clock that got incremented each 1/60 second, and that both processes
> had to wait for the Lisp image to arrive from the file server, then
> got started within 1/60 second of each other.  This is only a
> hypothesis, but it is a fact that the random seeds were sometimes the
> same.

Actually if you disassemble make-random-state, you will see it calls
GET-UNIVERSAL-TIME, which returns the time in seconds.

Art

-- 
Arthur Flatau                           Texas Microprocessor Division
[email protected]                   Advanced Micro Devices
Senior Member of Technical Staff        5900 East Ben White Boulevard
                                        M/S 625 Austin TX 78741
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.