how can a computer turn itself on

717 views

When you restart your computer, it has to shut down and then turn itself back on. My question is, if it’s totally off how can it have the power and understanding to turn itself on again?

In: Technology

2 Answers

Anonymous 0 Comments

The short answer is because it’s not actually “totally off.” It’s in what’s called a *soft shutdown state*, which is a very different beast from actually shutting the machine off. A reboot under these conditions is typically called a *soft reboot* or a *warm reboot*, and the machine is only clearing certain sections of memory rather than completely restarting itself from zero.

The longer answer is, naturally, more complicated.

There are three types of system shutdown and restart.

The simplest and quickest is a *soft reboot* or *warm reboot*. When the restart command is received in the system BIOS, the system shuts down running applications and closes the operating system, setting a bit in protected memory that serves as a signal (called a *flag*) to BIOS that the system is in a soft reboot. BIOS runs as normal, clears the signal bit, and launches the OS. The key element here is that power is never interrupted, so the time-consuming hardware starts and checks don’t happen, saving time and speeding the boot process.

A *cold reboot* is a more effective restart, sometimes needed when there’s a serious problem. BIOS receives a shutdown command but does not set any flag bits. The OS is shut down and BIOS executes its shutdown instructions, interrupting the power supply. This is an instruction the system can’t clear itself as the power supply to the system board is shut off. The user (or an external auto-restart system) needs to send the command via the power button to restart. This wipes the system memory and cache and completely resets the processor, as well as forcing the system through its normal start-up checks (like POST), allowing the system to both clear anything that may be a problem in memory as well as check its hardware for faults.

The final one is a subset of a cold reboot called a *hard reboot* or a *hard shutdown*. Unlike the other two methods, no orderly shutdown of applications and OS is executed – the system powers off immediately. This is usually done by holding down the power button for several seconds and only as a last resort, when other shutdown methods have failed. This immediately pulls power from the system board, causing memory to blank and putting everything into a restart state. However, a bit flag called a *dirty bit* remains set. When BIOS starts, it notices the dirty bit is set and that the previous shutdown was *not* a normal shutdown, so there may be problems. System cache files are wiped, processor cache is actively purged, the processors are reset, and hardware checks are performed. Frequently, a basic system check is run to ensure the system is stable. This is because a hard shutdown can occur due to hardware or critical software failure, and without these checks the machine could get stuck in an endless shutdown-restart-shutdown-restart loop. Only after the checks are passed is the OS loaded.

These last two states are the only time power to the system board is actually interrupted, making it necessary for outside action to get the system running again. A soft reboot does not do this, meaning the system is still in control and remains “live” through the entire process.

You are viewing 1 out of 2 answers, click here to view all answers.