QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 833|回复: 1

User-level device drivers

[复制链接]
发表于 2004-9-24 21:57:43 | 显示全部楼层 |阅读模式
http://www.disy.cse.unsw.edu.au/ULDD/

User-level device drivers
The reliability of device drivers is of critical importance to the overall stability of computer systems. Our approach to improving reliability of device drivers is to run them as unprivilieged user processes, rather than in the kernel.

Running device drivers external to the kernel provides a number of advantages:

Robustness
A faulty driver in this situation will not cause the kernel to crash. A simple example of this is that a driver which does a NULL pointer derefence can be detected by the operating system and restarted.
Security
Running drivers external to the kernel provides the opportunity to significantly reduce the trusted computing base. Although running drivers at user-level can trap inadvertent bugs, they do not, on their own, stop potentially malicious drivers from corrupting the system when using direct memory access (DMA). Our approach uses the I/O MMU hardware technology available in newer chipsets to also control the DMA transactions that can be performed by the user-level drivers. This provides the foundation for making device drivers completely untrusted.
Ease of development and debugging
It is generally much easier for both users and developers to manage code that runs at user-level. This means that you do not need special tools to start device drivers, but rather they can just be started as you would start a regular program. For the developer this means standard debuggers and development tools can be used, and also allows for a shorter development cycle as new versions of the driver can be tested without a whole system reboot.
Current implementation
The user-level device driver (ULDD) project has produced a framework to allow device drivers to be run at user-level on both the L4 microkernel and Linux.

Although focussing on user-level drivers the framework also allows for device drivers to be run inside the Linux kernel. This is not only useful for benchmarking, it also allows performance-critical drivers to be moved back into the kernel after having been developed and debugged at user level. Since Linux lacks an inter-process-communication mechanism of a speed comparable to that of a tiny and highly-tuned microkernel (like L4), we cannot hope to achieve acceptable performance of all user-level drivers in Linux (in particular those for high-bandwidth network interfaces).

The driver framework has been used to create a number of drivers including:

IDE disk driver
100Mbit ethernet driver (Tulip chipset)
Gigabit ethernet driver (dp8320 chipset)
Serial port
Keybord
As stated one of the goals of this work is to provide a flexible environment. To this end we have made the drivers as portable as feasible, and have them running on a number of platforms:

IA64 (Itanium and Itanium 2 platforms)
IA32 (aka x86)
Alpha (Pyxis and Tsunami chipsets)
MIPS (GT chipset)
Performance
The main percieved drawbacks of running device drivers at user-level is that is has a dramatic impact on performance. Previous work on user-level device drivers typically reported a 50% performance degradation over in-kernel device drivers. Our current experiments suggests that this need not be the case.

Our initial experience with user-level drivers for storage devices show that performance is within 10% of in-kernel drivers on microbenchmarks. When running filesystem benchmarks, most tests show no measurable overhead, with around 10% overhead in the worst cases (file creation and deletion). This is not surprising, as disk latencies are high anyway, and file systems are optimised for hiding this latency.

More critical are high-bandwidth network devices, which are characterised by small (compared to disks) packet sizes and high interrupt rates. Our initial benchmarks (below) indicate that even there the performance degradation can be kept reasonably low (less than 20%).

more to read http://www.disy.cse.unsw.edu.au/ULDD/
 楼主| 发表于 2004-9-24 21:59:31 | 显示全部楼层
别处心裁:)
驱动一般是内核层的概念来着。。。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-11-24 14:17 , Processed in 0.038917 second(s), 16 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表