What does Windows do when you turn off your computer or log out of Windows?
When a user shuts down, restarts or logs off from a PC, Windows will do a lot of work in the background to make sure all work and user data are saved completely.
Windows checks to see if any users are still logged in
First, when the user shuts down or restarts, Windows will check to see if another user account is working. Because the user can log in to an account then only lock the session and not log out and log in with another account.
If an account is not logged out, Windows will display a message to the user: "Someone else is still using this PC" - Someone is still using this PC. If you reboot, all unsaved data in running applications will be lost. In this case, the user should stop the shutdown process, log in to the other account to save all work, then log off before continuing to shutdown.
If you are sure that the other account has nothing to save, Windows allows the user to choose "Shutdown anyway" - Continue to shut down the computer. Then the other account will have to log out, all applications will be closed and unsaved data will be lost.
If there are no login accounts, Windows will not issue any notifications and continue the next phase.
Windows sends commands to the program to save data and close it
Logging out is an essential part of the shutdown process and it happens even when you reboot or shutdown. Before you log out of your PC, Windows will send the WM_QUERYENDSESSION command to every program you are open so that they can store data and close it. This process will take a bit of time and this is why the shutdown and logout process sometimes take longer than usual.
If applications need to interact with users (opening files that users need to save), they can 'block' this process. At that time, Windows will announce "This app is preventing shutdown" - This application is preventing the shutdown. Or the application can give a custom message with the function ShutdownBlockReasonCreate.
If you see this message appear, users can stop the shutdown process by clicking the 'Cancel' button to check the application. If not interested, you can skip by clicking "Shutdown anyway" or "Sign out anyway".
Windows logs users out of the system
After closing all applications, Windows will perform many separate actions to log out of the system. All jobs in that user's account will end.
For example, when you log out, the registry contents of the account that are normally stored in memory will be saved to the hard disk to reload into memory the next time you log in.
If only logged out, Windows will bring the user to the login screen. If you turn off the computer or restart another process, start.
Windows turns itself off
After logging out all users, Windows will send the SERVICE_ACCEPT_PRESHUTDOWN command to all running services and 'give' them 20 seconds to clean, save all the data needed to the hard disk and turn it off before Windows 'coercive' off them. .
The "Fast Startup" feature in Windows 10, will save the kernel state to disk and can be reloaded at the next boot to make this process faster due to skipping the hardware initialization process which is quite slow. .
In the final stage of the shutdown process, Widows also installs all available updates.
In addition, many other update tasks are also performed by Windows at various times, including: shutdown, start-up, and background when the machine is operating.
Next, Windows will unmount SSDs and HDDs, wait for the signal that the system data is saved to the hard disk.
Windows turns off your PC
Finally, Windows sends the ACPI signal off to the PC to power off the system, officially completing the shutdown process.
With Windows 95 (no signal turned off APCI), the system will display a "It is now safe to turn off your computer" message, users will have to press the power button to turn off the computer. Since 1996, when the ACPI standard was released, Windows has been allowed since then to turn off the PC itself.
There is a slight difference if users choose to sleep or hibernate. With sleep (sleep), the PC will still run in very low power mode. As for hibernate, the entire system state will be saved to the hard disk and when the user opens the machine, the system will restore.
See more:
- Ways to turn off Windows 10 computer
- How to turn off Windows 10 computer without waiting for the update to install
- How to fix computer errors without completely turning off the power
- How to turn off your computer quickly with a keyboard on Windows
You should read it
- How to automatically turn on the computer on Windows
- Instructions for scheduling a Windows 10 computer shutdown
- Fix the problem that the PC turns on but doesn't turn on the screen
- Trick to turn off the computer from the right-click menu on Windows 8
- How to turn off your computer quickly with a keyboard on Windows
- Ways to turn off Windows 11 PCs
- Ways to turn off Windows 10 computer
- How to turn off, turn on Windows Defender in Windows 10
May be interested
- How to turn off the computer quickly with the keyboard on Windows 10, 8, 7with the quick way to turn off the computer with the keyboard on windows 10, 8, 7, you can save time waiting when using the usual method of turning off the computer, and also learn and add to the collection of tricks. here's the quickest way to turn off your computer.
- How to turn off the computer automaticallyautomatic computer shutdown timer allows you to schedule a computer shutdown on windows 10, windows 7/8 even without sitting in front of the computer. the way to turn off the computer below is quite easy to use on operating systems, please consult.
- How to turn off computer using keyboard on Windows, MAC in a snapbelow, hacom will guide you on how to turn off your computer using the keyboard very quickly for those who need to turn off their computer urgently. please watch!
- How to turn on and off VBS Windows 11, increase performance on the computerif you have upgraded to windows 11 and feel that the performance of your computer has decreased quite a bit, then it is likely that your computer is turning on vbs (virtualization based security) - a feature that protects your computer. however, if you are someone who needs computer performance more than security or vice versa, you can choose to turn windows 11 on and off to work with your computer most effectively.
- How to turn off programs that start with Windows 105 simple and fast ways to turn off programs that start up with windows 10, help you improve and optimize the performance of your computer. click to see now!
- How to schedule a computer to turn off on Windows 10the following article details instructions how to turn off the computer on windows 10 - a very optimal feature for those who listen to music before going to bed.
- Turn the iPad into a true Windows 10 computer, support Bluetooth mousethe windows virtual desktop feature, a service based on microsoft's azure cloud platform, allows windows 10 to be used on any operating system, allowing turning the ipad into a truly windows 10-compatible computer with the mouse. and keyboard.
- Summary of ways to turn off Windows 11 computersshutdown is one of the most basic things that almost every user knows. however, you may not know all the ways to turn off your windows 11 computer. when there are many ways, you will have more options to deal with if you accidentally encounter an error during use.
- How to turn USB drive into RAM for computers and laptops. Do you know yet?when you start to see your computer running slow, or have other symptoms such as high temperatures, frequent hangs ... it is most likely because the computer has used up the amount of ram on your computer ...
- How to Turn Off a Computer Remotely on a LANtoday's tipsmake will show you how to use a windows computer to turn off another windows computer in the same local area network (lan).