HAL (abbreviated from the English. Hardware Abstraction Layer ) is a no longer developed daemon , representing a layer of hardware abstractions for Linux and some other Unix-like systems.
| Hal | |
|---|---|
| Type of | System software |
| Written on | |
| operating system | Linux , FreeBSD , NetBSD , OpenSolaris , Solaris |
| Hardware platform | Unix |
| Latest version | 0.5.14 ( November 30, 2009 ) |
| condition | Development discontinued |
| License | GNU General Public License and Academic Free License |
| Site | freedesktop.org/wiki/Sof... |
Content
Tasks and development history
The project was originally created by Red Hat . The HAL daemon receives hardware information from the OS kernel (in Linux, for example, HAL draws most of the information from sysfs ), and provides client programs via D-Bus in a convenient form for use. Getting information directly from the kernel is a complex process and can be fraught with security problems; therefore, the presence of HAL greatly simplifies the development of programs that should be aware of the hardware of the computer (for example, that the user has just disconnected the printer or inserted a USB flash drive). Since HAL on all platforms provides information in one format, regardless of the operating system and kernel version, it also facilitates the development of cross-platform software. In addition, HAL made it possible to create automatic actions (automatic mounting of disks, automatic configuration of printers, etc.) through the rules.
HAL is licensed under the GNU General Public License and Academic Free License , and is free software [2] .
Current Status
HAL is deprecated and is not recommended . The solutions used as the basis for HAL design turned out to be inefficient in practice, and the only way out was to create a new subsystem and transfer functionality. Such a system was udev [3] .
Currently, HAL support has been removed from the kernel, and the largest distributions ( Ubuntu [4] , Debian [5], and Fedora [6] ) have completed the transition and are using Udev .
Reason for Remedy
The main advantage in the new udev subsystem (over HAL) is that the former is event-driven and has close integration with the kernel, while HAL, being implemented in userspace as a daemon , is forced to periodically query the kernel. Thus, the use of event-driven udev significantly reduces the load on the system, and hence the power consumption. Also, device rule descriptions are made in the form of simple configuration files and are much simpler and more understandable for users and developers than XML used in the HAL earlier. And finally, udev was developed “from scratch”, taking into account previous experience and it lacks outdated or messy code.
The process of migrating from HAL to udev
Initially, most of the HAL logic was ported to udev, and the rules in the new module were DeviceKit (not to be confused with PolicyKit or ConsoleKit ).
However, soon the udev + DeviceKit scheme changed somewhat - the developers found that most of the hardware is already controlled by various software components and only the rules for disks ( udisks ) [7] and power ( upower ) [8] are needed . The DeviceKit project has been divided into several smaller parts and is no longer used or mentioned [9] .
Thus, modern distributions use only Udev and the rules for it (udisks, upower - part of the udev-extras package). However, due to the inertia of the code, many programs still require an outdated HAL (mainly for detecting disks), and therefore distributions are forced to supply HAL, in fact duplicating the logic (for example, Qt3, and the Trinity project that encountered it).
See also
- Hardware abstraction layer
Notes
- ↑ The hal Open Source Project on Open Hub: Languages Page - 2006.
- ↑ "COPYING" file from the source code . - "HAL is licensed to you under your choice of the Academic Free License version 2.1, or the GNU General Public License version 2.". Archived March 15, 2012.
- ↑ Update on DeviceKit . Archived March 15, 2012.
- ↑ Halsectomy , ubuntu.com , < https://wiki.ubuntu.com/Halsectomy > . Retrieved November 1, 2009.
- ↑ HAL Removal , Debian wiki
- ↑ Hal Removal , fedora
- ↑ Udisks , freedesktop.org , < http://www.freedesktop.org/wiki/Software/udisks > . Retrieved November 1, 2010.
- ↑ Upower , freedesktop.org , < http://upower.freedesktop.org/ > . Retrieved November 1, 2010.
- ↑ Liquidation of DeviceKit , freedesktop.org , < http://www.freedesktop.org/wiki/Software/DeviceKit > . Retrieved November 1, 2010.