Working very closely with the HAL is the Microkernel, the heart of Windows NT. The Microkernel schedules threads, and handles interrupts and exceptions. If a computer has multiple processors, it synchronizes activity among the processors to optimize performance. The Microkernel can run simultaneously on all processors in a multiprocessor configuration.
The role of the Microkernel is to keep the processors as busy and productive as possible. To do so, the Microkernel schedules or dispatches threads for the processor in order of priority. It enforces the processor scheduling policy implemented by the Windows NT Executive. The Microkernel also interrupts or preempts threads of lower priority in favor of higher-priority threads. It can force context switches, directing the processor to drop one task and pick up another. Therefore, code operating in this system must be reentrant, that is, able to be interrupted and resume unharmed and be shared by different threads executing different lines of the same code on different processors.
Although the Microkernel dispatches and preempts threads of application and operating system code, the Microkernel's own code does not, technically, run in threads. Hence, it is the only part of the operating system that is not preemptible or pageable. With few exceptions, the remainder of threads running in Windows NT 4.0, including those in the Executive, are preemptible and fully reentrant for maximum efficiency.
The Microkernel also synchronizes the activities of the Windows NT Executive Services, such as the I/O Manager and the Process Manager. The Executive components also rely on the Microkernel for higher levels of abstraction, called Microkernel objects, some of which are exported within user-level application programming interface (API) calls.