Method and system for a random number generator
First Claim
1. A method in a data processing system for generating a random number consisting of a plurality of binary bits, comprising the steps of:
- setting a race condition gate;
accessing an atomic lock, wherein a first racer representing a first binary bit and a second racer representing a second binary bit race toward the atomic lock upon release of the race condition gate;
determining which of the first racer representing the first binary bit and the second racer representing the second binary bit gain access to the atomic lock earliest; and
retrieving the atomic lock based on the determination.
6 Assignments
0 Petitions
Accused Products
Abstract
A method, system and computer readable instructions for generating a random number consisting of a plurality of binary bits is provided. A race condition gate is set. An atomic lock is accessed wherein a first racer representing a first binary bit and a second racer representing a second binary bit race toward the atomic lock upon release of the race condition gate. A determination is made as to which of the first racer, representing the first binary bit, and the second racer, representing the second binary bit, gain access to the atomic lock earliest. The atomic lock is retrieved based on the determination of which racer gains access to the atomic lock earliest. A single binary value is then written to a data stream, the single binary value is based on which of the first racer and the second racer retrieves the atomic lock.
38 Citations
30 Claims
-
1. A method in a data processing system for generating a random number consisting of a plurality of binary bits, comprising the steps of:
-
setting a race condition gate;
accessing an atomic lock, wherein a first racer representing a first binary bit and a second racer representing a second binary bit race toward the atomic lock upon release of the race condition gate;
determining which of the first racer representing the first binary bit and the second racer representing the second binary bit gain access to the atomic lock earliest; and
retrieving the atomic lock based on the determination. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10)
writing a single binary bit value to a data stream, the single binary bit value based on which of the first racer and the second racer retrieves the atomic lock.
-
-
3. The method of claim 2, wherein the single binary bit value is written to at least one of a computer file, a central processing unit register, a storage disk, and a network.
-
4. The method of claim 2, wherein if a single binary bit is not written to the data stream, the binary bit value is invalid.
-
5. The method of claim 1, wherein the first binary bit is a “
- 1”
bit.
- 1”
-
6. The method of claim 1, wherein the second binary bit is a “
- 0”
bit.
- 0”
-
7. The method of claim 1, wherein the race condition gate is a cyclic two fold gate.
-
8. The method of claim 7, wherein the cyclic two fold gate includes a create gate and a release gate.
-
9. The method of claim 1, further comprising:
-
confirming the race condition gate is reset; and
verifying that the first racer and the second racer are present at the reset race condition gate before another race begins.
-
-
10. The method of claim 1, wherein the method in a data processing system for generating a random number consisting of a plurality of binary bits is completed when the plurality of binary bits equals a parameter.
-
11. A system in a data processing system for generating a random number consisting of a plurality of binary bits, comprising:
-
setting means for setting a race condition gate;
accessing means for accessing an atomic lock, wherein a first racer representing a first binary bit and a second racer representing a second binary bit race toward the atomic lock upon release of the race condition gate;
determining means for determining which of the first racer representing the first binary bit and the second racer representing the second binary bit gain access to the atomic lock earliest; and
retrieving means for retrieving the atomic lock based on the determination. - View Dependent Claims (12, 13, 14, 15, 16, 17, 18, 19, 20)
writing means for writing a single binary bit value to a data stream, the single binary bit value based on which of the first racer and the second racer retrieves the atomic lock.
-
-
13. The system of claim 12, wherein the single binary bit value is written to at least one of a computer file, a central processing unit register, a storage disk, and a network.
-
14. The system of claim 12, wherein if a single binary bit is not written to the data stream, the binary bit value is invalid.
-
15. The system of claim 11, wherein the first binary bit is a “
- 1”
bit.
- 1”
-
16. The system of claim 11, wherein the second binary bit is a “
- 0”
bit.
- 0”
-
17. The system of claim 11, wherein the race condition gate is a cyclic two fold gate.
-
18. The system of claim 17, wherein the cyclic two fold gate includes a create gate and a release gate.
-
19. The system of claim 11, further comprising:
-
confirming means for confirming the race condition gate is reset; and
verifying means for verifying that the first racer and the second racer are present at the reset race condition gate before another race begins.
-
-
20. The system of claim 11, wherein the method in a data processing system for generating a random number consisting of a plurality of binary bits is completed when the plurality of binary bits equals a parameter.
-
21. A system in a data processing system for generating a random number consisting of a plurality of binary bits, comprising:
-
a processor;
a race condition gate; and
an atomic lock, accessible by a first racer representing a first binary bit and a second racer representing a second binary bit, wherein the processor sets the race condition gate, the processor accesses the atomic lock, the first racer representing the first binary bit and the second racer representing the second binary bit race toward the atomic lock upon release of the race condition gate, the processor determines which of the first racer representing the first binary bit and the second racer representing the second binary bit gain access to the atomic lock the earliest and wherein the processor retrieves atomic lock based on the determination. - View Dependent Claims (22, 23, 24, 25, 26, 27)
-
-
28. A computer program product in a computer-readable medium for use in a data processing system for generating a random number consisting of a plurality of binary bits, comprising:
-
first instructions for setting a race condition gate;
second instructions for accessing an atomic lock, wherein a first racer representing a first binary bit and a second racer representing a second binary bit race toward the atomic lock upon release of the race condition gate;
third instructions for determining which of the first racer representing the first binary bit and the second racer representing the second binary bit gain access to the atomic lock earliest; and
fourth instructions for retrieving the atomic lock based on the determination. - View Dependent Claims (29, 30)
fifth instructions for writing a single binary bit value to a data stream, the single binary bit value based on which of the first racer and the second racer retrieves the atomic lock.
-
-
30. The computer program product of claim 28, further comprising:
-
fifth instructions for confirming the race condition gate is reset; and
sixth instructions for verifying that the first racer and the second racer are present at the reset race condition gate before another race begins.
-
Specification