Raymond Chen, a Microsoft veteran, has explained how pressing the Shift key during a Windows 95 restart enabled a faster reboot by mitigating memory fragmentation. This mechanism worked by utilizing the EW_RESTART_WINDOWS flag within the 16-bit ExitWindows function.
Memory Management Technique
When Windows 95 was restarted with the Shift key, the 16-bit kernel would first shut down, followed by the 32-bit virtual memory manager. The CPU then switched to real mode, executing the win.com file, which controlled the restart process.
The .com files have access to the remaining conventional memory. The win.com file released memory beyond its image, forming a large contiguous block essential for loading protected-mode Windows. If no other program allocated memory in this space, a faster re-launch of the interface was possible.
Conditions for Fast Restarts
Despite the mechanism's potential, complications could arise if device drivers or programs allocated memory, causing fragmentation. This would force win.com to conduct a full reboot instead, negating the restart speed benefits.
Chen's insight into this process highlights a clever optimization within Windows 95—simplifying restarts under specific conditions by ensuring a contiguous memory layout.