Windows IT Pro is the authoritative and independent resource for windows nt, windows 2000, windows 2003, windows xp. Features a collection of resources and magazines for windows IT professionals.
  
  
  Advanced Search 


April 1998

Optimizing NT's WOW Subsystem


RSS
Subscribe to Windows IT Pro | See More Internals and Architecture Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!

Put a little WOW in your 16-bit Windows applications

In the midst of a 32-bit software era (with 64-bit applications on the horizon), a surprising number of organizations continue to run legacy 16-bit Windows applications. Some of these applications are mission-critical utilities, whereas others are ancillary components that still perform useful functions. These applications might be hanging around for various reasons. For example, the software manufacturer (usually a vertical-market developer) might be behind in updating the application to a 32-bit version. Worse, the software developer might have gone out of business, which might make a migration or conversion to a competitive product cost-prohibitive for the company using the original software. Whatever the reason, many Windows NT systems administrators must deal with 16-bit Windows applications daily. If you're in this situation, you can use a few tips to optimize NT's Win16 on Win32 (WOW) subsystem and the applications that use it.

The Anatomy of WOW
The WOW subsystem is closely related to the Virtual DOS Machine (VDM) that NT uses to execute 16-bit DOS applications. WOW is an application environment that runs as a user-mode program (the filename is wowexec.exe) and invokes one VDM for all Win16 applications to run in. On RISC-based systems, you can alter the amount of memory WOW allocates for its VDM. On Intel or RISC-based systems, you can edit the command-line parameters the system issues when NT initializes the WOW environment and VDM. By default, all Win16 applications run in the same VDM, using separate threads. This behavior differs from that of standard DOS applications, each of which runs in a separate VDM.

Microsoft designed the WOW subsystem to make the differences between 16-bit and 32-bit applications transparent. WOW, combined with NT's native x86 emulation, lets RISC-based systems (i.e., Alpha, MIPS, and PowerPC) run Win16 applications without specialized hardware or advanced emulation software such as Digital Equipment's FX!32 (for information about FX!32, see Brian Gallagher, "FX!32," page 80). A Win16 VDM includes two system threads: the wowexec.exe thread that starts Win16 applications and a heartbeat thread that emulates timer interrupts to WOW-based applications. Each Win16 VDM also includes a separate thread for each Win16 application running within the WOW process.

Controlling WOW Behavior
To reduce system overhead and increase efficiency, NT waits to load the WOW subsystem until the first time the operating system (OS) invokes a Win16 application. As a result, the first Win16 application takes longer to start than subsequent Win16 applications you execute during the same session. You can reduce the start time for the first Win16 application by forcing NT to preload WOW (use this tip only if you frequently run Win16 applications). To force NT to preload WOW, add a wowexec.exe file shortcut to the Startup group. If you place the wowexec.exe in the per-machine (i.e., common) program group, WOW automatically loads for all users on the machine. If you place the wowexec.exe in the per-user (i.e., personal) program group for one user, WOW automatically loads for just that user.

One of WOW's shortcomings is that WOW remains in memory (even after you close all Win16 applications) until you shut down the system or log off. You can free up the memory and CPU resources NT has allocated to WOW by manually terminating the wowexec.exe process after you finish running all Win16 applications during a session. To terminate the wowexec.exe process, press Ctrl+Alt+Del or right-click an empty space on the taskbar and click Task Manager to run the NT Task Manager. On the Processes tab, locate the instance of the ntvdm.exe process containing wowexec.exe (no other applications should appear under this instance of ntvdm.exe; if they do, you need to close them before proceeding), as Screen 1 shows. Finally, select this instance of the ntvdm.exe process, and click End Process. NT will issue a warning about terminating processes this way; click Yes to terminate the wowexec.exe process. (You can use other methods to kill processes. For example, the kill.exe utility from the Microsoft Windows NT Server 4.0 Resource Kit lets you kill a process by name or process ID.) Shutting down the wowexec.exe process can free a significant amount of memory (a basic VDM plus wowexec.exe session takes about 3MB of system memory). If you won't be running any other Win16 applications soon, the system or other applications can make better use of this memory.

If one or more Win16 applications are running in their memory spaces, multiple instances of ntvdm.exe and the wowexec.exe process will appear in the Processes window. However, only one instance will remain after you exit all Win16 applications.

Never terminate the ntvdm.exe process (and its child wowexec.exe process) unless you are positive that no active applications are running within the WOW subsystem. Applications running within WOW appear as indented entries underneath ntvdm.exe in the Processes window.

   Previous  [1]  2  Next 


Reader Comments
Clear, insightful and concise. Article was a real help; I was just getting suspicious about the name of WOWEXEC.EXE and its behaviour.

Rob October 16, 2003


I would be interested in WOWEXEC errors - ie how to diagnose and rectify a problem where a WOWEXEC operation error on a WindowsNT machine when it is left alone for a couple of minutes.

John Armagh October 20, 2003


yes, i have a problem with my wowexec.exe....everytime i try and run a 16 bit application...the wowexec.exe opens up in the taskmanager and hangs there....and the program never opens...i have to kill it manually if i want it to go away...i was wondering if anyone knew anything about this...i have researched it..and i do not have a corrupt wowexec.exe file....and it seems other people have this problem too sometimes

drew December 31, 2003


I deleted my wowexec.exe after a virus corrupted it, or I got a virus called wowexec. Anyway, now I cant run a bunch of programs so how can I get it back?
Thanks.

brad February 21, 2004


have anyone had any problems with 16-bit applications that seam to eat a steady percentage of the processor? I have an application that runs great in windows 98 but in 2000 it pins the processor at about 50%. if i run multiple instences of the application, i can run about 5 and they will all take a steady 20%. Any suggestions on how i can resolve this? thanks

joe March 30, 2004


clear, insightful, consise, helpful .. couldn't agree with Rob more

Jay April 09, 2004


Would anyone have ANY idea why, when I run Cakewalk 3.01 MIDI sequencing software on a Sony
laptop w/ WinXP (2.4G Celeron), my CPU usage jumps to 100% and stays there??!!

Is it something to do with that "wowexec.exe" and "ntvdm.exe" that I see in the Processes tag in Task manager?

I didn't actually "install" Cakewalk, I just copied the CPWPro folder from another computer into C drive - I've been using it
this way in W95 and W96SE for years.

BTW, the reason I use CWPro 3.01 is that I can run multiple instances at the same time - good if you in a MIDI'd duo that
does dance gigs, where there can't be any lags between songs.

Thanks to anyone who can help!

J Nilsen April 19, 2004


my wowexec.exe has a space in front of it....is this the way it should be or is this virus related????

Michael May 15, 2004


I also have an application that works perfect in win98, and in winxp just hangs.... It completely freezes for a while, and then comes back to life. Anyone know how to solve this?

João Costa June 01, 2004


www.tamedos.com
You can use this program to control CPU usage of 16 bit apps running under NT based OS

Kevin June 03, 2004


 See More Comments  1   2 

You must log on before posting a comment.

If you don't have a username & password, please register now.




Top Viewed ArticlesView all articles
Microsoft: Save Money ... By Paying for Software

Microsoft this week adopted an interesting tactic in its long-running battle with open source software: Businesses looking to save money over the long haul should simply pay for software instead of moving to free, open source solutions. The rationale? ...

Reader Challenge for December 2008 and November Winner

An IT consultant's customer asked if he could change the default login process to eliminate the Ctrl-Alt-Del sequence. The catch was, it was in Vista. ...

Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...


Windows OSs Whitepapers Why SaaS is the Right Solution for Log Management

Related Events Check out our list of Free Email Newsletters!

Windows OSs eBooks Understanding and Leveraging Code Signing Technologies

A Guide to Windows Certification and Public Keys

SQL Server Administration for Oracle DBAs

Related Windows OSs Resources Become a VIP member of the Windows IT Pro community!
Get it all with the VIP CD and VIP access. A $500+ value for only $279!

Subscribe to Windows IT Pro!
Solve your toughest technical problems with our experts and access 10,000 + articles online. 30% off

Monthly Online Pass - Only $5.95!
Get instant access to 10,000+ articles from Windows IT Pro Magazine!

TechNet Virtual Labs
Evaluate and test Microsoft's newest products.


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro Windows Dev Pro IT Job Hound ITTV
IT Library Technology Resource Directory Connected Home Windows Excavator Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 Copyright © 2008 Penton Media, Inc., All rights reserved. Terms and Use | Privacy Statement | Reprints and Licensing