Chapter Eleven Windows XP Professional Application Support Objectives

Chapter Eleven Windows XP Professional Application Support

Objectives n n n Understand the runtime environments and applications support in Windows XP Professional Deploy DOS, Win 16, and Win 32 applications Fine-tune the application environment for DOS and Win 16 executables Understand how to assign and publish applications using Group Policy Address application compatibility issues

Windows XP Professional System Architecture n Fundamentally, the Windows XP Professional operating system incorporates three primary components: Environment subsystems n Executive Services n User applications n

Windows XP Professional System Architecture n n n Environment subsystems offer runtime support for a variety of different kinds of applications Executive Services and the underlying Windows XP kernel define the kernel mode for this operating system and its runtime environment User applications provide the functionality and capabilities that rank Windows XP Professional among the most powerful network operating systems in use today

Windows XP Professional System Architecture Figure 11 -1: Components of the Windows XP Professional architecture

Kernel Mode Versus User Mode n n n The main difference between kernel mode and user mode lies in how memory is used by kernel-mode components and user-mode components Processes running in user mode cannot access hardware or communicate with other processes directly When code runs in the Windows XP kernel mode, it may access all hardware and memory in the computer

Processes and Threads n Process n n An environment in which the executable portion of a program runs, defining its memory usage, which processor to use, its object, and so forth Thread n Executable portion of a program, with a priority based on the priority of its process

Processes and Threads Figure 11 -2: The Process tab in Task Manager displays all currently active Windows XP Professional processes

Processes and Threads n Child processes n n Parent process n n Inherits operating characteristics from its parent subsystem Windows XP environment subsystem that creates a runtime process Context n Current collection of Registry values and runtime environment variables in which process or thread runs

Environment Subsystems Windows XP Professional’s support for multiple runtime environments, also known as environment subsystems, confers numerous advantages n Local procedure call (LPC) n n n Technique to permit processes to exchange data in the Windows XP runtime environment Dynamic link library (DLL) n Collection of virtual procedure calls

Environment Subsystems n Context switch n n Act of unloading the context information for one process and replacing it with the information for another To permit the operating system to run more efficiently, Windows XP avoids making context switches whenever possible

The Win 32 Subsystem n Win 32 subsystem Operating environment that supports 32 -bit Windows applications n Is required to run Windows XP n Also the foundation upon which virtual DOS machines (VDMs) rest n

Win 32 Applications n Environment subsystem n n The Win 32 subsystem is the main environment subsystem under Windows XP, and the only one required for operation Multithreading n When a program’s process contains more than one thread, it is said to be a multithreaded processes

Win 32 Applications n Memory space Section of code that modifies data structures used by several threads is called a critical section n It is very important that a critical section never be overwritten by more than one thread at once n n Application use Windows XP synchronization objects to prevent this from happening

Win 32 Applications n Input message queues n n Queue for each process that contains the messages sent to the process from the user Base priorities n Lowest priority that a thread may be assigned

Win 32 Applications Figure 11 -3: The Task Manager’s Process tab with priority options on display

DOS and the Virtual DOS Machine n It is reasonable to describe two separate operating environments that can run within a VDM: n One supports straightforward DOS emulation and may be called the DOS operating environment n The other supports operation of Win 16 applications within a VDM, and may be called the Win 16 operating environment

DOS and the Virtual DOS Machine Figure 11 -4: The Task Manager’s Process tab shows ntvdm. exe running when a 16 -bit DOS application is loaded

VDM Components n The VDM runs using the following files: Ntio. sys n Ntdos. sys n Ntvdm. exe n Ntvdm. dll n Redir. exe n

Virtual Device Drivers (VDDs) n DOS applications do not communicate directly with Windows XP drivers n Instead, a layer of VDDs underlies these applications, and they communicate with Windows XP 32 -bit drivers n VDDs are device drivers used by VDMs

AUTOEXEC. BAT and CONFIG. SYS Figure 11 -5: AUTOEXEC. NT as it appears in Notepad

AUTOEXEC. BAT and CONFIG. SYS Figure 11 -6: CONFIG. NT as it appears in Notepad

AUTOEXEC. BAT and CONFIG. SYS Figure 11 -7: The Registry Editor shows the variables defined within the …Environment subkey

Custom DOS Environments Figure 11 -8: MASTERMIND. EXE Properties, Programs tab

Custom DOS Environments Figure 11 -9: MASTERMIND. EXE Properties Misc tab

Win 16 Concepts and Applications Like DOS applications, Win 16 applications also run in a VDM n Unlike DOS applications, all Win 16 applications run in same VDM unless you specify otherwise n n This lets them act like Win 32 applications n This also lets multiple Win 16 applications interact with one another within a single VDM

Win 16 Concepts and Applications n Multitasking n n Sharing processor time between threads Win 16 -on-Win 32 (WOW) n Name for collection of components, interfaces, and capabilities that permits Win 32 subsystems to provide native support for well-behaved 16 -bit Windows applications

Win 16 Concepts and Applications Figure 11 -10: The Task Manager Processes tab showing the wowexec environment

Win 16 -on-Win 32 Components Wowexec. exe n Wow 32. dll n Mmtask. tsk n Ntvdm. exe, ntvdm. dll, ntio. sys, and redir. exe n

Win 16 -on-Win 32 Components Vdmredir. dll n Krnl 386. exe n Gdi. exe n User. exe n

Memory Space n Separate and shared memory The “lose one, lose them all” effect of a single shared VDM explains why you might choose to run Win 16 applications in separate VDMs n Disadvantages of running Win 16 applications in separate memory spaces hinge on memory usage and interprocess communications n n Message queues n All Win 16 applications running in a single process share a message queue

Memory Space n Threads n n All application threads within a WOW VDM are cooperatively multitasked Using only well-behaved DOS and Win 16 applications n In Windows XP terminology, any application that attempts direct access to hardware is called “illbehaved” n Such applications will not run in a VDM

Program Compatibility Wizard Figure 11 -11: The Program Compatibility Wizard starts with a welcome screen, then guides you through automated compatibility checks

Program Compatibility Wizard Figure 11 -12: Compatibility mode settings are selected from a specific list of available options

Program Compatibility Wizard Figure 11 -13: The Compatibility tab in the Properties window for any executable file provides direct access to the same controls offered through the Program Compatibility Wizard

Assigning and Publishing Applications on Windows XP Professional n Package n n File that contains instructions for the Windows Installer Transform n Specific type of Microsoft Installer file that usually ends in. mst

Resolving DLL Conflicts in Windows XP n n Windows XP includes a remarkable new technology called Windows Side by Side (Win. Sx. S) isolation support By default, Windows checks DLLs and other common code components before installing them on a computer n If it finds potential conflicts, it automatically makes the Registry modifications necessary to point to alternate versions of DLLs and other shared objects in a special directory named %systemroot%WINDOWSWin. Sx. S

Chapter Summary n Windows XP Professional is divided into three main parts: n n Environment subsystems Executive Services User applications In addition to the basic Win 32 Subsystem, two special -purpose operating environments (VDM and WOW) also run within that subsystem to provide backward compatibility for DOS and Win 16 applications

Chapter Summary Of these subsystems, only Win 32 is crucial to the functioning of Windows XP as a whole n The other subsystems start up only as they are needed n Windows XP includes some interesting additional application management facilities n
- Slides: 39