I hope this is programming-related enough.
What exactly happens during the shutdown process of an Operating-System, let's take Linux here as its open-source and there may be more knowledge around about this.
- (How) are the kernel threads terminated?
Does the power-supply stop supplying power (captain obvious) when the computer is in a "clear" state? What I mean with clear state is that there isn't anything going on in the CPU anymore, etc.
Why do most operating systems take so long to shutdown? I mean hey, they don't need to initialize something or even load resources into memory.
Why don't operating systems go like "Hey, nevermind - let's just terminate all the processes end just turn the power off"?