Windows on Windows
|This article needs additional citations for verification. (July 2009)|
In computing, Windows on Windows - commonly referred to as 16-bit WOW, WOWEXEC or simply by its acronym WOW - is a compatibility layer of 32-bit versions of the Microsoft Windows NT family of operating systems that extends the NTVDM to provide limited support for running legacy Win16 applications written for Windows 3.x. With 64-bit-based systems "WOW" generally refers to support for running 32-bit applications on 64-bit versions of Windows, known as WOW64.
Many 16-bit Windows (Win16) legacy applications can run without changes on newer 32-bit editions of Windows. The reason designers made this possible was to allow application developers time to remediate their applications during the industry transition from Windows 3.1x to Windows 95 and later, without restricting the ability for the operating system to be upgraded to a current version before all the applications used by a customer had been taken care of. However 32-bit versions of Windows are in decline, with support already dropped for server platforms with the release of Windows Server 2008 R2.
The Windows 9x series of operating systems, reflecting their roots in DOS, functioned as hybrid 16/32-bit systems in the sense that the underlying operating system was not truly 32-bit, and therefore could run Win16 applications natively without requiring any special emulation; Windows NT based operating systems differ significantly from Windows 9x in their architecture, and therefore require a more complex solution. Two separate strategies are used in order to let 16-bit applications run unmodifed on 32-bit NT-based versions of Windows (with some runtime limitations). They are called thunking and shimming.
All 16-bit applications run by default in a single virtual DOS machine with shared memory space. However they can be configured to each run in their own separate memory space, in which case each 16-bit process will have its own dedicated virtual machine. The separate memory space increases application stability by preventing buggy 16-bit applications from interfering with one another, at the expense of 16-bit IPC and increased memory utilisation.
The Win16 subsystem is available in 32-bit editions of Windows NT, 2000, XP, Server 2003, Vista, Server 2008, 7, and 8. The 64-bit editions of Windows versions that have them, however, do not include the WoW Win16-support subsystem and therefore cannot run Win16 applications, nor do they provide the NTVDM emulator. DOS and 16-bit Windows applications, therefore cannot run in 64-bit versions of Windows without third-party emulation software (e.g. DOSBox) or a virtual machine with either a 32-bit version of Windows, Windows XP Mode, or DOS itself.
The WOWEXEC.EXE process on a Windows NT system facilitates Windows-on-Windows. In addition to Windows-on-Windows emulating the Windows 95 and Windows 98 kernels, the WIN.COM file emulates a Windows 3.x kernel for NTVDM, which runs the 16-bit DOS-based Windows applications on Windows NT.
Application-compatibility issues, notably around long filenames, multiple users and the concept of least privilege, may prevent some applications from working if they, for example, incorrectly assume write access to the whole file system when NTFS security is in place.
When the Windows 95 line of operating systems was designed, a key requirement was for the file system to keep backward compatibility with 8.3 filenames to allow legacy applications to continue to work on the platform. Windows 95 and later operating systems therefore support a compatibility mode whereby both a long filename and a short filename are stored in the File Allocation Table.
Furthermore, legacy applications that attempt to access hardware directly cannot do so in user mode. Legacy applications may also fail if system configuration files from the DOS and Windows 9x era are not present in Windows NT based kernels, hence the reason for zero-length versions of files like AUTOEXEC.BAT and CONFIG.SYS having to be carried forward on operating systems that do not use them.
A considerable number of shims are present in the application compatibility layer of later versions of Windows to intercept and modify API calls made by legacy applications that were written with a different set of assumptions and operating system best practices in mind. These fixes are updated from time-to-time as issues are discovered in popular legacy applications that are still in use.
- "Starting 16-Bit WOW Subsystem on Windows NT Server". Microsoft. Retrieved 11 Feb 2013.
- "Disabling the MSDOS and WOWEXEC Subsystems on Terminal Server". Microsoft. Retrieved 13 Feb 2013.
- "WOW Environment Remains in Memory After Quitting 16-Bit Program". Microsoft. Retrieved 13 Feb 2013.
- "Windows NT Subsystems and Associated Files". Retrieved 13 Feb 2013.
- "PRB: Relocation of Ntvdm.exe Fails on Multiprocessor Computers". Microsoft. Retrieved 11 Feb 2013.
- "Application Compatibility". Microsoft. Retrieved 11 Feb 2014.
- "Application Compatibility Update for Windows 7 and Windows Server 2008 R2: August 2010". Microsoft. Retrieved 11 Feb 2013.
- Windows NT subsystems
- What are NTVDM and WOW?
- Monitoring 16-bit Windows applications
- Optimize How Windows 7 Runs 16-Bit and MS-DOS-Based Programs