Plug and Play

The large variety of different cards that can be added to PCs to expand their capabilities is both a blessing and a curse. As you can see from the other sections that have discussed system resources, configuring the system and dealing with resource conflicts is part of the curse of having so many different non-standard devices on the market. Dealing with these issues can be a tremendously confusing, difficult and time-consuming task. In fact, many users have stated that this is the single most frustrating part of owning and maintaining a PC, or of upgrading the PC's hardware.

In an attempt to resolve this ongoing problem, the Plug and Play (also called PnP) specification was developed by Microsoft with cooperation from Intel and many other hardware manufacturers. The goal of Plug and Play is to create a computer whose hardware and software work together to automatically configure devices and assign resources, to allow for hardware changes and additions without the need for large-scale resource assignment tweaking. As the name suggests, the goal is to be able to just plug in a new device and immediately be able to use it, without complicated setup maneuvers.

A form of Plug and Play was actually first made available on the EISA and MCA buses many years ago. For several reasons, however, neither of these buses caught on and became popular. PnP hit the mainstream in 1995 with the release of Windows 95 and PC hardware designed to work with it.

Requirements for Plug and Play

Automatically detecting and configuring hardware and software is not a simple task. To perform this work, cooperation is required from several hardware and software areas. The four "partners" that must be Plug and Play compliant in order for it to work properly are:

System Hardware: The hardware on your system, through the system chipset and system bus controllers, must be capable of handling PnP devices. For modern PCI-based systems this is built in, as PCI was designed with PnP in mind. Most PCI-based systems also support PnP on their ISA bus, with special circuitry to link the two together and share resource information. Older PCs with ISA-only or VL-bus system buses generally do not support Plug and Play.
Peripheral Hardware: The devices that you are adding into the system must themselves be PnP compatible. PnP is now supported for a wide variety of devices, from modems and network cards inside the box to printers and even monitors outside it. These devices must be PnP-aware so that they are capable of identifying themselves when requested, and able to accept resource assignments from the system when they are made.

The System BIOS: The system BIOS plays a key role in making Plug and Play work. Routines built into the BIOS perform the actual work of collecting information about the different devices and determining what should use which resources. The BIOS also communicates this information to the operating system, which uses it to configure its drivers and other software to make the devices work correctly. In many cases older PCs that have an outdated BIOS but otherwise have support for PnP in hardware (PCI-based Pentiums produced between 1993 and 1995 are the prime candidates) can be made PnP-compliant through a BIOS upgrade.

The Operating System: Finally, the operating system must be designed to work with the BIOS (and thus indirectly, with the hardware as well). The operating system sets up any low-level software (such as device drivers) that are necessary for the device to be used by applications. It also communicates with the user, notifying him or her of changes to the configuration, and allows changes to be made to resource settings if necessary. Currently, the only mainstream operating system with full PnP support is Windows 95.
As you can see, you need a lot for Plug and Play to work, and this is why the vast majority of older systems (pre-1996) do not properly support this standard.

Plug and Play Operation

Most of the actual work involved in making Plug and Play function is performed by the system BIOS during the boot process. At the appropriate step of the boot process, the BIOS will follow a special procedure to determine and configure the Plug and Play devices in your system. Here is a rough layout of the steps that the BIOS follows at boot time when managing a PCI-based Plug and Play system:

Create a resource table of the available IRQs, DMA channels and I/O addresses, excluding any that are reserved for system devices.

Search for and identify PnP and non-PnP devices on the PCI and ISA buses.

Load the last known system configuration from the ESCD area stored in non-volatile memory.

Compare the current configuration to the last known configuration. If they are unchanged, continue with the boot; this part of the boot process ends and the rest of the bootup continues from here.

If the configuration is new, begin system reconfiguration. Start with the resource table by eliminating any resources being used by non-PnP devices.

Check the BIOS settings to see if any additional system resources have been reserved for use by non-PnP devices and eliminate any of these from the resource table.

Assign resources to PnP cards from the resources remaining in the resource table, and inform the devices of their new assignments.

Update the ESCD area by saving to it the new system configuration. Most BIOSes will print a message when this happens like "Updating ESCD ... Successful".

Continue with the boot.

Extended System Configuration Data (ESCD)

If the BIOS were to assign resources to each PnP device on every boot, two problems would result. First, it would take time to do something that it has already done before, each boot, for no purpose. After all, most people change their system hardware relatively infrequently. Second and more importantly, it is possible that the BIOS might not always make the same decision when deciding how to allocate resources, and you might find them changing even when the hardware remains unchanged.

ESCD is designed to overcome these problems. The ESCD area is a special part of your BIOS's CMOS memory, where BIOS settings are held. This area of memory is used to hold configuration information for the hardware in your system. At boot time the BIOS checks this area of memory and if no changes have occurred since the last bootup, it knows it doesn't need to configure anything and skips that portion of the boot process.

ESCD is also used as a communications link between the BIOS and the operating system. Both use the ESCD area to read the current status of the hardware and to record changes. Windows 95 reads the ESCD to see if hardware has been changed and react accordingly. Windows 95 also allows users to override Plug and Play resource assignments by manually changing resources in the Device Manager. This information is recorded in the ESCD area so the BIOS knows about the change at the next boot and doesn't try to change the assignment back again.

The ESCD information is stored in a non-volatile CMOS memory area, the same way that standard BIOS settings are stored.

Note: Some (relatively rare) systems using Windows 95 can exhibit strange behavior that is caused by incompatibility between how Windows 95 and the BIOS are using ESCD. This can cause an "Updating ESCD" message to appear each and every time the system is booted, instead of only when the hardware is changed.

Plug and Play and Non-Plug-and-Play Devices

Devices that do not support the PnP standard can be used in a PnP system, but they present special problems. These are called legacy devices, which is geekspeak for "old hardware we have to keep using even though it doesn't have the capabilities we wish it did". :^) They make resource assignment much more difficult because they cannot be automatically configured by the BIOS.

Generally, the BIOS deals with non-PnP devices by ignoring them. It simply considers them as "part of the scenery" and avoids any resources they are using. There is usually no problem using these devices with PnP, but using too many non-PnP devices can make it more difficult for PnP to work, due to the large number of resources that it is not allowed to touch.

"Plug and Pray" :^)

This amusing sarcastic name for Plug and Play has become all too commonly heard these days. It refers to the large number of problems associated with getting Plug and Play to work on many systems. It's odd to consider--wasn't the whole point of Plug and Play to make it easier to configure systems? It is, but unfortunately PnP falls short of its lofty goal in many cases.

When you use PnP, you are essentially turning over control of system configuration to the PC. The problem is a common one in computers: the computer isn't as smart as the human, or more specifically, the computer isn't as "resourceful" (no pun intended. :^) ). Computers are not nearly as good as humans at realizing things like this: "Well, if I put the modem at that value and the printer there, I will have a conflict. But I can fix that by changing the assignment for the sound card, moving the modem over here, and putting the printer there". The system can take care of the simple situations, but can become confused by more complicated ones. The use of multiple "legacy" ISA devices can exacerbate this. Generally, the more complex your setup, the more likely you will need to manual "tweak" whatever PnP comes up with by default.

The biggest problems with Plug and Play revolve around its apparent "stubbornness". At times, the BIOS and operating system seem determined to put a device at a location where you do not want it. For example, you may have a modem that you want at COM3 and IRQ5, but the BIOS may decide to put it at COM4 and IRQ3, conflicting with the COM2 serial port. This can get quite aggravating to deal with. Also, some people just prefer the feeling of being "in control" that they lose when PnP is used. (I must admit to being one of these people, oftentimes.)

The problems with PnP are less common now than they were in the first year that it was announced. As with any new technology--especially one that is as complex as PnP and that involves so many parts of the system--it takes time to iron the bugs out. Most systems today work quite well with PnP. In most cases problems with PnP are due to incorrect system configuration, manual overrides of PnP devices through the Windows 95 Device Manager, or incorrect BIOS settings.

Home Information Page HTML Lessons Java Script Lessons