linux DM模型介绍

Overview

Plug and Play is a technology that offers support for automatically adding and removing devices to the system. This reduces conflicts with the resources they use by automatically configuring them at system startup. In order to achieve these goals, the following features are required:

  • Automatic detection of adding and removing devices in the system (the
    device and its bus must notify the appropriate driver that a
    configuration change occurred).
  • Resource management (addresses, irq lines, DMA channels, memory
    areas), including resource allocation to devices and solving
    conflicts that may arise.
  • Devices must allow for software configuration (device resources -
    ports, interrupts, DMA resources - must allow for driver assignment).
  • The drivers required for new devices must be loaded automatically 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
    having to reboot the system (hotplug).

For a system to support plug and play, the BIOS, operating system and the device must support this technology. The device must have an ID that will provide to the driver for identification, and the operating system must be able to identify these configuration changes as they appear.

Plug and play devices are: PCI devices (network cards), USB (keyboard, mouse, printer), etc.

Prior to version 2.6, the kernel did not have a unified model to get information about devices. For this reason, a model for Linux devices, Linux Device Model, was developed.

The primary purpose of this model is to maintain internal data structures that reflect the state and structure of the system. Such information includes what devices are in the system, how they are in terms of power management, what bus they are attached to, what drivers they have, along with the structure of the buses, devices, drivers in the system.

To maintain this information, the kernel uses the following entities:

  • device - a physical device that is attached to a bus
  • driver - a software entity that can be associated with a device and
    performs operations with it
  • bus - a device to which other devices can be attached
  • class - a type of device that has a similar behavior; There is a
    class for disks, partitions, serial ports, etc.
  • subsystem - a view on the structure of the system; Kernel subsystems
    include devices (hierarchical view of all devices in the system),
    buses (bus view of devices according to how they are attached to
    buses), classes, etc.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值