日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

HAL (software)

發布時間:2024/1/18 编程问答 33 豆豆
生活随笔 收集整理的這篇文章主要介紹了 HAL (software) 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

This article is about a UNIX-like operating system subsystem. For the general concept and the Windows NT kernel HALs, see?Hardware abstraction.

本文是關于一個類 UNIX 操作系統子系統的。有關一般概念和 Windows NT 內核 HAL,請參閱硬件抽象。

This article needs to be?updated.?Please help update this article to reflect recent events or newly available information.?(January 2022)

HAL Stable releaseOperating systemPlatformTypeLicenseWebsite

0.5.14?/ November?30, 2009; 12 years ago

Linux,?FreeBSD,?NetBSD,?OpenSolaris,?Solaris
UNIX
System software
GNU General Public License?and?Academic Free License
freedesktop.org/wiki/Software/hal/

HAL?(Hardware Abstraction Layer?or rather?Hardware Annotation Library) is a?software?subsystem for?UNIX-like?operating systems providing?hardware abstraction.

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

HAL硬件抽象層或更確切地說是硬件注釋庫)是一個軟件子系統,用于提供硬件抽象的類 UNIX操作系統。

HAL 現在在大多數 Linux 發行版和 FreeBSD 上已棄用。從 2008 年到 2010 年,功能被合并到Linux 上的udev和 FreeBSD 上的 devd 中。[需要引用]以前,HAL 是建立在 udev 之上的。[需要引用]

Some other OS-es which don't have an alternative like udev or devd still use HAL.

The purpose of the hardware abstraction layer was to allow?desktop applications?to discover and use the?hardware?of the host system through a simple,?portable?and?abstract?API, regardless of the type of the underlying hardware.[1]

HAL for Linux OS was originally envisioned by?Havoc Pennington. It became a?freedesktop.org?project, and was a key part of the software stack of the?GNOME?and?KDE?desktop environments. It is?free software, dual-licensed under both the?GNU General Public License?and the?Academic Free License.[2]

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

其他一些沒有 udev 或 devd 等替代品的操作系統仍然使用 HAL。

硬件抽象層的目的是允許桌面應用程序通過簡單、可移植和抽象的API發現和使用主機系統的硬件,而不管底層硬件的類型。[1]

HAL for Linux OS 最初是由Havoc Pennington設想的。它成為了一個freedesktop.org項目,并且是GNOME和KDE?桌面環境軟件堆棧的關鍵部分。它是自由軟件,根據GNU 通用公共許可證和學術自由許可證雙重許可。[2]

HAL 與Windows NT內核 HAL的概念無關,后者在內核中處理一些特定于平臺的核心功能,例如中斷路由。

Contents

  • 1Rationale
  • 2Design
  • 3Implementations and obsolescence
    • 3.1Deprecated
  • 4See also
  • 5References
  • 6External links

Rationale

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.[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 join?wireless networks?only if they are logged into the video console).[1]?Application authors resort to using?setuid?binaries or run service?daemons?to provide their own access control and privilege separation, potentially introducing security holes each time.

基本原理

傳統上,操作系統?內核負責為運行系統的硬件提供抽象接口。應用程序使用系統調用接口,或在設備節點上執行文件I/O,以便通過這些抽象與硬件進行通信。這對于早期桌面計算的簡單硬件來說已經足夠了。

然而,計算機硬件的復雜性增加了,Unix 內核提供的抽象跟不上現在在服務器和臺式計算機上常見的設備和外圍設備類型的數量激增。大多數現代總線也具有熱插拔功能,并且可以具有非平凡的拓撲結構。結果,設備以難以通過系統調用接口或 Unix IPC 跟蹤的方式被發現或更改狀態。這樣做的復雜性迫使應用程序作者重新實現硬件支持邏輯。[1]

一些設備還需要特權幫助程序來準備它們以供使用。這些通常必須以難以用 Unix 權限模型表達的方式調用(例如,僅當用戶登錄到視頻控制臺時才允許他們加入無線網絡)。[1]?應用程序作者求助于使用setuid二進制文件或運行服務守護程序來提供自己的訪問控制和權限分離,每次都可能引入安全漏洞。

Design

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 the?D-Bus?IPC?mechanism, which abstracts the hardware behind an?object-based?RPC?mechanism.

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

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

設計

HAL 是一個單一的守護進程,負責發現、枚舉和調解對主機上大多數硬件的訪問。應用程序通過D-Bus?IPC機制與 HAL 進行通信,該機制將硬件抽象為基于對象的?RPC機制。

每個邏輯硬件設備都表示為一個 D-Bus 對象,其總線地址用作唯一標識符。設備包括磁盤分區和可見無線網絡等抽象。設備的功能通過 D-Bus接口公開,其狀態通過屬性訪問,一組鍵值對。

HAL在這些對象上廣播硬件事件作為信號;應用程序可以監聽信號并對它們表示的硬件事件做出反應——例如插入數碼相機、光盤旋轉或筆記本電腦合上蓋子等事件。[3]?[4]

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 上,HAL 使用/sys(Linux系統的虛擬文件系統)來發現硬件并監聽內核熱插拔事件。一些 Linux 發行版還提供udev規則,以允許 udev 守護程序在出現新設備節點時通知 HAL。

Deprecated

As of 2011, Linux distributions such as?Ubuntu,[5]?Debian,[6]?and?Fedora?and on FreeBSD,[7]?and projects such as KDE,[8]?GNOME and?X.org?are in the process of?deprecating?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 into?udev?(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 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 package?udev-extras, and some functions have now moved to?udev?proper.

已棄用

截至 2011 年,Linux 發行版如Ubuntu、[5]?Debian、[6]和Fedora以及 FreeBSD、[7]以及 KDE、[8]?GNOME 和X.org等項目都在棄用HAL,因為它已經“變成了一個龐大的、不可維護的大塊”。[5]該過程已基本完成,但仍保留了一些 HAL 的使用——Debian 擠壓(2011 年 2 月)和 Ubuntu 版本 10.04 從基本系統和引導過程中刪除了 HAL。[9]在Linux中,正在合并到udev中(主要的 udev、libudev 和 udev-extras)以及現有的 udev 和內核功能。非 Linux 系統(如 FreeBSD)的替代品是 devd。

最初計劃一個新的守護進程DeviceKit來替換 HAL 的某些方面,但在 2009 年 3 月,DeviceKit 被棄用,取而代之的是向 udev 添加與軟件包udev-extras相同的代碼,并且一些功能現在已移至udev本身。

See also

  • devfsd
  • eudev
  • udev
  • UPower
  • Free and open-source software portal

References

  • ^?Jump up to:a?b?c?Pennington, Havoc (2003-07-10),?Making Hardware Just Work
  • ^?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
  • ^?Zeuthen, David (2009-11-01),?HAL 0.5.14 Specification,?freedesktop.org, retrieved?2017-01-15
  • ^?"hal: doc/spec". 2010-03-16. Retrieved?2017-01-15.
  • ^?Jump up to:a?b?Halsectomy,?ubuntu.com, 2013-05-10, retrieved?2017-01-15
  • ^?"HALRemoval".?debian.org. 2011-06-28. Retrieved?2017-01-15.
  • ^?"Features/HalRemoval".?Fedora Project. 2012-01-09. Retrieved?2017-01-15.
  • ^?"Revision 1206281: Features in KDE Base".?KDE. 2010-12-19. Retrieved?2017-01-15.
  • ^?"TechnicalOverview: HAL removal". ubuntu.com. 2010-05-17. Retrieved?2017-01-15.
  • 參考文獻

  • ^跳轉至:a?b?c?Pennington, Havoc (2003-07-10),使硬件正常工作
  • ^?HAL 源代碼許可文本,根據您選擇的 Academic Free License 版本 2.1 或 GNU General Public License 版本 2,HAL 被許可給您
  • ^?Zeuthen, David (2009-11-01),?HAL 0.5.14 Specification?,?freedesktop.org ,?2017-01-15檢索
  • ^?"hal: 文檔/規范"?.?2010 年 3 月 16 日。檢索2017-01-15。
  • ^跳轉至:a?b?Halsectomy?,ubuntu.com, 2013-05-10, 檢索2017-01-15
  • ^?“HAL去除”?.?debian.org。2011-06-28?。檢索2017-01-15。
  • ^?“特點/HalRemoval”。Fedora 項目。2012-01-09?。檢索2017-01-15。
  • ^?“修訂版 1206281:KDE Base 中的功能”。凱德。2010 年 12 月 19 日。檢索2017-01-15。
  • ^?“技術概述:HAL 移除”。ubuntu.com。2010-05-17?.?檢索2017-01-15。
  • External links

    • HAL - Hardware Abstraction Layer

    外部鏈接

    • HAL - 硬件抽象層

    摘自:

    https://en.wikipedia.org/wiki/HAL_(software)

    總結

    以上是生活随笔為你收集整理的HAL (software)的全部內容,希望文章能夠幫你解決所遇到的問題。

    如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。