[ Home ][ About ][ Experience ][ Contact ]

Switching Between SMP and Uniprocessor NT HALs

When troubleshooting an application on multiprocessor machine running Windows NT, it's sometimes prudent to make sure that the problem is not related to the multiprocessor configuration. There are plenty of programs out there that were apparently not tested on multiple processor machines, and  malfunction when run in that configuration. While it is quite easy to upgrade from a single processor configuration to a multiprocessor one using the UPTOMP program, switching back and forth between single and multiple processor modes is poorly documented by Microsoft. Incidentally, this technique applies to Windows NT 3.x, 4.x, and to Windows 2000. This technique is intended for use only be professional technicians who have an understanding of the NT BOOT.INI file, and at least a basic knowledge of the workings of the NT kernel. Additionally, this technique assumes that the NT system is already properly running in a multiprocessor configuration. As with any process that modifies the workings of Windows NT, you should perform a full backup before implementing  this technique.

The processor configuration used by Windows NT (for simplicity's sake, I'll refer to Windows 2000 as NT also, since the information presented here applies to both systems) is determined by two files that are loaded at boot time by NT: HAL.DLL and NTOSKRNL.EXE. These files are always installed with the these names, however, they come from different sources depending on how your system is configured. There are several different versions of HAL.DLL that apply to various specialized hardware configurations. Some fairly generic ones are included on the Windows NT installation disks and service packs, others are provided by vendors (such as Compaq) to introduce special functionality for their machines. The NTOSKRNL.EXE file is available in two versions: a uniprocessor version (called NTOSKRNL.EXE on the installation disks and services packs), and a multiprocessor version (called NTKRNLMP.EXE on the installation disks and services packs). The versions of these two files that are loaded at boot time determine the configuration your system will run in. By overriding which versions of the files load, you can force a multiprocessor machine to boot in a uniprocessor configuration. This is done by modifying the Windows NT BOOT.INI file, which is located on the system partition (almost always Drive C). 

The first thing you need to do is get current copies of the uniprocessor HAL.DLL and NTOSKRNL.EXE files, rename them to UNIHAL.DLL and UNIKRNL.EXE, and copy the renamed files to the WINNT\SYSTEM32 folder on the boot partition. VERY IMPORTANT: If you have installed any NT service packs (which should be the case), you must get these files from the service pack that is currently installed on your NT machine and not the NT installation disks. In order to do this, you must expand the service pack executable to retrieve the files. The easiest way to do this is to start to reapply the service pack, and when prompted to accept the license agreement, find the HAL.DLL and NTOSKRNL.EXE files in your TEMP directory, rename and copy them as described above, and then cancel the installation of the service pack.

Once you have these two files in your WINNT\SYSTEM32 directory, you must add a line to your BOOT.INI file that indicates that NT should boot with these two files. To do this, copy the entry in your BOOT.INI file that you normally use to start NT, and add these two parameters to the copy of the line:

/hal=unihal.dll /kernel=unikrnl.exe

You should then rename the modified entry to something like "Boot with Uniprocessor HAL." The relevant lines from my BOOT.INI file look like this:

multi(0)disk(0)rdisk(0)partition(2)\WINNT="WinNT Workstation v4 2 CPUs (MPS)" /sos

multi(0)disk(0)rdisk(0)partition(2)\WINNT="WinNT Workstation v4 1 CPU (UniProc)" /hal=unihal.dll /kernel=unikrnl.exe /sos

Once you have added the new line to your BOOT.INI file, reboot the machine, and you will be presented with an extra boot menu choice allowing you to start your system in uniprocessor mode. You will also note that I've added the /SOS parameter to these lines on my machine; this forces NT to show which files are loaded during the first phase of the boot process, and forces NT to check each partition's integrity during the boot.

There is one other technique that you should be aware of for overriding the processor configuration: the /ONECPU switch. This forces NT to boot with only one processor enabled, regardless of which HAL.DLL and NTOSKRNL.EXE are used. When I do run across situations where switching to the uniprocessor mode solves a problem, I like to verify that it is the multiple processor configuration that's causing the problem, not just some obscure problem with the multiprocessor HAL that I'm running. To facilitate this, I have an additional line in my BOOT.INI file:

multi(0)disk(0)rdisk(0)partition(2)\WINNT="WinNT Workstation v4 1 CPU (MPS)" /onecpu /sos

This line boots my system with the multiprocessor HAL.DLL and NTOSKRNL.EXE, but with only one processor enabled, and allows me to validate any assumptions about a problem being related to a multiple processor configuration vs. a conflict with the specific multiprocessor HAL.DLL and NTOSKRNL.EXE files that I'm using.

 

Coming Soon - Some favorite NetWare Installation Tips

Last Article - Backing Up Software Registry Settings

Articles (C) 1999-2000 Praecelsus Consulting, Inc. All Rights Reserved, however, permission is granted to copy and distribute this article verbatim for non-commercial purposes as long as the author (Erik Carlseen / Praecelsus Consulting, Inc.) and source (www.praecelsus.com) are attributed and specified.

[ Home ][ About ][ Experience ][ Contact ]

(C) 1999-2000 Praecelsus Consulting, Inc. All Rights Reserved.