## Weak Power-Supply

The current computer ‘Phoenix‘ (I own several computers) has suffered from a string of malfunctions in the past, which I had trouble diagnosing the cause of.

I think I’ve found the problem: Its power-supply is weak in some way, which can also lead to low-voltage conditions that it subjects the high-speed electronics to. When high-speed logic circuits are fed low supply-voltages, the computer can spontaneously crash.

The reader may wonder how I know this.

When I’ve left the computer idling and come back to it, thus entering my password to dismiss the screen-saver, the case-fan speed seems to be stable around 3,500 RPM. But as soon as I fire up my Web-browser, the CPU usage goes from low-usage to nearly-100% usage for less than a minute, and as soon as that happens, the case-fan speed becomes unstable, sometimes resulting in a reading of ~40 RPM, which means that ‘The fan has stopped spinning.’ Then, as soon as I allow CPU usage to go below 5% again, the case-fan speed sometimes stabilizes again, within the same sitting.

Well there is no valid logic by which the motherboard would signal for the fan to stop spinning, or to slow down, at the moment the CPU usage is high. And so the only other explanation I can think of, is that the CPU – and possibly other circuits in the box – are drawing more current, and that this is causing a temporary dip in supply-voltage, just enough for the recently-installed fan to stop spinning.

But then, such a weakness also makes this computer more susceptible to such phenomena as brown-outs. Even though my eyes can see power-fluctuations that take place within a fraction of a second, I cannot see a low-voltage condition in the A/C power we are fed, if that low-voltage condition has set in over a period of minutes.

I might start looking for a new power-supply for this old box, rather than a new case-fan.

## Why a Hard-Boot is often Overkill.

In order to understand this posting, the reader first needs to understand something, about how the (volatile) memory in a computer is organized. Through the use of virtual addresses, it gets organized into user-space and kernel-space. User-space includes programs that run with elevated privileges, but also the GUI-programs that display widgets and the like on the screen. Kernel-space is reserved for the kernel of the O/S, as well as for kernel-modules, that act as device drivers in practice.

But in addition to that, modern architectures also have I/O chips – which the kernel modules would be responsible for – that run “firmware”. These more-complex I/O chips will often perform complex tasks, such as the encryption built-in to Bluetooth, without requiring that these tasks run on the CPU, or in RAM. In order to do that, I/O chips capable of doing so need a smaller program of instructions, that actually run on the I/O chip. This program is typically no longer than 1-2 KB.

(Edit 06/09/2017 :

I suppose the fact should also be acknowledged, that in order for the firmware actually to do anything, the I/O chip should also have a somewhat larger region of memory – call it a Buffer – which stores data and not code. In the case of an intelligent Bluetooth chip, that buffer would logically store whatever encryption keys are currently being applied to data, which is being streamed to and from the chip… )

So in practice, a situation which the user can run in to, is that by unpairing all his (external) Bluetooth devices, and then turning Bluetooth Off from the settings GUI, and next turning BT back On, he can Fail to Reset the Bluetooth system to its original state. The user only gets to see what the GUI is showing him – which is being controlled by programs running in user-space.

What the user may not realize, is that the way kernel-space is often organized, turning Bluetooth Off in user-space, will fail to unload the kernel-module itself, responsible for operating the Bluetooth Chip, that has firmware running on it, for the sake of argument.

The actual kernel-modules first load when the computer boots up, and the first thing they do, if they are of the sort that use firmware, is to load that firmware onto the I/O chip – and it’s often patches to the firmware that get loaded, because the default firmware is burned-in to the I/O chip.