How Shutdown and Boot Process Works in Windows 7


Have you ever wondered why Shutdown process is really important or why it is not suggested to directly switch off your PC? Well in this article you will come to know how the Shutdown and Boot Process works in Windows 7.

Here is a step by step description of how all this happens, it will help you in understanding why these process are important.

The Shutdown Process Comprehends

  1. The user can shutdown the computer by selecting Shut down from the Start menu, or by pressing the Power button; or an application initiates Shutdown by calling an API such as ExitWindowsEx() or InitiateShutdown().
  2. Before actually shutting down the Windows, the Windows broadcasts messages to all the running applications, giving them a chance to save the data and settings. If the applications need extra time to finish with what they are doing can request for it.
  3. For each logged on User, Windows closes the user sessions.
  4. To notify that shutdown has begun Windows sends messages to the respective services, and consequently shuts them down. Services that have a dependency serially are shut down orderly, and rest in parallel. The services are only shutdown forcefully whenever a service doesn’t respond.
  5. Windows also broadcasts messages to the devices, signaling them to shut down.
  6. Then the system sessions are closed also known as session 0.
  7. Any kind of pending data is flushed to the system drive by the Windows to ensure it is saved completely.
  8. A signal is sent by the Windows to the system to power down the PC via the ACPI interface.ACPI establishes industry-standard interfaces enabling OS-directed configuration, power management, and thermal management of mobile, desktop, and server platforms.

And the Boot Process integrates

  1. Once the power button is pressed to switch on the system, the PC’s firmware initiates a Power-On Self Test (POST) and all the firmware settings are loaded. When a valid system disk is detected, this pre-boot process gets ends.
  2. The master boot record (MBR) is read by the Firmware, and then Bootmgr.exe is started. As soon the Bootmgr.exe is started it finds and starts the Windows loader (Winload.exe) on the Windows boot partition.
  3. To start the kernel run, first of all the essential drivers required to start the Windows Kernel are loaded. As soon the Kernel starts to run, loading into memory the system registry hive and additional drivers that are marked as BOOT_START.
  4. To initialize the system session the Kernel passes control to the session manager process (Smss.exe), and then loads and starts the devices and drivers that are not marked BOOT_START.
  5.  The user logon screen appears as soon the Winlogon.exe starts, the services are started by the service control manager and any Group Police scripts are run. A session is created by the Windows for a user as soon as the user logs in.
  6. The Desktop Window Manager (DMW) process is created by the system when Explorer.exe starts, and through the desktop window manager process the desktop is initialized and displayed.

This is all the stuff which happens internally when you turn off or on your machine.

I think ,you enjoy it……..

Leave a comment