news

What Exactly Happens When You Shut Down Your Computer or Laptop

A few days ago, the writer Mahmoud Monir explained all the steps that take place inside the computer case when starting up, from pressing the power button until the appearance of Windows and starting your work normally. Although each step was clear to us, executing them in reality is extremely complex; however, the startup process is completed in a few minutes! Let me tell you that the Windows system also performs many steps in the background when shutting down, ensuring that the user’s data is saved and the system will be able to start up again. But because all these steps pass very quickly, in this article we will tell you what happens in detail from the moment you press the Shut down option or the power button in the computer case or laptop to shut down.

After finishing your work on the computer and pressing the Shut down button to turn it off, Windows immediately checks if there are any logged-in accounts that are active. This usually happens if you have more than one account linked to Windows on the same computer; so, if you switch from one account to another without logging out of your first account – for example, Windows will notice that there is an account that has not been properly logged out of.
This is indicated to the user by displaying the message “Someone else is still using this PC” after clicking the Shut down option from the Start menu. At this stage, you have two options: the first is to stop shutting down the computer so that the other user does not lose any unsaved data in open programs, giving them the opportunity to log in, save their data, and then log out before shutting down. The second option is to press the “Shut down anyway” button, which will force log out of any logged-in accounts, also meaning that all open applications associated with these accounts will be closed, resulting in the loss of unsaved data.
As we mentioned, this step applies only if you have more than one account linked to Windows on the same computer. If there are no other accounts and you are the sole user of the computer, you will not see this message, and Windows will proceed directly to the next step after clicking Shut down.

Second: Ensure there are no unsaved data before closing programs

Before Windows actually logs out of the computer, it verifies closing all open programs and ensures that the user has not left any unsaved data in any of these programs. This not only happens when choosing Shutdown to turn off the computer but also when selecting Restart to restart it, as logging out is an essential part of the shutdown process. At this stage, Windows sends a command to each open program window to ask it to save its user data and close itself! Since Windows does not forcibly close these programs – this process takes some time for each open program to respond to the Windows command. This is why sometimes the Shut down process takes a long time before the computer is finally shut down.

It is also worth noting that some open programs may refuse this Windows command and send a notification that they need the user to log in again to save the data left by the user without saving. For example, Word or Notepad may contain texts that were written and not saved, so after clicking the Shutdown button, you will see a screen like the one shown in the image above displaying a message “This app is preventing shutdown” under the name of each program that refuses the shut down command from Windows.
In general, when you see this screen, you have only two options as well: the first is to press the Cancel button to cancel the shutdown or restart process and thus have the opportunity to save your data on these programs and then close them yourself. The second is to ignore saving the data and proceed by clicking the Shut down anyway button, which in turn will forcibly close these programs.

Keep in mind that at this stage, Windows will close the other open programs without any issues. For example, if there are 10 open programs and you click the Shutdown option, but one program refuses to shut down, you will see this single program still running when you press the Cancel button. Windows will immediately close the other 9 programs since they accepted the shutdown command.

On Windows 10, the process is slightly different, especially after the Fall Creators Update, where Microsoft started to include a new feature that makes Windows remember which programs you ran last time and automatically try to restart them in the next instance you open the computer.

Third: End all active sessions related to accounts

After Windows successfully logs out of all accounts and ensures closing all open programs after saving user data on them, Windows immediately starts terminating all active sessions related to your account or other accounts – if any – and no other programs will continue working as long as they are tied to your accounts. In other words, at this stage, the user (which is you) is completely disconnected from Windows. Note that at this stage, the user login information is stored on the hard drive after being transferred from the RAM, but the next time you start the computer, it is retrieved from the hard drive to the RAM.

Fourth: Close any Windows-related processes or services

It is now time for Windows to shut down as a final step. This starts by sending a specific command from Windows to inform each service or process associated with it to shut itself down completely and save any necessary data on the hard drive, with each service or process having only 20 seconds to complete its work and stop itself before Windows intervenes to force the shutdown.
For Windows 10, this step is applied slightly differently, as Windows retains the tasks of important services and processes and saves them on the hard drive before shutting down. In the next instance you start the computer, Windows reloads the tasks of these saved services and processes, which speeds up the startup process. This feature is called “Fast Startup”.

At this stage, Windows also installs any available updates that may have been downloaded in the background while the computer was running. Therefore, you may notice a delay in completing the shutdown process and see on the screen a message “Working on updates” with a progress bar to install these updates. Once everything is finished, Windows waits for a signal indicating that all user and system data has been saved on the hard drive before finally performing an unmount of the internal hard drive of this computer.

Fifth and Finally: Send an ACPI signal to shut down the computer

The last step in the computer shutdown process is for Windows to send an ACPI signal to the power supply, which informs the computer to shut itself down, completing the shutdown successfully. Keep in mind that the ACPI signal was invented and released for the first time in 1996, simply giving Windows the ability to give a command to the internal computer components to shut down by themselves. Before the invention of ACPI, Windows (referring to Windows 95 and earlier) displayed a message “It is now safe to turn off your computer” on the computer screen after completing the previous steps, and the user had to press the power button to turn off the machine.

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button
error: Content is protected !!