Messages in this thread | | | Date | Thu, 3 Jun 1999 12:59:52 -0400 | From | Arvind Sankar <> | Subject | Re: How can Emacs get a unique ID per Linux reboot? |
| |
On Thu, Jun 03, 1999 at 06:48:07AM -0700, Tim Smith wrote: > On Tue, 1 Jun 1999, G. Allen Morris III wrote: > > How about generating a 32bit random number at boot time. There > > is a 1 in 2**32 of getting the same number after a reboot, but > > that should not be a large problem. > > That 1 in 2**32 is the chance of duplicating any specific number in the > sequence. The chances of *some* member of the sequence being a duplicate > is much higher. This is called the "birthday paradox" because if you > pick ~30 people at random, it is highly likely that two of them will > have the same birthday. >
but we do want the chances that the specific value that BOOTID had when emacs crashed last time around is duplicated when emacs is run again on that file. ought to be quite small.
-- arvind
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |