3 ms·
> Infinite loops are not that harmful by themselves if they only spin the CPU Categorically that's the exception, not the norm. For always-on systems, "by the
by smaudet 2y ago
> Infinite loops are not that harmful by themselves if they only spin the CPU
Categorically that's the exception, not the norm.
For always-on systems, "by themselves" is pretty critical, as they can result in DOS style bugs/attacks as illustrated in the parent article. The infinite loop is most useful e.g. for the scheduler or other event loop code, which by definition this style of code does a lot more than "only" spin the CPU.
For systems capable of long-term power saving operation - the system can go dormant (either no power draw or very little). An infinite loop can be the difference between weeks of power off a battery, or days/hours.