device dirver

驱动程序, 又称驱动。 英文名字为device driver(设备驱动器), 或者直接成为driver,  是一个computer Program, 用于操作或者控制a particular types of devices that is attached to a computer。 一个驱动, 为硬件设备(hardware devices)提供了一个软件接口(software interface)。  这样就可以使得我们的操作系统或者其他的computer Program 能够access hardware functions without needing to know precise details of the hardware being used。

driver 通过computer bus(计算机总线) 连接控制着硬件设备。 

操作系统的位置如下:





driver (驱动程序)当然是Linux系统中kernel的一部分了。   



从user 的角度看(即我们的视角), 我们能够看到的是一个device(设备)连接到我们的计算机上, 在Linux操作系统中就是(映射为)一个File(文件)。 

事实上 , 这个device文件talk to a device driver。  然后send information to the eventual hardware。 

例如, 用户打开下面的device0的文件, 于是开始reading information or writing information  from this device.  ie, when this device is invoked,  it will return an invokation of the device driver, 然后这个驱动开始“speaks to the hardware”, and does whatever the user applies。 



另外, kernel中有很多的driver, 不同的driver通过major number区分。 同一个driver可以连接多个device File(每个device 映射到Linux就是一个device, 也即一个device), 这些连接到同一driver的device 通过minor number 区分的:

 


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值