备注
HAL在维基百科中的解释具体请参见HAL (software)。
Traditionally, the operating system kernel was responsible for providing an abstract interface to the hardware the system ran on. Applications used the system call interface, or performed file I/O on device nodes in order to communicate with hardware through these abstractions. This sufficed for the simple hardware of early desktop computing.
Computer hardware, however, has increased in complexity and the abstractions provided by Unix kernels have not kept pace with the proliferating number of device and peripheral types now common on both server and desktop computers. Most modern buses have also become hotplug-capable and can have non-trivial topologies. As a result, devices are discovered or change state in ways which can be difficult to track through the system call interface or Unix IPC. The complexity of doing so forces application authors to re-implement hardware support logic.
也就是说,HAL是为了解决在服务器和电脑上由于外设数量和种类越来越多,并且加入了热插拔功能的情况下原有OS内核/驱动的系统调用无法很好地支撑外设管理的问题而出现的技术。
Implementations and obsolescence
On Linux, HAL uses /sys (a virtual file system for Linux systems) to discover hardware and listen for kernel hotplug events. Some Linux distributions also provide a udev rule to allow the udev daemon to notify HAL whenever new device nodes appear.
在最新的一些Linux发布版本中,例如Ubuntu、Debian和Fedora中,HAL功能被合入了udev守护进程和相关的内核模块中。
Deprecated
As of 2011, Linux distributions such as Ubuntu, Debian, and Fedora, and projects such as KDE, GNOME and X.org are in the process of deprecating HAL as it has "become a large monolithic unmaintainable mess". The process is largely complete, but some use of HAL remains – Debian squeeze (Feb 2011) and Ubuntu version 10.04 remove HAL from the basic system and boot process.
In Linux, it is in the process of being merged into udev (main udev, libudev, and udev-extras) and existing udev and kernel functionality. No specific replacement for non-Linux systems has been identified.
Initially a new daemon DeviceKit was planned to replace certain aspects of HAL, but in March 2009, DeviceKit was deprecated in favor of adding the same code to udev as a package: udev-extras, and some functions have now moved to udev proper.