470 likes | 669 Views
70-270: MCSE Guide to Microsoft Windows XP Professional Second Edition, Enhanced Chapter 11: Windows XP Professional Application Support. Objectives. Understand the Windows XP Professional system architecture Deploy Win32 applications
E N D
70-270: MCSE Guide to Microsoft Windows XP ProfessionalSecond Edition, EnhancedChapter 11: Windows XP Professional Application Support
Objectives • Understand the Windows XP Professional system architecture • Deploy Win32 applications • Fine-tune the application environment for DOS and the virtual DOS machine • Fine-tune the application environment for Win16 • Work with Windows application management facilities Guide to MCSE 70-270, Second Edition, Enhanced
Windows XP Professional System Architecture • Components: • Environment subsystem • Executive Services • Subsystem: • Operating environment • Emulates another operating system • Kernel modecomponents • Permitted to access system objects and resources directly Guide to MCSE 70-270, Second Edition, Enhanced
Kernel Mode Versus User Mode • Main difference: • Memory usage • User mode: • Each process perceives entire 4 GB of virtual memory as its exclusive property • Upper 2 GB reserved for operating system use • Address space entirely virtual • Processes may share memory areas with other processes Guide to MCSE 70-270, Second Edition, Enhanced
Kernel Mode Versus User Mode (continued) • User mode: • One user mode process cannot crash another • Processes cannot access hardware or communicate with other processes directly • Kernel mode: • May access all hardware and memory in computer • All operations share the same memory space • One kernel mode function can corrupt another’s data • Can cause the operating system to crash Guide to MCSE 70-270, Second Edition, Enhanced
Processes and Threads • Process: • Defines operating environment in which application or any major operating system component runs • Includes: • Own private memory space • Set of security descriptors • Priority level for execution • Processor-affinity data • List of threads Guide to MCSE 70-270, Second Edition, Enhanced
Processes and Threads (continued) • Thread: • Basic executable unit in Windows XP • Every process includes at least one thread • Consists of: • Placeholder information associated with single use of any program that can handle multiple concurrent users or activities • Associated with processes • Do not exist independently Guide to MCSE 70-270, Second Edition, Enhanced
Processes and Threads (continued) • Applications must be explicitly designed to take advantage of threading • Processes can create other processes • Called child processes • Child processes can inherit some of the characteristics and parameters of their parent process Guide to MCSE 70-270, Second Edition, Enhanced
Processes and Threads (continued) • Context • Current collection of Registry values and runtime environment variables in which a process or thread runs Guide to MCSE 70-270, Second Edition, Enhanced
Environment Subsystems • Windows XP Professional • Offers support for various application platforms • Includes limited support and backward compatibility for: • 16-bit Windows applications • DOS applications. • Known as environment subsystems Guide to MCSE 70-270, Second Edition, Enhanced
Environment Subsystems (continued) • Benefits of Environment subsystems: • Permits users to run more than one type of application concurrently • Makes maintaining the operating system easier • Easy to add to or enhance Windows XP • Each subsystem runs as separate user-mode process • Except for Win32 subsystem Guide to MCSE 70-270, Second Edition, Enhanced
Environment Subsystems (continued) • Local procedure call (LPC) • Dynamic link library (DLL) • Context switch: • All the information for the calling process must be unloaded and replaced with the information for the called process Guide to MCSE 70-270, Second Edition, Enhanced
The Win32 Subsystem • Only subsystem required for the functioning of the operating system • Handles all major interface capabilities • Foundation upon which virtual DOS machines (VDMs) rest Guide to MCSE 70-270, Second Edition, Enhanced
Win32 Applications • Applications run under that operating system Guide to MCSE 70-270, Second Edition, Enhanced
The Environment Subsystem • Win32 subsystem: • Main environment subsystem under Windows XP • Only one required for operation Guide to MCSE 70-270, Second Edition, Enhanced
Multithreading • Multithreaded process: • Contains more than one thread of execution • Multithreading advantages: • Provides multiple threads of execution within single memory space • Does not require that messages be passed between processes • Threads don’t require as much context information as processes Guide to MCSE 70-270, Second Edition, Enhanced
Memory Space • Synchronization objects • Critical section: • Section of code that modifies data structures used by several threads Guide to MCSE 70-270, Second Edition, Enhanced
Input Message Queues • Organize user input • Takes user messages from general input queue • Distributes them to input message queue Guide to MCSE 70-270, Second Edition, Enhanced
Base Priorities • Priority class: • Helps determine the priority at which threads in process must run • Scale from 0 (lowest) to 31 (highest) • Each thread may have its own priority • Always relative to priority assigned to underlying process • Known as base priority Guide to MCSE 70-270, Second Edition, Enhanced
DOS and the Virtual DOS Machine • DOS and Win16 applications • Run within a virtual DOS machine (VDM) • VDM: • Special environment process that simulates DOS environment • DOS operating environment • Supports straightforward DOS emulation • Win16 operating environment • Supports operation of Win16 applications Guide to MCSE 70-270, Second Edition, Enhanced
DOS and the Virtual DOS Machine • Occurs within a Win32 process named ntvdm.exe Guide to MCSE 70-270, Second Edition, Enhanced
VDM Components • Ntio.sys • Ntdos.sys • Ntvdm.exe • Ntvdm.dll • Redir.exe Guide to MCSE 70-270, Second Edition, Enhanced
Virtual Device Drivers • Underlies DOS applications • Communicate with Windows XP 32-bit drivers • Windows XP supplies VDDs for: • Mouse • Keyboard • Printers • Communication ports • File system Guide to MCSE 70-270, Second Edition, Enhanced
AUTOEXEC.BAT and CONFIG.SYS • AUTOEXEC.NT • Replaces AUTOEXEC.BAT • CONFIG.NT • Replaces CONFIG.SYS Guide to MCSE 70-270, Second Edition, Enhanced
AUTOEXEC.NT Guide to MCSE 70-270, Second Edition, Enhanced
CONFIG.NT Guide to MCSE 70-270, Second Edition, Enhanced
Custom DOS Environments • Use Properties dialog box to customize • Tabs: • General • Program • Font • Memory • Screen • Misc • Compatibility • Security • Summary Guide to MCSE 70-270, Second Edition, Enhanced
Custom DOS Environments (continued) Guide to MCSE 70-270, Second Edition, Enhanced
Win16 Concepts and Applications • Run in a VDM • All Win16 applications run in the same VDM by default • Can run in separate VDMs • Win16-on-Win32 (WOW)VDM: • Runs as a multithreaded application • Each Win16 application occupies a single thread Guide to MCSE 70-270, Second Edition, Enhanced
Win16 Concepts and Applications (continued) Guide to MCSE 70-270, Second Edition, Enhanced
Win16-on-Win32 Components • Wowexec.exe • Wow32.dll • Mmtask.tsk • Ntvdm.exe • ntvdm.dll • ntio.sys Guide to MCSE 70-270, Second Edition, Enhanced
Win16-on-Win32 Components (continued) • redir.exe • Vdmredir.dll • Krnl386.exe • Gdi.exe • User.exe • Calls made to 16-bit drivers • Transferred (“thunked”) to appropriate 32-bit driver without the application having to call driver directly Guide to MCSE 70-270, Second Edition, Enhanced
Win16-on-Win32 Components (continued) • XP sustains WOW environment until • System is restarted • Manually terminate the Wowexec.exe task Guide to MCSE 70-270, Second Edition, Enhanced
Memory Space • Multiple threads running in single process can affect the performance of each application • Can make tracking applications more difficult • If one of application goes astray and causes the VDM to freeze or crash, all applications in that VDM will be affected Guide to MCSE 70-270, Second Edition, Enhanced
Separate and Shared Memory • Separate VDMs advantages: • Increase reliability of applications as a whole • One errant application won’t take down all the other Win16 applications if it crashes • Preemptive multitasking is possible Guide to MCSE 70-270, Second Edition, Enhanced
Separate and Shared Memory (continued) • Disadvantages: • Requires 2 MB of space in the paging file and 1 MB of additional working set size • Increased time to switch from one application to another • To choose: • Try both ways and compare performance Guide to MCSE 70-270, Second Edition, Enhanced
Message Queues • Win16 applications running in a single process share message queue • If one application becomes unable to accept input • Blocks all other Win16 applications in VDM from accepting further input Guide to MCSE 70-270, Second Edition, Enhanced
Threads • Win16 threads that run in a VDM do not multitask like threads running in the Win32 subsystem • Cooperatively multitasked • Any one thread can hog CPU Guide to MCSE 70-270, Second Edition, Enhanced
Using Only Well-behaved DOS and Win16 Applications • “Ill behaved” • Access system hardware directly • Bypass any access APIs or drivers • Do not run in a VDM • “Well behaved” • Uses standard DOS or Windows 3.x APIs Guide to MCSE 70-270, Second Edition, Enhanced
Other Windows Application Management Facilities • Additional methods for managing or accessing applications • Program Compatibility Wizard • Publish applications using Group Policy Objects • Resolve problems related to programs that use different versions of DLLs with same name Guide to MCSE 70-270, Second Edition, Enhanced
Program Compatibility Wizard • Support the installation of older Windows applications Guide to MCSE 70-270, Second Edition, Enhanced
Program Compatibility Wizard (continued) Guide to MCSE 70-270, Second Edition, Enhanced
Assigning and Publishing Applications on Windows XP Professional • Use group policies • Assign or publish programs to users or computers • In: • Domain • Site • Organizational unit Guide to MCSE 70-270, Second Edition, Enhanced
Assigning and Publishing Applications on Windows XP Professional (continued) • Assign Windows Installer package to some group or user • Windows Installer package: • Complete set of software installation and configuration instructions • .msi file • Use Active Directory Users and Computers MMC snap-in Guide to MCSE 70-270, Second Edition, Enhanced
Resolving DLL Conflicts in Windows XP • Windows Side by Side (WinSxS) isolation support • New feature • Checks DLLs and other common code components before installing them on computer • Finds potential conflicts • Automatically makes Registry modifications necessary to point to alternate versions of DLLs Guide to MCSE 70-270, Second Edition, Enhanced
Summary • Main parts: • Environment subsystems • Executive Services • User applications • Win32 subsystem • Crucial to the functioning of Windows XP • VDM • Support DOS and Win16 programs Guide to MCSE 70-270, Second Edition, Enhanced
Summary (continued) • Program Compatibility Wizard • Group Policy Objects to assign and publish Windows applications • Recognize and resolve potential conflicts with DLLs Guide to MCSE 70-270, Second Edition, Enhanced