Some like it hot
DOS guest in VirtualBox is heating up the host machine
Have you ever wondered why the fan
starts running when you run a DOS or FreeDOS guest in VirtualBox for a
few minutes? Just see for yourself:

Windows XP with VirtualBox 3.2.10

Ubuntu 10.04 with VirtualBox 4.0.12

Mac OS X 10.6.8 with VirtualBox 4.1.4
In all screenshots you see a VirtualBox FreeDOS guest running
FreeDOS Edit with no open document. The appropriate instruments (Task
Manager, System Monitor, Activity monitor) of the operating systems
show that one processor of the host machine is completely occupied by
the VirtualBox guest.
The host machines are a Thinkpad X60T (Windows, Ubuntu) and a
MacBook Pro (2011).
MS-DOS has the same problem
Of course it is kind of absurd to think a program like FreeDOS Edit,
which has a size of 64kB, requires the full power of a Core2Duo or an
i5. I doesn't need it. It is just a common problem of the DOS operating
system and DOS programs, that becomes obvious if you run them in
VirtualBox. MS-DOS has the same problem:

MS-DOS 6.22 running as guest in VirtualBox 4.1.4
As I have learned, the problem has something to do with the HLT
instruction and the IDLE mode of the CPU. As far as I understand it,
DOS programs seem to forget to signal the CPU that they don't need it
any more. VirtualBox on the other hand gives these programs unlimited
access to the CPU and reserves it for them. This seems a bit careless
to me.
Warning!
I seriously doubt that it is healthy for any computer to run for a
longer time with 100% CPU usage.
If I have a DOS guest running for some time in VirtualBox, with full
CPU usage, OS X eventually will pop up a nice half transparent window.
It tells me that my computer needs now to be shut down and that I
should push the power button long enough to do so. It's the Mac version
of the BSOD.
If the Mac automatically shuts down to prevent damage, I think it
is correct to assume that running a DOS/FreeDOS guest in VirtualBox can
cause damages.
Possible Solutions: 1. Settings in VirtualBox
First of all limit the processor usage for your DOS/FreeDOS guest.
This can be easily done in VirtualBox.

I can recommend a setting of 40%. I can not feel any difference in
the look and feel of the DOS guest. The computer will not get as hot as
before and the fan won't run as much as with a CPU usage of 100%.
2. Use DOS Power Management
Using power management solves the problem as long as you use the
shell / work at the DOS prompt.
To use power management in MS-DOS, edit your CONFIG.SYS to have a
line:
C:\DOS\POWER.EXE
To use power management in FreeDOS, edit your AUTOEXEC.BAT to have a
line:
LH FDAPM APMDOS
Unfortunately the CPU usage may go up again if you start other
programs.
3. Use better DOS software
As Marcos Favero Florence de Barros writes
on the FreeDOS user mailing list, there are several DOS programs that
work correctly in VirtualBox and do not heat up your machine. He
mentions these examples:
Norton Commander clones: DOSZIP, DOS Navigator, NDN and CONNECT.

As you see in the picture above, you have to activate in DOSZIP a
setting to prevent it from using 100% of your CPU in VirtualBox: Got to
Setup, System Options and check the "Use DOS Idle
Int 2Fh" checkbox.
Editors: He suggests Aurora,
FTE, MinEd, PEdit, SetEdit, TDE and WordPerfect
6.
Viewers: For instance: "List".
4. Try to use a DOS TSR that controls the CPU usage of
applications
Another tip of Marcos is the use of a DOS TSR (Terminate and Stay
Ready) program, that runs in the background and limits the CPU usage of
other applications.
One of them is the shareware TAME, which is still continued
and can be tried for 30 days.
The other one is called DPAKBD
which seems to be freeware (but not Open Source).
I just looked into DPAKBD, but found that the applications get too
sluggish. But this was just a short experiment.
Conclusion
Running a DOS or FreeDOS guest in VirtualBox can get a hot
experience. Take care to protect your host machine by limiting the
processor usage for the guest. It is also a good idea to enable Power
management. It may be a bit inconvenient, but try to use other programs
than those you are used to, if you want to avoid loud fan noises and
possible problems with your hardware.
The good news: Other than MS-DOS, FreeDOS is still developed and its
developers are aware of the problem and are trying to solve it.
|