Welcome to Day Four of our series leading up to the Windows Server 2008 Launch. Hopefully you had a good weekend - many of you were probably up watching the Super Bowl. Of course, it's Monday morning now - time to get to back to work. Today's topics: Service Shutdown and Crash Handling.
Prior to Windows Vista, there was no facility to provide a clean shutdown for services. If a service did not respond to the shutdown request within 20 seconds the system could hang on shutdown. By default, services had 20 seconds to cleanup and shutdown. Windows Vista introduced a feature that allowed a service to request a pre-shutdown notification. A service can register for pre-shutdown notifications by setting the SERVICE_ACCEPT_PRESHUTDOWN control code. This is useful for services that perform network-related shutdown operations or need to save large amounts of data to disk and may need additional time to shut down cleanly. The Service Control Manager (SCM) will wait indefinitely for services that request the pre-shutdown notification to shut down cleanly. There is one caveat though - the services that requested the pre-shutdown notification must be responsive. If the service stops responding to SCM queries, then they will be forcibly shut down after three minutes. Once all of the services have exited or the 3-minute timeout has expired, the SCM proceeds with services shutdown for the rest of the services.
|