Software Random Number Generation Based on Race Conditions

  • Authors:
  • Adrian Colesa;Radu Tudoran;Sebastian Banescu

  • Affiliations:
  • -;-;-

  • Venue:
  • SYNASC '08 Proceedings of the 2008 10th International Symposium on Symbolic and Numeric Algorithms for Scientific Computing
  • Year:
  • 2008

Quantified Score

Hi-index 0.00

Visualization

Abstract

The paper presents a new software strategy for generating true random numbers, by creating several threads and letting them compete unsynchronized for a shared variable, whose value is read-modified-updated by each thread repeatedly. The generated sequence of random numbers consists of the final values of the shared variable.Our strategy is based on the functionality of the operating system's thread scheduler. Different values of the shared variable are obtained because the concurrent threads are preempted at different moments in their execution. We identified some software and hardware factors that make the scheduler generate context switches at unpredictable moments: execution environment, cache misses, the instruction execution pipeline and the imprecision of the hardware clock used to generate timer interrupts.We implemented the strategy on x86 architecture running Linux operating system. The random number sequences obtained pass over 90\% of the NIST tests.