All of lore.kernel.org
 help / color / mirror / Atom feed
From: egranata@ucsd.edu (Enrico Granata)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Creating the same random numbers
Date: Sat, 29 Jan 2011 13:09:59 -0800	[thread overview]
Message-ID: <90010BC9-7C74-45BF-90AD-C93816708319@cs.ucsd.edu> (raw)
In-Reply-To: <AANLkTi=npMrRDt8FQ=EM-dC-jYBts8KC5BY5A9tqx2a-@mail.gmail.com>

Apart from the obvious consideration that repeating numbers are NOT random anymore, I guess what the original question asker wanted to know is:

I need to generate some random numbers (so I need a PRNG). Then, I need to save these random numbers somewhere so I can use them over and over again to check some kernel modules.
Can't you simply write a C program that generates, say, 1 million random values, writes them to a file, and then use them?

Enrico Granata
Computer Science & Engineering Department (EBU3B) - Room 3240
office phone 858 534 9914
University of California, San Diego

On Jan 29, 2011, at 11:34 AM, Anuz Pratap Singh Tomar wrote:

> 
> 
> On Sat, Jan 29, 2011 at 2:09 PM, Andreas Leppert <wudmx@web.de> wrote:
> Hi,
> 
> for my evaluation of different kernel modules which rely on randomness I
> need the same set of random numbers for each of them.
> 
> Is there any chance that I can get a random number which depends on a
> kind of seed value? So if I start with the same seed value, the same
> random numbers should be generated.
> 
> If the same numbers are generated, then how can you call it random?
>  
> Is there any way in the kernel to achieve this?
> 
> Thanks for your hints,
> Andreas Leppert
> 
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
> 
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110129/b131c7ab/attachment.html 

  reply	other threads:[~2011-01-29 21:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-29 14:09 Creating the same random numbers Andreas Leppert
2011-01-29 19:34 ` Anuz Pratap Singh Tomar
2011-01-29 21:09   ` Enrico Granata [this message]
2011-01-29 23:38   ` Andreas Leppert
     [not found]   ` <1041152607-1296331182-cardhu_decombobulator_blackberry.rim.net-897203629-@b27.c7.bise7.blackberry>
2011-01-29 23:41     ` Andreas Leppert
2011-01-30  0:11       ` Manohar Vanga
2011-01-29 23:49     ` Andreas Leppert
2011-01-30  0:34       ` Javier Martinez Canillas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=90010BC9-7C74-45BF-90AD-C93816708319@cs.ucsd.edu \
    --to=egranata@ucsd.edu \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.