Abstract
ReactOS Architecture Overview.
The ReactOS architecture is based on that of Microsoft Windows NT 4.0. Although Microsoft claims that the architecture is a modified micro-kernel (combining aspects of both micro-kernels and layered operating systems), at ReactOS we have a different definition of the architecture. The NT, and therefore ReactOS architecture, is modular and layered. The small traces of microkernel architecture are not enough for it to be described as a modified micro-kernel.
At the lowest layer is the Executive. The executive includes everything that runs in kernel mode. Above the executive are the Protected Subsystems. These subsystems provide implementations of different Operating System personalities.
The Executive is all the code that runs in kernel mode. The executive can roughly be broken up into the following components:
These components all run in kernel mode. The HAL, Kernel, System Services and Device Drivers are collectively referred to as the Executive.
The HAL makes it possible for the x86 ReactOS kernel and HAL to run on different x86 motherboards. The HAL abstracts motherboard specific code from the kernel, so that different motherboards do not require changes in the kernel. Examples for different hardware designs are the standard PC, the Japanese NEC PC98 or x86 SGI workstations.
Device drivers are hardware specific extensions to the ReactOS Executive. They allow the Operating System to interact with certain devices and visa versa.
ReactOS currently aims to implement the Windows NT 4.0 device driver model. The Windows Driver Model (WDM) is also a concern for the immediate future. WDM is a set of rules for writing portable Windows drivers.
Communication:
Device drivers use packets to communicate with the kernel and with other drivers. Packets are sent via the IO Manager (System Service) and make use of IRPs (IO Request Packets).
The kernel design is based on that of Microsoft Windows NT 4.0. It implements kernel mode Asynchronous Procedure Calls (APCs), Deferred Procedure Calls (DPCs), processes, threading, mutexes, semaphores, spinlocks, timing code and more.
System services include:
The Protected Subsystems allow different Operating System personalities to run on top of the ReactOS Executive. The initial target for ReactOS was the Win32 subsystem -- however, the Win32 subsystem runs in kernel mode as part of the Executive and is not featured here.
User mode subsystems in the works:
Potential Protected Subsystems for the future:
Graphical Interface for Subsystems via the Win32 Subsystem: The Windows NT graphics device drivers are tightly integrated in design with the Win32 subsystem. Due to this it is impractical for a user mode subsystem to interact directly with the graphics drivers. For this reason, a subsystem should make use of the kernel mode Win32 subsystem for a graphics interface. Such a subsystem need not depend on the Win32 Window Manager, but can instead just use the graphics primitives provided by the Win32 subsystem.
The Native API Architecture alls for user mode code to call kernel mode services in a standard manner. It is the equivalent to the System Call Interface used by most UNIXes. Microsoft Windows NT/2000/XP does not document the Native API Architecture for programmers, they must use the Win32 APIs instead. Since ReactOS is Open Source, our Native API Architecture is open to the application programmer.
The Native API Architecture is implemented in NTDLL.DLL. Aside from containing Native API user mode entry points, NTDLL.DLL also contains process startup and module loading code. These entry points call KiSystemService in kernel mode, which looks up the kernel mode service in a system table - KiSystemServiceTable.
The original target for ReactOS, with regards to driver and application compatibility, was Microsoft Windows NT 4.0. Since then, Microsoft Windows 2000 and Windows XP have been released.
Microsoft Windows 2000 and Windows XP are both descendants of Windows NT. As such we can gradually shift our compatibility target without worrying about the architecture changing too much. In fact, internally, Windows 2000 reports version information as Windows 5.0 and Windows XP as Windows 5.1.
The ReactOS team have decided to maintain Windows NT 4.0 as the official compatibility target. This is because most of the resources, articles and books on Windows NT/2000/XP technology are written for Windows NT 4.0. This does not mean that features present in later versions of Windows NT based operating systems will not be implemented in ReactOS.