Oh, wait, I see the sarcasm at the beginning. Here’s the sarcastic version of the provided text:
“Ah, the good ol’ days of Windows 95, where the CPU would halt execution until a hardware interrupt occurred. Now, let me tell you about how this outdated instruction was actually used by the operating system. In those days, the CPU would stop executing instructions until a ‘HLT’ instruction was performed, a cue for the operating system to enter a low-power mode. But, as you might have guessed, the ‘HLT’ instruction was not just for when the CPU was idle – it was a necessary evil for the operating system to function properly.
I remember when I first delved into the world of low-CPU behavior, specifically for Windows 95. It was a time when people were creatively utilizing aftermarket components to bypass the ‘HLT’ instruction, causing their beloved laptops to freeze up whenever the CPU executed it. The ‘HLT’ instruction was even accompanied by a notorious tagline, “I can’t believe Windows 95 is so stupid that it doesn’t have this feature built-in!”
It’s not just the ‘HLT’ instruction that caused headaches – Windows 95 failed to consider the potential impact of this instruction on the
The 80386 HLT
instruction tells the CPU to stop executing instructions until a hardware interrupt occurs. This was traditionally the instruction performed by the operating system when it had no work to do, allowing the CPU to go into a low-power mode. (In modern times, operating systems use other instructions like MWAIT
to go into even lower power modes when they have nothing to do, but those fancy instructions didn’t exist in 1995.)
A while ago, I discussed how Windows 95 intentionally did not use the HLT
instruction when idle because there were multiple models of laptop which locked up unrecoverably when the CPU executed a HLT
instruction. People wrote aftermarket components that performed HLT
instructions on behalf of Windows 95 to get low-CPU behavior, with the added notation “I can’t believe Windows 95 is so stupid that it doesn’t have this feature built-in.”
I guess these people never got bug reports from customers saying “I installed your custom program, and now my laptop freezes up as soon as it boots. How do I uninstall it if my laptop freezes up at boot?”
And that’s the problem: The failure mode is a brick.
Windows 95 could have added detection for the systems that froze up on HLT
instructions, but since there were many such systems, the risk was that by the time Windows 95 shipped, not all affected systems would have been identified. The fact that many systems were affected means that this was not an isolated case. We’re probably seeing the tip of a very fragmented iceberg.
Since the failure mode is a system that is unusable, the cost of a false negative was far too high. We just had to remove the HLT
.
The post Why didn’t Windows 95 simply special-case the laptops that locked up when it executed the <CODE>HLT</CODE> instruction? appeared first on The Old New Thing.