Generating random numbers

Randomness can be a Good Thing. If your system generates truly random numbers, it can avoid and withstand network packet collisions. just one of many applications. Here’s what you need to know about random numbers. 

Most embedded systems engineers and developers treat the ability to generate random numbers like the air we breathe: we never notice how badly we need it until it isn’t there, and we’re far too unconcerned with the quality of what we have. Maybe I’m extending an already stretched metaphor, but embedded systems need good random numbers as much as we need good, clean air. Not being a biologist or chemist, I can’t tell you what “good” means pertaining to air, but I can show you what a “good” random number is and how to generate one. But first let me support my metaphoric comparison by offering a couple of examples. 

 

Going random

It’s 3:00 AM, and Mother Nature has unleashed a severe storm on the Midwest. The Chicago suburbs are hit with a massive power outage, and a quarter of a million homes lose power. It’s not terribly inaccurate to assume most of those homes have cable TV. At 3:30 AM, crews have restored power, and 250,000 cable set-top boxes are ready to boot up. They begin by turning on at full power and broadcasting to find their network. They can’t find their networks, however, because all those devices are draining the cable system and preventing it from providing adequate power to most units. Consequently, boxes begin to fail. This power-up problem and other issues have resulted in the common designs you see today—a box that has to be plugged into a wall outlet and even requires a phone line for out-of-band management. What this system really needed was a good random number generator (RNG). That way, all devices could have spread out their boot-up over the course of some interval in time, hence putting a much smaller strain on the infrastructure.

Links: http://embedded.com/columns/technicalinsights/20900500

Leave a Reply

You must be logged in to post a comment.