血小板计数偏高是什么意思| 拉架棉是什么面料| 脚发麻是什么原因| 低压偏高有什么危害| 早上嘴苦是什么原因| 屁眼火辣辣的疼是什么原因| 晒伤擦什么药| 冠冕堂皇是什么意思| 儿童便秘吃什么最管用| 邮箱抄送是什么意思| 静态纹用什么除皱| 心脏供血不足吃什么药| 宫颈疼是什么原因| 小便次数多是什么原因| 什么尾花| 手足口病要注意什么| 梦女是什么| 什么是网约车| 月经提前是什么原因| 结膜充血用什么眼药水| 奶冻是什么| 酸菜鱼用什么鱼做好吃| 痔疮吃什么食物| sdh是什么意思| 霉菌性炎症用什么药效果最好| 刚怀孕有什么办法打掉| 什么原因会怀上葡萄胎| co什么意思| 两个人在一起的意义是什么| 西柚是什么意思| 病毒性结膜炎用什么眼药水| 陶字五行属什么| 向内求什么意思| 神经衰弱吃什么药好| 天外有天人外有人是什么意思| ooh什么意思| 什么动物眼睛是红色的| 为什么晚上不能照镜子| 采耳是什么意思| 猴子吃什么| 无致病菌生长是什么意思| 丙氨酸氨基转移酶是什么意思| 狗为什么喜欢吃人屎| 人为什么会得阑尾炎| 为什么会缺钙| 来月经喝红糖水有什么好处| 4级残疾证有什么优惠政策| 便秘吃什么食物| 5月24日是什么星座| 包皮开裂用什么药| 七月份生日是什么星座| kai是什么意思| m k是什么牌子| 韧带拉伤有什么症状| 失眠看什么科| 经常泡脚有什么好处| eagle是什么意思| 内膜薄是什么原因| 小孩肠胃感冒吃什么药| 少叙痣是什么意思| 贵人多忘事是什么意思| 宠物医院需要什么资质| 宝宝吃益生菌有什么好处和坏处| 小孩脸肿是什么原因引起的| 一个目一个于念什么| 舌苔厚白吃什么食物好| 什么是珠心算| 阳历6月28日是什么星座| 鸦片鱼又叫什么鱼| 口腔溃疡挂什么科室| 宫颈短是什么意思| 鞭炮笋学名叫什么| 什么动物站着睡觉| 前戏是什么意思| 莫名心慌是什么原因| 互攻是什么意思| 不什么不什么| 小针刀是什么手术| 不来月经有什么危害| 什么药治牙疼最快| 白细胞十十是什么意思| o型血与a型血生的孩子是什么血型| 5月31日是什么星座| 解惑是什么意思| 无精是什么原因造成的| 急性肠胃炎打什么点滴| 人性是什么| 什么是资本家| 世界上最多笔画的字是什么字| 人模狗样是什么生肖| 什么是独角兽企业| 无可奈何的笑是什么笑| 漠河什么时候可以看到极光| 打水光针有什么副作用| 随餐服用是什么时候吃| 排卵期后面是什么期| 命悬一线的意思是什么| 尿蛋白是什么原因造成的| 牵牛花是什么颜色的| 烧高香是什么意思| 大便次数少是什么原因| 赢字五行属什么| 胸闷气短呼吸困难心慌是什么原因| 大脚趾头麻木是什么原因| 心得安是什么药| 阑尾为什么会发炎| 卡路里是什么意思| 爱之深恨之切是什么意思| 尿尿疼是什么原因| 改嫁是什么意思| 超敏c反应蛋白偏高说明什么| 宝宝发烧手脚冰凉是什么原因| 孕妇建档需要检查什么| 胃胀痛吃什么药好| 胆固醇高吃什么可以降下来| 打完耳洞要注意什么| 嘴唇发紫是什么病| 为什么会感冒| 顺位是什么意思| 虾和什么蔬菜搭配最好| 心梗是什么症状| 牛肉不能跟什么一起吃| 心电图是什么科室| 吉人自有天相什么意思| 血压偏低有什么症状| 血钾高是什么引起的| 什么人从来不看医生| 月经来了吃什么好| 便血挂什么科室| 猫为什么要绝育| 气胸有什么症状| 黄体酮是什么| 什么食物蛋白质含量高| 啐了一口是什么意思| 梦见老公不理我是什么意思| 光是什么生肖| 商纣王叫什么名字| 迎春花什么时候开花| 相忘于江湖是什么意思| 西瓜和什么相克| 湿气重吃什么水果好| 吃什么能提高血压| 脂肪肝喝什么茶| 晚上喝蜂蜜水有什么好处和坏处| 肾结石吃什么比较好| 梦见别人开车撞死人是什么意思| 酸化是什么意思| 女生的隐私部位长什么样| 癫痫是什么| 感冒什么时候传染性最强| 为什么打哈欠| phonics是什么意思| 心胸狭窄是什么意思| 面肌痉挛吃什么药效果好| 手机合约版是什么意思| 圣水是什么| gpt是什么| 豆油什么牌子的好| 白带异常是什么原因| 肾病什么症状| 鱼鳞云代表什么天气| 护手霜什么牌子的效果好| 真菌是什么原因引起的| 输液葡萄糖有什么作用| 66是什么意思| 桃花是指什么生肖| 今天中国什么节日| 激素六项主要是查什么| 吃什么容易瘦| 胎盘成熟度1级是什么意思| 脸过敏发红痒擦什么药| 东面墙适合挂什么画| 胆固醇高是什么引起的| 机车什么意思| 蛋白质阳性什么意思| 竞走是什么意思| 女人身体弱带什么辟邪| 老睡不醒是什么原因| 伤口溃烂不愈合用什么药| 保质期是什么意思| 鬼谷子姓什么| 细菌属于什么生物| dmd是什么病| 黑茶是什么茶| 汤去掉三点水念什么| 新店开业送什么好| 主意正是什么意思| 屠苏是什么意思| 白细胞十一是什么意思| 什么是透析治疗| 明前茶和明后茶有什么区别| 青的五行属性是什么| 一喝水就尿多是什么原因| 心管是什么部位| 姌是什么意思| 身家是什么意思| 咳血是什么原因引起的| 鸾凤和鸣什么意思| 上传下达什么意思| 89年的蛇是什么命| 廉航是什么意思| 歧视是什么意思| 氨糖是什么| 鼻炎有什么症状| 男生纹身纹什么好| 住院医师是什么职称| 农历六月十九是什么日子| 血沉高意味着什么意思| 呕吐挂什么科| 朵的第二笔是什么| 湿疹为什么反反复复好不了| 过期的牛奶有什么用| ct和b超有什么区别| 血涂片检查什么病| 什么病不能吃西兰花| 零度是什么意思| 堪忧是什么意思| 为什么要做包皮手术| 金脸银脸代表什么人物| 不行是什么意思| 地球是什么| 蛇是什么动物| 白发是什么原因引起的| 宝宝肋骨外翻是什么原因| 文化是指什么| 乳腺囊实性结节是什么意思| 热伤风吃什么药好得快| 菽是什么意思| 肛门瘙痒是什么病| 低烧什么症状| 属猴的本命佛是什么佛| 酸碱度偏高是什么意思| 当家作主是什么生肖| 苯磺酸氨氯地平片什么时候吃最好| 什么是开悟| 伏天吃什么| 头顶疼是什么原因引起的| 右肺中叶少许纤维灶是什么意思| 一什么种子| 正常是什么意思| 做什么梦暗示你怀孕了| 男生吃菠萝有什么好处| 紫癜是什么病 严重吗| 蒲公英叶和根的功效有什么不同| 胎盘厚度代表什么| 什么都不想做| bg什么意思| 1866年属什么生肖| 芬太尼是什么药| 痰栓是什么| 内径是什么意思| 漠视是什么意思| 对数是什么| 皮革胃是什么意思| 怀孕血压高对胎儿有什么影响| 喉咙痒痒的吃什么药| 肾阴虚吃什么食物| reed是什么意思| 1a是什么意思| 羊是什么结构的字| 腰果不能和什么一起吃| 什么是子宫肌瘤| 玉树临风什么意思| 十一月十五号是什么星座| 百度

啦绊琁郸畐 畐干禟潦┬

百度   治国犹如栽树,本根不摇则枝叶茂荣。

The architecture of Windows NT, a line of operating systems produced and sold by Microsoft, is a layered design that consists of two main components, user mode and kernel mode. It is a preemptive, reentrant multitasking operating system, which has been designed to work with uniprocessor and symmetrical multiprocessor (SMP)-based computers. To process input/output (I/O) requests, it uses packet-driven I/O, which utilizes I/O request packets (IRPs) and asynchronous I/O. Starting with Windows XP, Microsoft began making 64-bit versions of Windows available; before this, there were only 32-bit versions of these operating systems.

The Windows NT operating system family's architecture consists of two layers (user mode and kernel mode), with many different modules within both of these layers.

Programs and subsystems in user mode are limited in terms of what system resources they have access to, while the kernel mode has unrestricted access to the system memory and external devices. Kernel mode in Windows NT has full access to the hardware and system resources of the computer. The Windows NT kernel is a hybrid kernel; the architecture comprises a simple kernel, hardware abstraction layer (HAL), drivers, and a range of services (collectively named Executive), which all exist in kernel mode.[1]

User mode in Windows NT is made of subsystems capable of passing I/O requests to the appropriate kernel mode device drivers by using the I/O manager. The user mode layer of Windows NT is made up of the "Environment subsystems", which run applications written for many different types of operating systems, and the "Integral subsystem", which operates system-specific functions on behalf of environment subsystems. The kernel mode stops user mode services and applications from accessing critical areas of the operating system that they should not have access to.

The Executive interfaces, with all the user mode subsystems, deal with I/O, object management, security and process management. The kernel sits between the hardware abstraction layer and the Executive to provide multiprocessor synchronization, thread and interrupt scheduling and dispatching, and trap handling and exception dispatching. The kernel is also responsible for initializing device drivers at bootup. Kernel mode drivers exist in three levels: highest level drivers, intermediate drivers and low-level drivers. Windows Driver Model (WDM) exists in the intermediate layer and was mainly designed to be binary and source compatible between Windows 98 and Windows 2000. The lowest level drivers are either legacy Windows NT device drivers that control a device directly or can be a plug and play (PnP) hardware bus.

User mode

edit

User mode is made up of various system-defined processes and DLLs.

The interface between user mode applications and operating system kernel functions is called an "environment subsystem." Windows NT can have more than one of these, each implementing a different API set. This mechanism was designed to support applications written for many different types of operating systems. None of the environment subsystems can directly access hardware; access to hardware functions is done by calling into kernel mode routines.[citation needed]

There are three main environment subsystems: the Win32 subsystem, an OS/2 subsystem and a POSIX subsystem.[2]

Win32 environment subsystem

edit
?
COMMAND.COM running in the NTVDM

The Win32 environment subsystem can run 32-bit Windows applications. It contains the console as well as text window support, shutdown and hard-error handling for all other environment subsystems. It also supports Virtual DOS Machines (VDMs), which allow MS-DOS and 16-bit Windows (Win16) applications to run on Windows NT. There is a specific MS-DOS VDM that runs in its own address space and which emulates an Intel 80486 running MS-DOS 5.0. Win16 programs, however, run in a Win16 VDM. Each program, by default, runs in the same process, thus using the same address space, and the Win16 VDM gives each program its own thread on which to run. However, Windows NT does allow users to run a Win16 program in a separate Win16 VDM, which allows the program to be preemptively multitasked, as Windows NT will pre-empt the whole VDM process, which only contains one running application. The Win32 environment subsystem process (csrss.exe) also includes the window management functionality, sometimes called a "window manager". It handles input events (such as from the keyboard and mouse), then passes messages to the applications that need to receive this input. Each application is responsible for drawing or refreshing its own windows and menus, in response to these messages.

OS/2 environment subsystem

edit

The OS/2 environment subsystem supports 16-bit character-based OS/2 applications and emulates OS/2 1.x, but not 32-bit or graphical OS/2 applications as used with OS/2 2.x or later, on x86 machines only.[3] To run graphical OS/2 1.x programs, the Windows NT Add-On Subsystem for Presentation Manager must be installed.[3] The last version of Windows NT to have an OS/2 subsystem was Windows 2000; it has been discontinued as of Windows XP.[4][5]

POSIX environment subsystem

edit

The POSIX environment subsystem supports applications that are strictly written to either the POSIX.1 standard or the related ISO/IEC standards. This subsystem has been replaced by Interix, which is a part of Windows Services for UNIX.[4] This was in turn replaced by the Windows Subsystem for Linux.

Security subsystem

edit

The security subsystem deals with security tokens, grants or denies access to user accounts based on resource permissions, handles login requests and initiates login authentication, and determines which system resources need to be audited by Windows NT.[citation needed] It also looks after Active Directory.[citation needed] The workstation service implements the network redirector, which is the client side of Windows file and print sharing; it implements local requests to remote files and printers by "redirecting" them to the appropriate servers on the network.[6] Conversely, the server service allows other computers on the network to access file shares and shared printers offered by the local system.[7]

Kernel mode

edit

Windows NT kernel mode has full access to the hardware and system resources of the computer and runs code in a protected memory area.[8] It controls access to scheduling, thread prioritization, memory management and the interaction with hardware. The kernel mode stops user mode services and applications from accessing critical areas of the operating system that they should not have access to; user mode processes must ask the kernel mode to perform such operations on their behalf.

While the x86 architecture supports four different privilege levels (numbered 0 to 3), only the two extreme privilege levels are used. Usermode programs are run with CPL 3, and the kernel runs with CPL 0. These two levels are often referred to as "ring 3" and "ring 0", respectively. Such a design decision had been done to achieve code portability to RISC platforms that only support two privilege levels,[9] though this breaks compatibility with OS/2 applications that contain I/O privilege segments that attempt to directly access hardware.[3]

Code running in kernel mode includes: the executive, which is itself made up of many modules that do specific tasks; the kernel, which provides low-level services used by the Executive; the Hardware Abstraction Layer (HAL); and kernel drivers.[8][10]

Executive

edit

The Windows Executive services make up the low-level kernel-mode portion, and are contained in the file NTOSKRNL.EXE.[8] It deals with I/O, object management, security and process management. These are divided into several subsystems, among which are Cache Manager, Configuration Manager, I/O Manager, Local Procedure Call (LPC), Memory Manager, Object Manager, Process Structure and Security Reference Monitor (SRM). Grouped together, the components can be called Executive services (internal name Ex). System Services (internal name Nt), i.e., system calls, are implemented at this level,[11] too, except very few that call directly into the kernel layer for better performance.[citation needed]

The term "service" in this context generally refers to a callable routine, or set of callable routines.[11] This is distinct from the concept of a "service process", which is a user mode component somewhat analogous to a daemon in Unix-like operating systems.[12]

?
Each object in Windows NT exists in a global namespace. This is a screenshot from Sysinternals WinObj.
Object Manager
The Object Manager (internal name Ob) is an executive subsystem that all other executive subsystems, especially system calls, must pass through to gain access to Windows NT resources—essentially making it a resource management infrastructure service.[13] The object manager is used to reduce the duplication of object resource management functionality in other executive subsystems, which could potentially lead to bugs and make development of Windows NT harder.[14] To the object manager, each resource is an object, whether that resource is a physical resource (such as a file system or peripheral) or a logical resource (such as a file). Each object has a structure or object type that the object manager must know about.
Object creation is a process in two phases, creation and insertion. Creation causes the allocation of an empty object and the reservation of any resources required by the object manager, such as an (optional) name in the namespace. If creation was successful, the subsystem responsible for the creation fills in the empty object.[15] Finally, if the subsystem deems the initialization successful, it instructs the object manager to insert the object, which makes it accessible through its (optional) name or a cookie called a handle.[16] From then on, the lifetime of the object is handled by the object manager, and it's up to the subsystem to keep the object in a working condition until being signaled by the object manager to dispose of it.[17]
Handles are identifiers that represent a reference to a kernel resource through an opaque value.[18] Similarly, opening an object through its name is subject to security checks, but acting through an existing, open handle is only limited to the level of access requested when the object was opened or created.[citation needed]
Object types define the object procedures and any data specific to the object. In this way, the object manager allows Windows NT to be an object-oriented operating system, as object types can be thought of as polymorphic classes that define objects. Most subsystems, though, with a notable exception in the I/O Manager, rely on the default implementation for all object type procedures.[citation needed]
Each instance of an object that is created stores its name, parameters that are passed to the object creation function, security attributes and a pointer to its object type. The object also contains an object close procedure and a reference count to tell the object manager how many other objects in the system reference that object and thereby determines whether the object can be destroyed when a close request is sent to it.[19] Every named object exists in a hierarchical object namespace.
Cache Controller
Closely coordinates with the Memory Manager, I/O Manager and I/O drivers to provide a common cache for regular file I/O. The Windows Cache Manager operates on file blocks (rather than device blocks), for consistent operation between local and remote files, and ensures a certain degree of coherency with memory-mapped views of files, since cache blocks are a special case of memory-mapped views and cache misses a special case of page faults.
Configuration Manager
Implements the system calls needed by Windows Registry.
I/O Manager
Allows devices to communicate with user-mode subsystems. It translates user-mode read and write commands into read or write IRPs which it passes to device drivers. It accepts file system I/O requests and translates them into device specific calls, and can incorporate low-level device drivers that directly manipulate hardware to either read input or write output. It also includes a cache manager to improve disk performance by caching read requests and write to the disk in the background.
Local Procedure Call (LPC)
Provides inter-process communication ports with connection semantics. LPC ports are used by user-mode subsystems to communicate with their clients, by Executive subsystems to communicate with user-mode subsystems, and as the basis for the local transport for Microsoft RPC.
Memory Manager
Manages virtual memory, controlling memory protection and the paging of memory in and out of physical memory to secondary storage, and implements a general-purpose allocator of physical memory. It also implements a parser of PE executables that lets an executable be mapped or unmapped in a single, atomic step.
Starting from Windows NT Server 4.0, Terminal Server Edition, the memory manager implements a so-called session space, a range of kernel-mode memory that is subject to context switching just like user-mode memory. This lets multiple instances of the kernel-mode Win32 subsystem and GDI drivers run side-by-side, despite shortcomings in their initial design. Each session space is shared by several processes, collectively referred to as a "session".
To ensure a degree of isolation between sessions without introducing a new object type, the association between processes and sessions is handled by the Security Reference Monitor, as an attribute of a security subject (token), and it can only be changed while holding special privileges.
The relatively unsophisticated and ad hoc nature of sessions is due to the fact they weren't part of the initial design, and had to be developed, with minimal disruption to the main line, by a third party (Citrix Systems) as a prerequisite for their terminal server product for Windows NT, called WinFrame. Starting with Windows Vista, though, sessions finally became a proper aspect of the Windows architecture. No longer a memory manager construct that creeps into user mode indirectly through Win32, they were expanded into a pervasive abstraction affecting most Executive subsystems. As a matter of fact, regular use of Windows Vista always results in a multi-session environment.[20]
Process Structure
Handles process and thread creation and termination, and it implements the concept of Job, a group of processes that can be terminated as a whole, or be placed under shared restrictions (such as the total maximum of allocated memory, or CPU time). Job objects were introduced in Windows 2000.
PnP Manager
Handles plug and play and supports device detection and installation at boot time. It also has the responsibility to stop and start devices on demand—this can happen when a bus (such as USB or IEEE 1394 FireWire) gains a new device and needs to have a device driver loaded to support it. Its bulk is actually implemented in user mode, in the Plug and Play Service, which handles the often complex tasks of installing the appropriate drivers, notifying services and applications of the arrival of new devices, and displaying GUI to the user.
Power Manager
Deals with power events (power-off, stand-by, hibernate, etc.) and notifies affected drivers with special IRPs (Power IRPs).
Security Reference Monitor (SRM)
The primary authority for enforcing the security rules of the security integral subsystem.[21] It determines whether an object or resource can be accessed, via the use of access control lists (ACLs), which are themselves made up of access control entries (ACEs). ACEs contain a Security Identifier (SID) and a list of operations that the ACE gives a select group of trustees—a user account, group account, or login session[22]—permission (allow, deny, or audit) to that resource.[23][24]
GDI
The Graphics Device Interface is responsible for tasks such as drawing lines and curves, rendering fonts and handling palettes. The Windows NT 3.x series of releases had placed the GDI component in the user-mode Client/Server Runtime Subsystem, but this was moved into kernel mode with Windows NT 4.0 to improve graphics performance.[25]

Kernel

edit

The kernel sits between the HAL and the Executive and provides multiprocessor synchronization, thread and interrupt scheduling and dispatching, and trap handling and exception dispatching; it is also responsible for initializing device drivers at bootup that are necessary to get the operating system up and running. That is, the kernel performs almost all the tasks of a traditional microkernel; the strict distinction between Executive and Kernel is the most prominent remnant of the original microkernel design, and historical design documentation consistently refers to the kernel component as "the microkernel".

The kernel often interfaces with the process manager.[26] The level of abstraction is such that the kernel never calls into the process manager, only the other way around (save for a handful of corner cases, still never to the point of a functional dependence).

Hybrid kernel design

edit

The Windows NT design includes many of the same objectives as Mach, the archetypal microkernel system, one of the most important being its structure as a collection of modules that communicate via well-known interfaces, with a small microkernel limited to core functions such as first-level interrupt handling, thread scheduling and synchronization primitives. This allows for the possibility of using either direct procedure calls or interprocess communication (IPC) to communicate between modules, and hence for the potential location of modules in different address spaces (for example in either kernel space or server processes). Other design goals shared with Mach included support for diverse architectures, a kernel with abstractions general enough to allow multiple operating system personalities to be implemented on top of it and an object-oriented organisation.[9][27]

The primary operating system personality on Windows is the Windows API, which is always present. The emulation subsystem which implements the Windows personality is called the Client/Server Runtime Subsystem (csrss.exe). On versions of NT prior to 4.0, this subsystem process also contained the window manager, graphics device interface and graphics device drivers. For performance reasons, however, in version 4.0 and later, these modules (which are often implemented in user mode even on monolithic systems, especially those designed without internal graphics support) run as a kernel-mode subsystem.[9]

Applications that run on NT are written to one of the OS personalities (usually the Windows API), and not to the native NT API for which documentation is not publicly available (with the exception of routines used in device driver development). An OS personality is implemented via a set of user-mode DLLs (see Dynamic-link library), which are mapped into application processes' address spaces as required, together with an emulation subsystem server process (as described previously). Applications access system services by calling into the OS personality DLLs mapped into their address spaces, which in turn call into the NT run-time library (ntdll.dll), also mapped into the process address space. The NT run-time library services these requests by trapping into kernel mode to either call kernel-mode Executive routines or make Local Procedure Calls (LPCs) to the appropriate user-mode subsystem server processes, which in turn use the NT API to communicate with application processes, the kernel-mode subsystems and each other.[28]

Kernel-mode drivers

edit

Windows NT uses kernel-mode device drivers to enable it to interact with hardware devices. Each of the drivers has well defined system routines and internal routines that it exports to the rest of the operating system. All devices are seen by user mode code as a file object in the I/O manager, though to the I/O manager itself the devices are seen as device objects, which it defines as either file, device or driver objects. Kernel mode drivers exist in three levels: highest level drivers, intermediate drivers and low level drivers. The highest level drivers, such as file system drivers for FAT and NTFS, rely on intermediate drivers. Intermediate drivers consist of function drivers—or main driver for a device—that are optionally sandwiched between lower and higher level filter drivers. The function driver then relies on a bus driver—or a driver that services a bus controller, adapter, or bridge—which can have an optional bus filter driver that sits between itself and the function driver. Intermediate drivers rely on the lowest level drivers to function. The Windows Driver Model (WDM) exists in the intermediate layer. The lowest level drivers are either legacy Windows NT device drivers that control a device directly or can be a PnP hardware bus. These lower level drivers directly control hardware and do not rely on any other drivers.

Hardware abstraction layer

edit
?
The Hardware Abstraction Layer in the architecture of Windows NT

The Windows NT hardware abstraction layer (HAL) is a layer between the physical hardware of the computer and the rest of the operating system. It was designed to hide differences in hardware and provide a consistent platform on which the kernel is run. The HAL includes hardware-specific code that controls I/O interfaces, interrupt controllers and multiple processors.

However, despite its purpose and designated place within the architecture, the HAL isn't a layer that sits entirely below the kernel, the way the kernel sits below the Executive: All known HAL implementations depend in some measure on the kernel, or even the Executive. In practice, this means that kernel and HAL variants come in matching sets that are specifically constructed to work together.

In particular hardware abstraction does not involve abstracting the instruction set, which generally falls under the wider concept of portability. Abstracting the instruction set, when necessary (such as for handling the several revisions to the x86 instruction set, or emulating a missing math coprocessor), is performed by the kernel, or via hardware virtualization.

The HAL is implemented in hal.dll.[29] The HAL implements a number of functions that are implemented in different ways by different hardware platforms, which in this context, refers mostly to the chipset. Other components in the operating system can then call these functions in the same way on all platforms, without regard for the actual implementation.

For example, responding to an interrupt is quite different on a machine with an Advanced Programmable Interrupt Controller (APIC) than on one without. The HAL provides a single function for this purpose that works with all kinds of interrupts by various chipsets, so that other components need not be concerned with the differences.

The HAL is loaded into kernel address space and runs in kernel mode, so routines in the HAL cannot be called directly by applications, and no user mode APIs correspond directly to HAL routines. Instead, the HAL provides services primarily to the Windows executive and kernel and to kernel mode device drivers. Although drivers for most hardware are contained in other files, commonly of file type .sys, a few core drivers are compiled into hal.dll.

Kernel mode device drivers for devices on buses such as PCI and PCI Express directly call routines in the HAL to access I/O ports and registers of their devices. The drivers use HAL routines because different platforms may require different implementations of these operations. The HAL implements the operations appropriately for each platform, so the same driver executable file can be used on all platforms using the same CPU architecture, and the driver source file can be portable across all architectures.

On x86 systems prior to Windows 8, there are several different HAL files on the installation media. The Windows installation procedure determines which ones are appropriate for the current platform and copies it to the hard drive, renaming it to hal.dll if necessary. Among the criteria for this selection are: the presence of an ACPI-compatible BIOS, the presence of an APIC, and whether or not multiple processors are present and enabled. (The multiple cores of a multi-core CPU, and even the "logical processors" implemented by a hyperthreading CPU, all count as "processors" for this purpose.) On x86-64 and Itanium platforms there is just one possible hal.dll for each CPU architecture. On Windows 8 and later, the x86 version also only has one HAL.

HAL is merged (or statically linked) into ntoskrnl.exe[30] starting with version 2004 of Windows 10, and the dll only serves as a stub for backwards compatibility.

Boot sequence

edit

The boot sequence is initiated by NTLDR in versions before Vista and the Windows Boot Manager in Vista and later.[31] The boot loader is responsible for accessing the file system on the boot drive, starting ntoskrnl.exe, and loading boot-time device drivers into memory. Once all the boot and system drivers have been loaded, the kernel starts the Session Manager Subsystem. The session manager starts crucial kernel and user mode services of the Win32 subsystem, such as the Client/Server Runtime Subsystem. The session also runs process winlogon, allowing the users to login and use their accounts.

See also

edit

Notes and references

edit
Notes
  1. ^ Finnel 2000, Chapter 1: Introduction to Microsoft Windows 2000, pp. 7–18.
  2. ^ "Appendix D - Running Nonnative Applications in Windows 2000 Professional". Microsoft Windows 2000 Professional Resource Kit. Microsoft. 11 September 2008.
  3. ^ a b c "Windows NT Workstation Resource Kit Chapter 28 - OS/2 Compatibility". Microsoft. Archived from the original on October 24, 2012.
  4. ^ a b "POSIX and OS/2 are not supported in Windows XP or in Windows Server 2003". Microsoft. Archived from the original on May 24, 2011.
  5. ^ Reiter, Brian (August 24, 2010). "The Sad History of the Microsoft POSIX Subsystem".
  6. ^ "Basic Architecture of a Network Redirector". Microsoft. 15 December 2021. Retrieved 2025-08-14.
  7. ^ "Windows NT Networking Architecture". Microsoft. Archived from the original on November 18, 2016. Retrieved 2025-08-14.
  8. ^ a b c Roman, Steven (1999). "Windows Architecture". Win32 API Programming with Visual Basic. O'Reilly and Associates, Inc. ISBN?1-56592-631-5.
  9. ^ a b c "MS Windows NT Kernel-mode User and GDI White Paper". Windows NT Workstation documentation. Microsoft TechNet. Archived from the original on 21 February 2008. Retrieved 2025-08-14.
  10. ^ Mark E. Russinovich; David A. Solomon; Alex Ionescu. Windows Internals, Fifth Edition. Microsoft Press. pp.?228–255. ISBN?978-0-7356-2530-3.
  11. ^ a b "Software Development in Windows". Microsoft Press. May 15, 2012. Archived from the original on April 13, 2025.
  12. ^ "Services overview". Microsoft Learn. October 7, 2009.
  13. ^ Russinovich & Solomon 2005, pp.?124–125.
  14. ^ Russinovich 1997, Introduction.
  15. ^ Russinovich 1997, "Object Types".
  16. ^ Russinovich & Solomon 2005, pp.?135–140.
  17. ^ Russinovich & Solomon 2005, pp.?141–143.
  18. ^ "Handles and Objects". Windows System Information. Microsoft. 8 February 2022. Retrieved 2025-08-14.
  19. ^ Russinovich 1997, "Objects".
  20. ^ "Impact of Session 0 Isolation on Services and Drivers in Windows Vista". Microsoft. Archived from the original on June 27, 2006.
  21. ^ "Active Directory Data Storage". Microsoft.[permanent dead link]
  22. ^ "Trustee definition". MSDN. Archived from the original on February 8, 2005.
  23. ^ Siyan 2000.
  24. ^ "1.2 Glossary". [MS-AZOD]: Authorization Protocols Overview. 14 June 2022. access control entry (ACE).
  25. ^ "MS Windows NT Kernel-mode User and GDI White Paper". Microsoft. The Windows NT 4.0 Kernel mode change. Retrieved 2025-08-14.
  26. ^ Solomon & Russinovich 2000, pp.?543–551.
  27. ^ Silberschatz, Abraham; Galvin, Peter Baer; Gagne, Greg (2005). Operating System Concepts; 7th Edition (PDF). Hoboken, New Jersey: John Wiley & Sons Inc. ISBN?978-0-471-69466-3.
  28. ^ Probert, Dave (2005). "Using Projects Based on Internal NT APIs to Teach OS Principles". Microsoft Research/Asia - Beijing. p.?6. Archived from the original on 2025-08-14. Retrieved 2025-08-14.
  29. ^ Blunden, Bill (2009). The Rootkit Arsenal: Escape and Evasion in the Dark Corners of the System. Jones & Bartlett Learning. p.?101. ISBN?978-1-59822-061-2.
  30. ^ @PetrBenes (25 July 2019). "Did I miss something? Routines..." (Tweet) – via Twitter.
  31. ^ "Boot Sequence of Windows Multi-Boot - Multibooters.com". www.multibooters.com. Retrieved 2025-08-14.
References

Further reading

edit
  • Martignetti, E.; What Makes It Page?: The Windows 7 (x64) Virtual Memory Manager (ISBN?978-1479114290)
  • Russinovich, Mark E.; Solomon, David A.; Ionescu, A.; Windows Internals, Part1: Covering Windows Server 2008 R2 and Windows 7 (ISBN?978-0735648739)
  • Russinovich, Mark E.; Solomon, David A.; Ionescu, A.; Windows Internals, Part2: Covering Windows Server 2008 R2 and Windows 7 (ISBN?978-0735665873)
edit
味美思是什么酒 男人为什么会晨勃 木姜子什么味道 肝实质回声密集是什么意思 乳腺结节有什么症状
唐僧的真名叫什么 子宫内膜薄吃什么 建成区是什么意思 葫芦什么时候成熟 黄河里有什么鱼
左眼跳代表什么 egcg是什么 小蛮腰是什么意思 食人鱼长什么样子 口腔溃疡吃什么好的快
早上不晨勃是什么原因 玛卡是什么药 人为什么会自杀 牛乳是什么 椒盐是什么调料
月经少吃什么好排血多hcv9jop5ns7r.cn 心脏房颤是什么原因hcv8jop0ns1r.cn 为什么会得飞蚊症hcv7jop9ns0r.cn 鸟语花香是什么生肖hcv8jop1ns3r.cn 怀孕不能吃什么药hcv7jop4ns6r.cn
肺结节手术后吃什么好hcv7jop9ns9r.cn 什么是强势的女人hcv8jop3ns6r.cn 洗衣机漏水是什么原因jasonfriends.com 左眉毛跳是什么预兆hcv9jop1ns1r.cn 黄精泡水喝有什么功效hcv8jop9ns7r.cn
六根不净是什么意思hcv7jop4ns5r.cn 儿童头疼挂什么科hcv9jop0ns4r.cn 一天什么时候最热hcv8jop0ns6r.cn 唐氏儿是什么意思hcv8jop9ns1r.cn 九月十号是什么星座hcv8jop6ns7r.cn
莫桑钻和钻石有什么区别hcv9jop0ns0r.cn 肝火旺盛失眠吃什么药ff14chat.com 唐宝是什么意思hcv7jop5ns0r.cn 变态反应科是看什么病的mmeoe.com 冰点脱毛的原理是什么hcv9jop0ns4r.cn
百度