A computer hang is quite a troublesome thing for the operator. When a hang occurs, it usually shows up as a “blue screen,” failure to boot the system, the screen “freezing” with no response, the mouse and keyboard unable to accept input, abnormal interruption while software is running, etc. Although there are many causes of hangs, they all ultimately come down to two aspects: hardware and software. Hangs caused by hardware reasons 【Poor heat dissipation】 The monitor, power supply, and CPU all generate a great deal of heat while working, so maintaining good ventilation is very important. If the monitor overheats, it can cause color and image distortion and even shorten the monitor’s lifespan. Working too long can also cause poor heat dissipation in the power supply or monitor and lead to a computer hang. CPU heat dissipation is an important issue related to the stable operation of the computer, and it is also a “disaster-prone area” for cooling failures. 【Improper movement】 Strong vibration while moving the computer often loosens internal components, causing poor contact and leading to a computer hang, so violent shaking should be avoided when moving a computer. 【Dust killer】 Excessive dust inside the machine can also cause hang failures. For example, if too much dust sticks to the floppy drive head or CD-ROM laser head, it will cause read/write errors, and in serious cases may cause the computer to hang. 【Device mismatch】 For example, if the motherboard’s main frequency and the CPU’s main frequency do not match, or when overclocking an old motherboard the external frequency is set too high, stable operation may not be guaranteed, thus causing frequent hangs. 【Software/hardware incompatibility】 Some 3D software and certain special software may fail to start or even install normally on some PCs, and this may involve software/hardware compatibility problems. 【Memory module failure】 This is mainly caused by a loose memory module, cold solder joints, or the quality of the memory chips themselves. Memory contact faults should be ruled out according to the specific situation; if there is a quality problem with the memory module, the memory must be replaced to solve it. 【Hard disk failure】 This is mainly due to hard disk aging or bad tracks and bad sectors caused by improper use. In this case, the machine is very prone to hanging during operation. Special tool software can be used for troubleshooting; if the damage is severe, the hard disk can only be replaced. In addition, for motherboards that do not support UDMA 66/100, attention should be paid to the hard disk operating mode setting in CMOS. 【CPU overclocking】 Overclocking raises the CPU’s working frequency, but it may also make its performance unstable. The reason is that the CPU’s speed in accessing data in memory is already faster than the speed at which memory and the hard disk exchange data, and overclocking makes this contradiction even more prominent, increasing the chances of not being able to find the required data in memory or virtual memory, thus causing “abnormal errors.” The solution is of course quite simple: return the CPU to its normal frequency. 【Hardware resource conflicts】 These are caused by configuration conflicts in the sound card or display card, leading to abnormal errors. In addition, if other devices have interrupt, DMA, or port conflicts, a few drivers may behave abnormally and cause a hang. The solution is to boot in “Safe Mode” and make appropriate adjustments in “Control Panel” → “System” → “Device Manager.” For abnormal errors produced in drivers, the registry can be modified. Select “Run,” type “REGEDIT,” enter the registry editor, then use the “Find” function under the menu to locate and delete all “primary keys” and “key values” related to the driver prefix string, then restart. 【Insufficient memory capacity】 The larger the memory capacity, the better; it should not be less than 0.5–1% of the hard disk capacity. If this problem occurs, the solution is to replace it with as large a memory module as possible. 【Inferior components】 A few unscrupulous dealers, when assembling compatible machines for customers, use poor-quality boards and memory, and some even sell counterfeit motherboards and remarked CPUs and memory. Such machines are very unstable in operation, and hangs are unavoidable. Therefore, users should be vigilant when buying a computer, and can use some newer tool software to test the machine, run it continuously for a long period (such as 72 hours), and try to get as long a warranty period as possible. Hangs caused by software reasons 【Virus infection】 Viruses can sharply reduce a computer’s working efficiency and cause frequent hangs. At this time, antivirus software such as KV300, Kingsoft Antivirus, Rising, etc. should be used for a full virus scan and removal, and the antivirus software should be updated regularly. 【Improper CMOS settings】 This type of fault is very common. For example, improper hard disk parameter settings, mode settings, or memory parameter settings may prevent the computer from booting. For example, if memory without ECC capability is set as if it had ECC capability, memory errors will cause a hang. 【Accidental deletion of system files】 Since Windows 9x requires files such as Command.com, Io.sys, Msdos.sys, etc. to start, if these files are damaged or accidentally deleted, then even if all hardware settings in CMOS are correct, it will still be useless. Solution: boot the computer with a startup disk of the same version of the operating system, then type “SYS C:” to transfer the system files again. 【Initialization files damaged】 Since Windows 9x needs to read System.ini, Win.ini, and the registry files at startup, and if Config.sys and Autoexec.bat exist, those two files will also be read. As long as these files contain wrong information, a hang may occur, especially these four files: System.ini, Win.ini, User.dat, and System.dat. 【Dynamic link library (DLL) files missing】 In the Windows operating system there is another kind of file that is also quite important: dynamic link library files with the extension DLL. By nature, these files belong to the shared class, meaning that one DLL file may be called by multiple programs while running. When we delete an application, its uninstall program records the files it installed and prepares to delete them one by one. At this time it is easy for a deleted DLL file to still be used by other software. If the missing DLL file is an important core link file, then the system may hang or even crash. We can use tool software such as “Super Rabbit” to delete useless DLL files, which will avoid accidental deletion. 【Too little remaining hard disk space or too many fragments】 If there is too little remaining hard disk space, some applications need a large amount of memory to run, and this requires virtual memory, which is provided by the hard disk, so the hard disk must have enough free space to meet the needs of virtual memory. At the same time, users should develop the good habit of regularly defragmenting the hard disk and cleaning junk files from it. 【BIOS upgrade failure】 The BIOS should be backed up in case of trouble, but if your system needs a BIOS upgrade, then before upgrading you had better make sure that the BIOS version you are using matches your PC. If the BIOS is upgraded incorrectly, or if there is an unexpected power failure during the upgrade, your system may fail to boot. So before upgrading the BIOS, be sure to determine the BIOS model clearly. If the BIOS upgrade tool you use can back up the current BIOS, then copy the old BIOS onto disk. At the same time, check whether the system supports BIOS recovery, and also know how to restore it. 【Improper software upgrading】 Most people may think there will be no problem with software upgrades, but in fact, some shared components are also upgraded during the process, and other programs may not support the upgraded components, thus causing various problems. 【Abuse of beta software】 It is best to use as little beta software as possible, because test software usually has some BUGs or is not stable enough in some respects. After use, it may cause program errors with data loss, hangs, or the system may fail to boot. 【Improper software removal】 Do not directly delete the directory where the software is installed. If you delete it directly, there will be a lot of junk left in the registry and the Windows directory. Over time, the system will become unstable and cause hangs. 【Using pirated software】 Because such software may hide viruses, once executed they may automatically modify your system, causing hangs during operation. 【Defects in application software】 This situation is common. For example, in Win 98, some 16-bit applications that run well in DOS or Windows 3.1 may cause trouble. Win 98 is 32-bit; although it claims compatibility, in many places it cannot coordinate with 16-bit applications. There are also other cases, such as peripheral drivers that work normally under Win 95 but may have problems after the operating system is upgraded, causing the system to hang or fail to start normally. In this case, the newer version of the peripheral’s driver should be found. 【Too many startup programs】 This exhausts system resources, so some programs cannot find the data they need in memory or virtual memory, and abnormal errors may also occur. 【Illegal operations】 Improperly opening or releasing related programs with illegal formats or illegal parameters can also cause the computer to hang. Please be sure to remember the correct formats and relevant parameters, and do not casually open or release unfamiliar programs. 【Abnormal shutdown of the computer】 Do not directly use the power button on the case, otherwise system files may be damaged or lost, causing hangs during auto-start or operation. For systems such as Windows 98/2000/NT, this is very important; in serious cases, it may cause the system to crash. 【Conflicts in memory】 Sometimes all kinds of software run normally, but then the computer hangs for no apparent reason. After restarting, those applications run perfectly normally again. This is a false hang phenomenon. The reason is mostly memory resource conflicts in Win 98. As everyone knows, application software runs in memory, and after an application is closed, memory space is released. But due to design reasons, some application software cannot completely release memory even after being closed. When the next program needs to use that memory address, a conflict occurs.
以C语言软件开发为主:http://sunny1979.icpcn.com


