when restarting a computer, how does it know to turn back on once it’s turned off?

18 views

If restarting will fully turn your computer off then on again, what is directing it to turn back on? are there just some parts that stay functioning?

In: 6

I think there are parts in the computer that are always on, which is why your computer knows what time it is when you turn it on, because the internal clock is always functioning

It never fully shuts down, IE completely powers off and drains the capacitors on the motherboard and in the power supply. So the system is still on technically. It’s just the operating system and temporary memory that gets reset. Those two are awoke by the BIOS, which sustains itself with a small button battery on the motherboard.

On a modern computer the computer is never fully powered off unless it’s unplugged or, in rare cases, if it has a toggle switch on the power supply. When you use the momentary push-button to turn it on and off, that button is just dis/connecting a signal wire from the power supply to ground. When that connection is made, the rest of the power supply comes on and the computer boots up. When the connection is broken, the entire computer except for the power-up circuit is powered off.

This is ignoring all the other sleep/suspend states, wake on LAN, and other complicated things you didn’t ask about.

In some kinds of restart, the computer never actually powers down at all. The OS unloads most of its parts, then reloads them, then continues operating.

But there are other ways. There are usually some smaller computers that make up your computer. One of them is for “power management”. In one kind of restart, the OS unloads most of its parts, then tells the power management computer that it wants a restart. Then, the power management computer cuts power to the “main” computer for a few moments, then restores the power. That causes the main computer to start booting up as if it had been unplugged.

The most dramatic kind of restart involves unplugging the computer. Then everything loses power. *Some* computers have a few battery-operated components that keep running, but it’s not really worth listing all of them. Sometimes a computer automatically turns on when you plug it in. What’s really happening there is when the power is restored, first the power management computer starts up. It can start up very fast since it’s not super complicated. It can be configured to turn on the main computer as soon as it gets power, or it can be configured to make you manually push a button to turn on the computer.

A couple of days ago I installed a dell server. When I booted it, I noticed a log message “server case was opened when server was turned off”. Which was true. I will add that it was disconnected from power at that time. So there are a bunch of thins that can happen (and be registered) when a computer is off.
Sure a normal mainboard may not be as sophisticated as idrac, but the question reminded me of this nevertheless