"Plug and Play will make upgrading your computer so easy that even a child could do it." When Windows 95 was first released, Microsoft wanted us to believe that the Plug and Play service (also known as Plug and Pray) would end all of our device driver problems. As we all know, Plug and Play didn’t work quite as well as Microsoft originally claimed. It was a step in the right direction, though, and with Windows 98 came more improvements. The same can be said for Windows 2000, where Plug and Play makes its debut on the Windows NT platform. In this article, I will explore the Plug and Play service in Windows 2000 Professional.
The history of Plug and Play
So, what exactly is Plug and Play? Plug and Play is a combination of the computer system BIOS, hardware devices, operating system, device drivers, and system resources that dynamically detect and install hardware devices that have been added to a computer system. Rather than requiring you to know and understand the technical details involved in such a task, Plug and Play will automatically assign the system resources that are needed for the new device and will also locate and install the necessary driver software. In a nutshell, when connecting the new device, you should be able to turn the computer on and use the new device after Plug and Play installs and configures it for you. This concept is meant to end the days of manual device configuration and driver conflicts, providing nontechnical computer users with the ability to easily upgrade their computer systems. The goal was to make adding components such as a printer or scanner no more difficult than adding a toaster to your kitchen; once you plug it in, you can use it.
The Plug and Play service has three different levels of operation. At the lowest level, the BIOS, operating system, and devices are non-Plug and Play, requiring manual configuration of each device. This level of operation requires users to know and understand the intricate details that are involved when installing a new component in a system, such as allocating IRQs, memory addresses, and other systems resources. (Although there is no Plug and Play at this level, Microsoft still considers it a level of Plug and Play.)
The next rung up the Plug and Play ladder occurs when a Plug and Play operating system such as Windows 95 is used with non-Plug and Play legacy hardware. Using the Device Wizard to detect and configure new hardware, users can install new hardware in their computer system and then use the Device Manager to manually configure the system resources that the component needs.
Reaching the highest level of Plug and Play capability occurs when the BIOS, operating system, and system hardware are all Plug-and-Play-compliant. When a new device is added to the system, Plug and Play will detect it, install it, and configure the system resources and driver software for the component. The user doesn’t need to do anything but plug the device in and use it after it has been dynamically detected and configured. This is Plug and Play at its best, and when it works, it definitely makes everybody’s life much easier.
Windows 95 was the first Microsoft operating system that included Plug and Play support, and it lives on the middle rung of the Plug and Play ladder. When installed on a computer system that contains a Plug and Play BIOS, Windows 95 does a decent job of detecting Plug and Play hardware that is installed on a system. While the service is definitely not perfect, it was a good first step towards simplifying computers for the average person.
As with all things computer-related, over time, Plug and Play has evolved significantly. Windows 98 Plug and Play was designed with the OnNow initiative in mind, which defines a system-wide scheme for managing your computer system. To take advantage of all of the features that are available with OnNow, the system’s motherboard and BIOS must be Advanced Configuration and Power Interface (ACPI) compliant.
The ACPI provides a standard method for the management of power that is used by the computer’s hardware. The ACPI motherboard will provide Windows 2000 with information about all of the devices that are installed on it, allowing the operating system to automatically turn system devices off and on as they are needed. In addition, ACPI allows you to configure your computer to use different power management schemes so you can manage your laptop’s power consumption differently than you would on your desktop workstation.
To determine whether your computer system is ACPI-compliant, right-click on the My Computer icon and select Properties. Click on the Hardware tab and then click Device Manager, as shown in Figure A.
After accessing the Device Manager, you must change to the Devices By Connection view, as shown in Figure B. If your system is ACPI-compliant, you will see the ACPI value, as shown in Figure C.
If your hardware is ACPI-compliant, you can take advantage of the ACPI benefits; otherwise, Windows 98 and Windows 2000 are backward-compatible and support the legacy Plug and Play architecture of Windows 95.
While Windows 95 and 98 were designed with the nontechnical user in mind, Windows NT was designed for the business user and preached stability. Unfortunately, to make the operating system stable, Microsoft could not provide extensive Plug and Play support. Thus, Windows NT has very limited Plug and Play abilities, working only with the limited devices that are on the Hardware Compatibility List (HCL). Windows 2000 marks the first time that Plug and Play is part of the Windows NT platform.
How does Plug and Play detect devices in Windows 2000?
As stated earlier, Plug and Play is a combination of the BIOS, hardware devices, operating system, device drivers, and system resources. In this section, you will see how Plug and Play detects hardware on ACPI and non-ACPI legacy systems.
This first example shows you the steps that Windows 2000 takes when it detects a new USB device that has been added to an ACPI-compliant system. As previously discussed, when using an ACPI computer system, Windows 2000 will manage Plug and Play, not the system BIOS.
- When you add a new USB device to your computer system, the USB bus detects the new component and notifies the function driver of the change.
- The function driver notifies the Plug and Play Manager that a new device has been added to the system.
- The Plug and Play Manager queries the USB bus to locate the drivers for the current device tree. An Interrupt Request Packet (IRP) is sent from the Plug and Play Manager to the device stack to determine the devices that are currently on the USB bus.
- When the USB bus completes the IRP, it is sent back through the device stack to the Plug and Play Manager, which determines whether a new device has been added or removed.
- The Plug and Play Manager obtains information about the component and then begins to configure it.
- The Plug and Play Manager searches through the registry to determine whether the device has been previously installed on the system.
- If the device has not previously been attached to the system, the Plug and Play Manager updates the registry with information about the device.
- The Plug and Play Manager finds and loads the drivers for the device if they are present.
- The Plug and Play Manager assigns the necessary system resources to the device.
- The Plug and Play Manager sends an IRP to start the device.
If your system is not ACPI-compliant, you must disable Plug and Play operating system support in the system’s BIOS before installing Windows 2000. This will allow the BIOS to manage Plug and Play configuration. The following steps outline how Plug and Play is configured by the system BIOS.
- The BIOS isolates any Plug and Play ISA devices. The ISA specification did not provide a way for the system to isolate one card from another, and either the operating system or the BIOS must perform this task; since BIOS is managing Plug and Play, it will perform this function. PCI cards are automatically isolated and need no further help from the BIOS.
- A resource allocation map is built to determine the resources that all non-Plug and Play devices use.
- The BIOS determines the input and output devices that the system needs during the startup process.
- If the system determines that the boot device has a ROM, it initializes it.
- The BIOS configures the rest of the devices using the available system resources.
- All devices are activated.
- Any additional ROMs are initialized.
- The bootstrap loader is started.
Now that you understand how Windows 2000 detects and installs a new device, let’s look at the installation of a new CD-ROM drive. For this example, we will use the Add/Remove Hardware Wizard to install the device so that you can see each step.
To access the Add/Remove Hardware Wizard, follow the instructions provided earlier for Figure A. After selecting the Hardware tab, click on the Hardware Wizard button.
Click Next at the Add/Remove Hardware Wizard welcome screen. This action will take you to the Choose A Hardware Task dialog box, as shown in Figure D. To install a new device, choose Add/Troubleshoot A Device and then click Next.
The Add/Remove Hardware Wizard will search for any new hardware that has been installed on the system and will display each component it has found. An example of this is shown in Figure E, where we see that our new CD-ROM has been detected.
When the Add/Remove Hardware Wizard has found all of the new hardware, it will display it in a screen that looks similar to Figure F. As you can see, the CD-ROM drive was detected and installed. After clicking Next, you can click the Finish button on the subsequent screen to complete the wizard. We are now able to use the new device without doing any configuration or software installation. Windows 2000’s Plug and Play service has done all of this for us.
If you would like to view information about the devices that are installed on your system, you can click on the Device Manager button, as shown in Figure A. The Device Manager screen will be different for each system, but it should look similar to what is shown in Figure G.
To select a device, you can expand each device category and drill down until you find the specific device that you want to work with. To view the device properties, right-click on the component and select Properties, or highlight the specific device and select Properties from the View menu. The resulting dialog box should look similar to the one shown in Figure H, which shows you the properties of the CD-ROM drive that we just installed.
Plug and Play has definitely come a long way since the Windows 95 version. Coupled with the ACPI system interface, you can use it to dynamically manage all of the components that make up your computer system. This allows you to forget about which IRQ or driver to use and gives you more time to use the computer for the things you initially purchased it for.