The information in this article applies to:
SUMMARY
Because of differing instruction sets between processors, object code is
not binary-compatible across platforms. To enable object code compiled for
processor X to run on processor Y, a virtual machine must be created on
processor Y to emulate processor X's instructions, which results in a
considerable performance hit. For this reason, Windows NT offers a strong
source compatibility, which makes it a relatively simple matter to compile
the same code into native object code for each platform.
MORE INFORMATION
Source code is compiled into executable or object code for the instruction
set of a specific processor or family (x86, 680x0, R3000/4000, and so
forth). This code runs natively only on that type of processor. Remember,
this reduces to 1's and 0's, hence binary, so even if two processors have a
large overlap in the available instructions (and they do; MOVs, XORs, or
whatever at the assembly language level), what is actually executed is not
even relatively "high level" human-readable assembly code but merely a
series of bytes that by convention/definition only are assigned the
meanings that are human-readable at the assembly language level.
Notes: (1) POSIX 1003.1 is a C-language source-level standard for basic
operating system services. POSIX applications don't need to be binary-
compatible even on the same instruction set! That is, a POSIX application
compiled and linked for SCO on x86 will NOT run on x86 Windows NT POSIX or
x86 Sun/Interactive POSIX. (2) OS/2 1.x support is technically feasible but
would have required more work on the non-Intel platforms, and was not
considered a high priority.
The Hardware Abstraction Layer (HAL)A common misconception is that the HAL should allow binary compatibility. The Windows NT HAL has absolutely nothing to do with the issue discussed above; that is, running code complied for processor X on processor Y. Nor is the HAL akin to a "virtual machine" implementation; it does not simulate anything. Rather, the HAL is simply an example of a good modular software design that deals with the issue of differences in hardware design between machines with the same instruction set (or between instruction sets).The HAL provides a set of services to the rest of the Windows NT executive that abstracts and "hides" the differences between low- level hardware- software interfaces, such as with DMA controllers, programmable interrupt controllers, clocks and timers, and so forth. In a typical pre-Windows NT operating system, there is lots of code embedded throughout the operating system (particularly in device drivers) that is specifically tied to particular implementations of hardware services (a particular PIC, a particular DMA chip, and so forth). If one of these hardware pieces is changed, lots of code scattered throughout the system will break. As a result, the hardware never changed and a typical 486/66 machine today uses the same low-function hardware devices that appear in the IBM AT 286 (if not the IBM PC itself). In Windows NT, any other part of the OS (including the kernel and all device drivers) that needs to deal with those low-level devices now uses HAL services, and is therefore isolated from changes in the hardware. If you change those hardware pieces you only need to change the HAL. This results in at least the following two advantages:
Additional query words: 3.10 3.50
Keywords : |
Last Reviewed: January 10, 2000 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |