Migrating to Alpha with FX!32
Digital Equipment's x86 binary translator lets you transparently run x86 Win32 applications on Windows NT 4.0 Alpha machines.
August 31, 1997
My appreciation ofAlpha machines is not a big secret around these parts. I've been an Alpha fansince the first time I laid my hands on Digital Equipment's 150MHz variety, backwhen the fastest Intel was a Pentium 60, complete with floating point bug. TheDigital Alpha is among the world's fastest processors, but this RISC-basedprocessor can't natively run all forms of Intel-based programs. To address thisissue, Digital came up with FX!32, a translation tool that is incredibly cool.It converts Intel Win32 code into native Alpha instructions, creating Alphacompatibility for most 32-bit Intel-based Windows NT applications. Joel Slossexplained a prototype of FX!32 in his October 1996 article, "FX!32."I'll describe how version 1.1 has developed.
FX!32 1.1 is a software-based x86 (Intel-based) Win32 (32-bit) binarytranslator. It lets users run most native Intel x86 code on their Alpha systems.Independent benchmark testing results show that some Alpha systems using FX!32either match or beat the performance of the same applications running on 200MHzPentium Pro systems.
FX!32 works by translating the Intel execuTables, called images, into anAlpha code image. When you run a Win32 application that was compiled for an x86system, FX!32 immediately recognizes that the application is not native to theAlpha. FX!32 then either converts the Intel code into Alpha code on the fly or(if you've run this application before) runs a previously translated programimage from disk.
As you run the application, FX!32 collects information, such as each calledprogram routine, static jump points to other routines, and the number of timesthe application calls the routines. FX!32 saves this information as a series offiles called profiles. Profiles are a list of program routines encounteredduring the execution of the program. Each time you run the application, FX!32collects profile information, merges the new information with existing profileinformation, andbased on the threshold settings of the ConfigurationManager decides when to reoptimize the code. After each optimization,the application will run faster as FX!32 translates more of the application intonative Alpha format. According to Digital, the greatest performance improvementusually occurs after the first or second time you run the application.
Keep in mind that FX!32 optimizes only the code that you've executed. If younever use certain functions of a program (e.g., the Table insertion tool inMicrosoft Word), FX!32 won't optimize those routines until it collectsinformation about them. Information collection occurs when you start theroutines through a menu command, tool button, or hot-key combination.
FX!32 consists of the following main parts:
The installer program, which installs Intel-based applications.
The FX!32 Server service, which lets the software optimize and execute theIntel-based code and perform other general housekeeping tasks, such as mergingprofile information and deciding when to optimize the code again.
A runtime environment, which transparently runs the application andcollects information about what Intel program routines FX!32 encounters. Thisinformation will become the execution profile for the application.
The Background Optimizer, which uses the profiles to create the optimizedcode in a way similar to the operation of program compiler.
The FX!32 Server, which coordinates the runtime environment with theoptimizer and decides whether to further optimize the code (if it hasn't alreadybeen fully optimized).
The Configuration Manager, which sets optimization schedules and lets theuser define maximum disk usage parameters for profiles. FX!32 creates profilesas the application executes, and it stores the profiles on disk. Users might notbe aware that FX!32 is using increasing amounts of disk space with eachoptimization, so the Configuration Manager lets users control the maximum amountof space that FX!32 can use.
Easy Installation
Now that you know what FX!32 is and how it works, let's look at installingthe software. Installation is easy: Just pick the installation directories andchoose a Start Menu folder name for the FX!32 software. The installation programthen copies all the necessary FX!32 files and creates a menu entry on the StartMenu for easy execution.
To run Intel-based applications through FX!32, you install them on theAlpha through the FX!32 Installer. First, you run the FX!32 Installer and tellthe Installer where to find the Win32 application's setup program. The Installerthen launches the setup program, which installs your application. Softwaremanufacturers distribute Windows-based applications with one of four types ofinstallation program: full 32-bit, 16-bit to 32-bit, 16-bit to i286 (does anyonestill use 286 software?), and 16-bit enhanced mode (i386, i486, etc). The FX!32Installer supports all four types of Windows installation programs under WindowsNT 4.0, but only three--all except the 16-bit enhanced mode installationprograms--under Windows 3.51.
FX!32 launches the application immediately after installation. You can usethe application immediately after you install it, or close it down for lateruse. By default, FX!32 begins to generate optimized Alpha code as soon as youfinish using the application and close it. However, you might want to scheduleoptimization to run later, for example, when the extra overhead of theoptimization process is least likely to burden your system.
Program Optimization
As Screen 1 shows, you use the Configuration Manager to schedule theoptimization. From the Options menu, choose Scheduler. This action presents thedialog box shown in Screen 2. As you can see from the options, scheduling isflexible. You can schedule optimizations at different times on different days.
Screen 1 shows the Configuration Manager in action as FX!32 is optimizing acopy of Paint Shop Pro. The top pane displays FX!32 and the application; thebottom pane displays a list of all execuTable modules associated with theselected application. The Optimizer Status column shows that FX!32 has optimizedthe files marked Success, hasn't yet optimized the .FLT files markedNever attempted, and is in the process of optimizing MSVCRT.DLL, whichhas an optimization status of 80 percent complete with 9 seconds remaining.
In addition to optimizing the program for Alpha use, the ConfigurationManager lets you view (for your general information) the profiles that FX!32 hasestablished for any Intel-based code you've installed; you can also establishdisk space usage restrictions for those profiles. FX!32 can erase profiles fromseldom-used programs, saving precious disk space.
Digital has designed FX!32 incredibly well. Users have only to install andoptimize Intel-based applications; from that point on, FX!32 operatestransparently to the user.
FX!32 1.1 offers several improvements over the previous version. The mostdramatic improvement is more efficient memory utilization in the FX!32optimizer. Other enhancements include the ability to mail documents from yourMessaging API (MAPI)-enabled applications; deferred scheduling of optimizations;significant improvement in the startup times for FX!32-enabled applications;several enhancements in the runtime, including DirectSound support andimprovements to FX!32 Server and to the Exchange extensions; and facilitation ofmost applications that require specific virtual memory addresses.
A Few Limitations
Before you think you've just found your pot of gold, let me point out a fewof FX!32's limitations. The software supports only Win32 x86 applications thatrun under NT, which includes most 32-bit Windows 95 applications. Although thesoftware runs on NT 3.51, Digital doesn't support this platform; so if you useFX!32 under NT 3.51, you're on your own. FX!32 does not support the use ofIntel-based services (such as a third-party tape backup service), Screen savers,debuggers, or device drivers. You can't install Microsoft's Wx86 emulator on thesame system with FX!32.
FX!32 supports only those NT APIs that Microsoft supports under NT forAlpha. Although FX!32 1.1 supports Object Linking and Embedding (OLE) andActiveX is a superset of OLE, Microsoft and Digital don't yet support ActiveXfor the Alpha, nor is ActiveX completely functional on the platform.
You'll want to be aware of several other limitations, restrictions, andinformational tidbits before diving off the deep end with this software, so besure to examine the README.TXT file included with the distribution. The fileoutlines everything you need to know before you get started.
FX!32 is available for NT 4.0 directly from Digital's FX!32 Web site athttp://www.digital.com/info/semiconductor/amt/fx32. The programcomes in several pieces for easy downloading, or if you prefer, you can downloadone large 8.8MB file. If you want the software on CD-ROM, you can order itdirectly from Digital. Ordering instructions are on the company's Web site.
Digital has produced a really nice tool in FX!32. And in a sea of nativeIntel-based applications, FX!32 has eliminated a tremendous amount of myfrustration related to cross-platform compatibility. I'm certain it will do thesame for you.
About the Author
You May Also Like