ELI5: How do hard shutdowns work even if device is frozen?

TL;DR: every computer has a tiny program that waits for the power button to be held down, and shuts off the computer's power when that happens.

When your computer freezes up, it's because of relatively unimportant programs running when you're logged in, like Explorer or Google Drive Sync or even a Display Driver (what puts stuff on your screen).

You might notice when it freezes that sometimes CTRL+Alt+Delete still does something. That's because the computer still has some programs running. One of these is the base of the OS. Windows has small programs always running to keep track of stuff like CTRL+Alt+Delete.

But the program to keep track of the Hard Reset sequence (holding power button) is at the kernel level. The kernel is the program that tells Windows to boot up in the first place. The kernel almost never crashes because it's so important.

When the kernel receives a signal from the power button, it either tells Windows "hey, shut down now" or, if you held the power button down, doesn't tell Windows anything and just pulls the virtual plug.

/r/explainlikeimfive Thread