Plug and Play

P

Plug and Play is a technology that provides support for automatically adding and removing devices in the system. In this way the conflicts related to the resources used by them are reduced by automatic configuration at system startup.

To meet these goals, the following characteristics are required:
– Automatic detection of adding and removing devices from the system (the device and its bus must notify the appropriate driver that a configuration change has occurred).
– Resource management (addresses, irq lines, DMA channels, memory areas), which includes allocating resources to devices and resolving conflicts that may occur.
– Devices must allow software configuration (device resources – ports, switches, DMA resources – must allow driver assignment).
– The drivers required for new devices must be automatically loaded by the operating system when needed.
– When the device and its bus allow, the system should be able to add or remove the device from the system while it is running, without the need to restart the system (hotplug).

For a system to support plug and play you must have the BIOS, operating system and device to support this technology. The device must have an ID to provide to the driver for identification, and the operating system must be able to identify these changes in configuration as they occur. Devices that support plug and play are: PCI (network card), USB (keyboard, mouse, printer), etc. Plug and play was first supported by the Widows 95 operating system but has since undergone dramatic changes. The evolution is largely due to the “OnNow” design initiative that seeks to define a global approach to the problems related to the configuration of the system and the devices with which it interacts.

A first result of this initiative is the ACPI “Advanced Configuration and Power Interface” interface, which defines a new system board and BIOS interface. Through these changes, Plug and play acquires new capabilities such as: power management and new configuration possibilities, all under the total control of the operating system. Starting with Windows 2000 the system that until then was named Plug and Play will be called Windows Driver Mmodel (WDM).
The Linux operating system was not from the beginning a plug and play system, but at present, these problems have been solved. When the system is started, the BIOS performs plug and play and configures the devices in the system. At startup, Linux can reconfigure these settings or accept them.

In Linux, each driver performs its own device configuration. This was a difficult thing, but now kernel mechanisms have been made available to the drivers to perform most of these operations. So, in a way, even now all the drivers realize the configuration of the devices, only that they do this by training the kernel on the operations that they must perform. Plug and play technology in Linux is mainly based on the Linux Device Model.

Unlike Linux, in Windows (starting with Win 95) the kernel takes care of configuring the devices and in this sense is really a plug and play system. Devices are automatically discovered during boot sequence or hotplug, automatically loading the appropriate drivers.

Windows Driver Model is a unified model that allows writing drivers whose source code is compatible for all Windows platforms.

The WDM model organizes drivers and devices in a stack. In close connection with the types of drivers, WDM also defines the type of objects that describe the devices associated with each driver in the stack (Device_Object):
1. Physical Device Object (PDO) – represents a device on a bus for a bus driver; there is one such object for each type of physical device and it is responsible for the low-level control of the device.
2. Functional Device Object (FDO) – represents a device for a functional driver; there is one such object for each logical or abstract function that is offered at a higher level.
3. Filter Device Object (filter DO) – represents a device for a filter driver; there can be filters for both physical and functional device objects.

Recent Posts

Archives

Categories