On the Stability of Computer Programs

If something in your car breaks, most likely the car will still work, albeit with reduced functionality. If you randomly flip a bit in a computer program, however, the odds that the thing will run at all are next to zero. I tried this as a kid and realized quite quickly I couldn’t use notepad to edit executable files. My little mind simply concluded that computer programs are inherently fragile and subject to breaking. It amazed me, then that our home computer could run for years without suffering any real problems. How is this possible?

There are maybe 1000 parts of a car that absolutely have to function in order for the car to still be drivable. Computer programs have far more ‘parts’ than cars do – a simple 10 mb executable file contains roughly 1o million ‘parts’, all of which have to work properly in order for the executable to function correctly. If one of those parts breaks, the entire program stops working. Shouldn’t that mean that a computer program is far more likely to break than a car?

 

The reason computer programs are so robust is that the probability that a random bit will get flipped is basically zero. Error-Checking codes are put in place to ensure that, whether in transmission or storage, the probability of an error occurring is vanishingly small. In practice, therefore, the far more ‘fragile’ computer programs are more likely to keep on running than the far simpler, ’stronger’ cars. There are many 40 year old computer programs that still run today, because it’s cheaper to emulate the old hardware than it is to redevelop the software. How many 40 year old cars are still running on a day-to-day basis? It’s really quite amazing when you think about it.

 

 

blog comments powered by Disqus