VOGONS


First post, by spoony1971

User metadata
Rank Newbie
Rank
Newbie

Before XP, windows used busy-wait loop when idling. Can virtual machines handle this busy-wait loop efficiently now? If it can, which virtual machine can do it?

I want to use an older windows but worry about efficiency for lack of HLT support

Reply 1 of 8, by spoony1971

User metadata
Rank Newbie
Rank
Newbie

I prefer qemu for its performance. But there may be better alternatives.

Reply 2 of 8, by mkarcher

User metadata
Rank l33t
Rank
l33t

There were tools for Windows 95 or 98 you could run in the background that issued an HLT instruction if the system is idle. Try searching for "rain" or "waterfall" if you experience that qemu uses 100% of a core while the guest is idle.

Reply 3 of 8, by UCyborg

User metadata
Rank Oldbie
Rank
Oldbie

Windows 98 does support ACPI and HLT. At least when installing in VirtualBox, setup must be run manually through DOS with special parameter as support is not recognized by default.

I think it's: setup /P J

If I'm not misremembering. Not sure about performance, but I thought not using HLT just wastes power.

Arthur Schopenhauer wrote:

A man can be himself only so long as he is alone; and if he does not love solitude, he will not love freedom; for it is only when he is alone that he is really free.

Reply 4 of 8, by Ringding

User metadata
Rank Member
Rank
Member

What is "before XP"? Windows NT has always used HLT.

Reply 5 of 8, by Jo22

User metadata
Rank l33t++
Rank
l33t++

If Windows 98 uses APM or uses no power managment at all, then the CPU load might be high.
Re: Windows 98SE install problem

Anyway, there had been third-party solutions for Windows 3.x/9x and DOS.
For Windows 3.1x there's WQGHLT (by Weiqi Gao), for Windows 98 there's amnhltm, Raine etc. For DOS, there's DOSIdle.

MS-DOS 6.22 also has power.exe, which uses energy savings.
In principle, power saving support exist since 386SXL. Some NEC CPUs had it, too.

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//

Reply 6 of 8, by spoony1971

User metadata
Rank Newbie
Rank
Newbie

Thanks for all replies, now I know that it is possible to enable HLT support even before XP.

Here are instructions to enable HLT in windows 2000.

Making Windows 2000 issue the HLT instruction when idling requires modifying the OS's idle loop behavior. Here's how you can approach this:

Background:
The HLT instruction halts the CPU until an interrupt occurs, reducing power consumption.
Windows 2000's idle loop is handled by the kernel (ntoskrnl.exe).
By default, Windows 2000 may use a busy-wait loop or HLT depending on HAL (Hardware Abstraction Layer) and power management settings.
Methods to Enable HLT:
1. Registry Tweak (Preferred Method)
Windows 2000 has a registry setting that can force the use of HLT:

Open regedit.exe.
Navigate to:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Power
Create or modify a DWORD value named Hiberboot and set it to 1.

Reply 7 of 8, by mkarcher

User metadata
Rank l33t
Rank
l33t

According to Raymond Chen, a Microsoft Employee, Windows 95 didn't use HLT because of some incompatible hardware, see the posts on his blog "The Old New Thing" titled Hardware backwards compatibility and Why didn’t Windows 95 simply special-case the laptops that locked up when it executed the HLT instruction?.

English Wikipedia claims that Windows NT already used HLT: https://en.wikipedia.org/wiki/HLT_(x86_instruction): In Windows NT, for example, this instruction is run in the "System Idle Process".

spoony1971 wrote on Today, 00:34:

Navigate to:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Power
Create or modify a DWORD value named Hiberboot and set it to 1.

The registry patching instruction you quote is an AI hallucination. The setting quoted there is not connected the the HLT instruction at all, but instead that setting is related to the "fast boot" feature introduced with Windows Vista or Windows 7, which replaces the traditional "shut down" and "boot up" procedures by "suspend (the OS after killing all user tasks) to disk" and "resume the OS from disk and then start up fresh user tasks". ("Hibernation" instead of "boot", thus the name).

Reply 8 of 8, by jakethompson1

User metadata
Rank Oldbie
Rank
Oldbie

Linux 2.0/2.2 also have a test of whether HLT works, and the source code blames it on "Problems on some 486Dx4's and old 386's" -- could the association with laptops actually be a 486DX4 erratum?
One comment on the second Old New Thing blog post suggests that OS/2 hit this issue first.