Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

HAL (software)

From Wikipedia, the free encyclopedia
This article is about a UNIX-like operating system subsystem. For the general concept and the Windows NT kernel HALs, seeHardware abstraction.
This article needs to beupdated. Please help update this article to reflect recent events or newly available information.(January 2025)
Software subsystem for UNIX-like operating systems
HAL
Stable release
0.5.14 / November 30, 2009; 15 years ago (2009-11-30)
Operating systemLinux,FreeBSD,NetBSD,OpenSolaris,Solaris
PlatformUNIX
TypeSystem software
LicenseGNU General Public License andAcademic Free License
Websitefreedesktop.org/wiki/Software/hal/

HAL (Hardware Abstraction Layer or ratherHardware Annotation Library) is asoftware subsystem forUNIX-like operating systems providinghardware abstraction.

HAL is nowdeprecated on most Linux distributions and on FreeBSD. Functionality is being merged intoudev on Linux as of 2008–2010 and devd on FreeBSD.[citation needed] Previously, HAL was built on top of udev.[citation needed]

Some other operating systems which don't have an alternative like udev or devd still use HAL.

The purpose of the hardware abstraction layer was to allowdesktop applications to discover and use thehardware of the host system through a simple,portable andabstractAPI, regardless of the type of the underlying hardware.[1]

HAL for Linux OS was originally envisioned byHavoc Pennington. It became afreedesktop.org project, and was a key part of the software stack of theGNOME andKDEdesktop environments. It isfree software, dual-licensed under both theGNU General Public License and theAcademic Free License.[2]

HAL is unrelated to the concept ofWindows NT kernel HALs, which handle some platform-specific core functionality within the kernel, such as interrupt routing.

Rationale

[edit]

Traditionally, theoperating systemkernel was responsible for providing an abstract interface to the hardware the system ran on. Applications used thesystem call interface, or performed fileI/O ondevice 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 andperipheral types now common on both server and desktop computers. Most modernbuses have also becomehotplug-capable and can have non-trivialtopologies. 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.[1]

Some devices also require privileged helper programs to prepare them for use. These must often be invoked in ways that can be awkward to express with the Unix permissions model (for example, allowing users to joinwireless networks only if they are logged into the video console).[1] Application authors resort to usingsetuid binaries or run servicedaemons to provide their own access control and privilege separation, potentially introducing security holes each time.

Design

[edit]

HAL is a single daemon responsible for discovering, enumerating and mediating access to most of the hardware on the host computer. Applications communicate with HAL through theD-BusIPC mechanism, which abstracts the hardware behind anobject-basedRPC mechanism.

Each logical hardwaredevice is represented as a D-Bus object, and its bus address is used as a unique identifier. Devices include abstractions likedisk partitions and visible wireless networks. The device's functionality is exposed through D-Businterfaces, and its state accessed throughproperties, a set of key-value pairs.

HAL broadcasts hardware events assignals on these objects; applications can listen for signals and react to the hardware events that they signify—events such as adigital camera being plugged in, anoptical disc spinning up or a laptop computer closing its lid.[3][4]

Implementations and obsolescence

[edit]

On Linux, HAL uses/sys (avirtual file system forLinux systems) to discover hardware and listen for kernelhotplug events. Some Linux distributions also provide audev rule to allow the udev daemon to notify HAL whenever new device nodes appear.

Deprecated

[edit]

As of 2011[update], Linux distributions such asUbuntu,[5]Debian,[6] andFedora and on FreeBSD,[7] and projects such as KDE,[8] GNOME andX.org are in the process ofdeprecating HAL as it has "become a large monolithic unmaintainable mess".[5] 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.[9] In Linux, it is in the process of being merged intoudev (main udev, libudev, and udev-extras) and existing udev and kernel functionality. The replacement for non-Linux systems such as FreeBSD is devd.

Initially a new daemonDeviceKit 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 packageudev-extras, and some functions have now moved toudev proper.

See also

[edit]

References

[edit]
  1. ^abcPennington, Havoc (2003-07-10),Making Hardware Just Work
  2. ^HAL source code license text,HAL is licensed to you under your choice of the Academic Free License version 2.1, or the GNU General Public License version 2
  3. ^Zeuthen, David (2009-11-01),HAL 0.5.14 Specification,freedesktop.org, retrieved2017-01-15
  4. ^"hal: doc/spec". 2010-03-16. Retrieved2017-01-15.
  5. ^abHalsectomy,ubuntu.com, 2013-05-10, retrieved2017-01-15
  6. ^"HALRemoval".debian.org. 2011-06-28. Retrieved2017-01-15.
  7. ^"Features/HalRemoval".Fedora Project. 2012-01-09. Retrieved2017-01-15.
  8. ^"Revision 1206281: Features in KDE Base".KDE. 2010-12-19. Retrieved2017-01-15.
  9. ^"TechnicalOverview: HAL removal". ubuntu.com. 2010-05-17. Retrieved2017-01-15.

External links

[edit]
OS components
Sound
Graphics
Other
Libraries
Frameworks
Meetings
Retrieved from "https://en.wikipedia.org/w/index.php?title=HAL_(software)&oldid=1146869860"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp