Why does DOS use 100% CPU under Virtual PC?
来源:互联网 发布:淘宝无线运营教程 编辑:程序博客网 时间:2024/04/30 16:42
Why does DOS use 100% CPU under Virtual PC?
From time to time someone notices that when they run DOS under Virtual PC it uses 100% of the host CPU to do absolutely nothing, and wonder why this is the case. The answer is relatively simple - and it is: 'DOS is never actually doing nothing'.
Most modern operating systems are designed with the concept of being able to 'do nothing'. That is - if the user is not actively providing input, and no programs are demanding attention - most operating systems will tell the CPU to 'do nothing' (usually through a HLT command - or through some more advanced power state commands).
DOS does not do this.
So when DOS is sitting at the command prompt 'doing nothing' it is actually in a very tight loop of code which is responsible for blinking the cursor and checking for new user input. As we operate at a very low level - there is no way for us to tell if DOS is actually doing something productive with the CPU or just 'running around in circles'. To help deal with this - there is a utility called 'IDLE.COM' that is part of the Virtual Machine Additions for DOS - which is able to send 'HLT' commands when it detects that DOS is 'doing nothing'. However if you start any program (like EDIT) then your CPU usage will go up to 100% again.
So at the end of the day - if you are using DOS under Virtual PC you are pretty much going to have to learn to live with the fact that it will try to use as much CPU as possible at all times.
Cheers,
Ben
- Why does DOS use 100% CPU under Virtual PC?
- DOS Under Microsoft Virtual PC 2007
- Virtual PC and Dos
- virtual pc 5.2 + dos
- Why does a virtual function get hidden?
- Virtual PC 2007 安装DOS附加模块
- Virtual PC 2004下dos安装虚拟机
- Why does a declared property use both retain and readonly?
- Why does MariaDB 10.2 use InnoDB instead of XtraDB?
- About install linux ON virtual PC by use of VMware
- Virtual PC 中安 装ms dos 6.22
- Virtual PC 中安 装ms dos 6.22
- Virtual PC 中安装DOS的共享文件夹模块
- Virtual PC 中安 装ms dos 6.22
- Virtual PC下安装MS-Dos及Linux总结
- Virtual PC 中安 装ms dos 6.22
- virtual pc 2007 装dos系统 文件模块共享问题
- Virtual PC 中安 装ms dos 6.22
- 应届毕业生面试的几点经验
- 五种提高 SQL 性能的方法
- 用 Python写 daemon
- 使命与召唤
- 四季情
- Why does DOS use 100% CPU under Virtual PC?
- VBS脚本中的循环
- 正则表达式的规则
- WAMP + Zend Framework + Zend Studio For Eclipse 开发环境搭建
- Delphi Stream 介绍
- 面试陷阱问题巧做答
- 常用的几个自定义SQL
- [转]二十四式太极拳攻防含义拆解
- Linux下Oracle10g的安装