Upload
clara-preston
View
218
Download
0
Embed Size (px)
DESCRIPTION
Windows XP Professional System Architecture Fundamentally, the Windows XP Professional operating system incorporates three primary components: Fundamentally, the Windows XP Professional operating system incorporates three primary components: Environment subsystems Environment subsystems Executive Services Executive Services User applications User applications
Citation preview
Chapter ElevenChapter Eleven
Windows XP Windows XP Professional Professional Application Application
SupportSupport
ObjectivesObjectives Understand the runtime environments and Understand the runtime environments and
applications support in Windows XP applications support in Windows XP ProfessionalProfessional
Deploy DOS, Win16, and Win32 applicationsDeploy DOS, Win16, and Win32 applications Fine-tune the application environment for Fine-tune the application environment for
DOS and Win16 executablesDOS and Win16 executables Understand how to assign and publish Understand how to assign and publish
applications using Group Policyapplications using Group Policy Address application compatibility issuesAddress application compatibility issues
Windows XP Professional Windows XP Professional System ArchitectureSystem Architecture
Fundamentally, the Windows XP Fundamentally, the Windows XP Professional operating system Professional operating system incorporates three primary incorporates three primary components:components: Environment subsystemsEnvironment subsystems Executive ServicesExecutive Services User applicationsUser applications
Windows XP Professional Windows XP Professional System ArchitectureSystem Architecture
Environment Environment subsystemssubsystems offer runtime offer runtime support for a variety of different kinds of support for a variety of different kinds of applicationsapplications
Executive Services and the underlying Executive Services and the underlying Windows XP Windows XP kernelkernel define the define the kernel modekernel mode for this operating system and its runtime for this operating system and its runtime environmentenvironment
User applications provide the functionality and User applications provide the functionality and capabilities that rank Windows XP Professional capabilities that rank Windows XP Professional among the most powerful network operating among the most powerful network operating systems in use todaysystems in use today
Windows XP Professional Windows XP Professional System ArchitectureSystem Architecture
Figure 11-1: Components of the Windows XP Professional architecture
Kernel Mode Versus User Kernel Mode Versus User ModeMode
The main difference between kernel mode The main difference between kernel mode and and user modeuser mode lies in how memory is lies in how memory is used by kernel-mode components and used by kernel-mode components and user-mode componentsuser-mode components
Processes running in user mode cannot Processes running in user mode cannot access hardware or communicate with access hardware or communicate with other processes directlyother processes directly
When code runs in the Windows XP kernel When code runs in the Windows XP kernel mode, it may access all hardware and mode, it may access all hardware and memory in the computermemory in the computer
Processes and ThreadsProcesses and Threads ProcessProcess
An environment in which the executable An environment in which the executable portion of a program runs, defining its portion of a program runs, defining its memory usage, which processor to use, memory usage, which processor to use, its object, and so forthits object, and so forth
ThreadThread Executable portion of a program, with a Executable portion of a program, with a
priority based on the priority of its priority based on the priority of its processprocess
Processes and ThreadsProcesses and Threads
Figure 11-2: The Process tab in Task
Manager displays all currently active Windows XP
Professional processes
Processes and ThreadsProcesses and Threads
Child processesChild processes Inherits operating characteristics from its Inherits operating characteristics from its
parent subsystemparent subsystem Parent processParent process
Windows XP environment subsystem that Windows XP environment subsystem that creates a runtime processcreates a runtime process
ContextContext Current collection of Registry values and Current collection of Registry values and
runtime environment variables in which runtime environment variables in which process or thread runsprocess or thread runs
Environment SubsystemsEnvironment Subsystems Windows XP Professional’s support for Windows XP Professional’s support for
multiple runtime environments, also multiple runtime environments, also known as environment subsystems, known as environment subsystems, confers numerous advantagesconfers numerous advantages
Local procedure call (LPC)Local procedure call (LPC) Technique to permit processes to Technique to permit processes to
exchange data in the Windows XP exchange data in the Windows XP runtime environmentruntime environment
Dynamic link library (DLL)Dynamic link library (DLL) Collection of virtual procedure callsCollection of virtual procedure calls
Environment SubsystemsEnvironment Subsystems Context switchContext switch
Act of unloading the context Act of unloading the context information for one process and information for one process and replacing it with the information for replacing it with the information for anotheranother
To permit the operating system to To permit the operating system to run more efficiently, Windows XP run more efficiently, Windows XP avoids making context switches avoids making context switches whenever possiblewhenever possible
The Win32 SubsystemThe Win32 Subsystem Win32 subsystemWin32 subsystem
Operating environment that supports Operating environment that supports 32-bit Windows applications32-bit Windows applications
Is required to run Windows XPIs required to run Windows XP Also the foundation upon which Also the foundation upon which virtual virtual
DOS machines (VDMs)DOS machines (VDMs) rest rest
Win32 ApplicationsWin32 Applications Environment subsystemEnvironment subsystem
The Win32 subsystem is the main The Win32 subsystem is the main environment subsystem under Windows environment subsystem under Windows XP, and the only one required for XP, and the only one required for operationoperation
MultithreadingMultithreading When a program’s process contains When a program’s process contains
more than one thread, it is said to be a more than one thread, it is said to be a multithreaded processesmultithreaded processes
Win32 ApplicationsWin32 Applications
Memory spaceMemory space Section of code that modifies data Section of code that modifies data
structures used by several threads is structures used by several threads is called a called a critical sectioncritical section
It is very important that a critical section It is very important that a critical section never be overwritten by more than one never be overwritten by more than one thread at oncethread at once
Application use Windows XP Application use Windows XP synchronization objectssynchronization objects to prevent this to prevent this from happeningfrom happening
Win32 ApplicationsWin32 Applications Input message queuesInput message queues
Queue for each process that contains Queue for each process that contains the messages sent to the process from the messages sent to the process from the userthe user
Base prioritiesBase priorities Lowest priority that a thread may be Lowest priority that a thread may be
assignedassigned
Win32 ApplicationsWin32 Applications
Figure 11-3: The Task
Manager’s Process tab with priority
options on display
DOS and the Virtual DOS DOS and the Virtual DOS MachineMachine
It is reasonable to describe two It is reasonable to describe two separate operating environments that separate operating environments that can run within a VDM:can run within a VDM: One supports straightforward DOS One supports straightforward DOS
emulation and may be called the emulation and may be called the DOS DOS operating environmentoperating environment
The other supports operation of Win16 The other supports operation of Win16 applications within a VDM, and may be applications within a VDM, and may be called the Win16 operating environmentcalled the Win16 operating environment
DOS and the Virtual DOS DOS and the Virtual DOS MachineMachine
Figure 11-4: The Task Manager’s Process tab shows ntvdm.exe running when a 16-bit DOS
application is loaded
VDM ComponentsVDM Components The VDM runs using the following The VDM runs using the following
files:files: Ntio.sysNtio.sys Ntdos.sysNtdos.sys Ntvdm.exeNtvdm.exe Ntvdm.dllNtvdm.dll Redir.exeRedir.exe
Virtual Device Drivers Virtual Device Drivers (VDDs)(VDDs)
DOS applications do not DOS applications do not communicate directly with Windows communicate directly with Windows XP driversXP drivers Instead, a layer of Instead, a layer of VDDsVDDs underlies underlies
these applications, and they these applications, and they communicate with Windows XP 32-bit communicate with Windows XP 32-bit driversdrivers VDDs are device drivers used by VDMsVDDs are device drivers used by VDMs
AUTOEXEC.BAT and AUTOEXEC.BAT and CONFIG.SYSCONFIG.SYS
Figure 11-5: AUTOEXEC.NT as it appears in Notepad
AUTOEXEC.BAT and AUTOEXEC.BAT and CONFIG.SYSCONFIG.SYS
Figure 11-6: CONFIG.NT as it appears in Notepad
AUTOEXEC.BAT and AUTOEXEC.BAT and CONFIG.SYSCONFIG.SYS
Figure 11-7: The Registry Editor shows the variables defined within the …\Environment subkey
Custom DOS Custom DOS EnvironmentsEnvironments
Figure 11-8: MASTERMIND.EXE
Properties, Programs tab
Custom DOS Custom DOS EnvironmentsEnvironments
Figure 11-9: MASTERMIND.EXE
Properties Misc tab
Win16 Concepts and Win16 Concepts and ApplicationsApplications
Like DOS applications, Win16 Like DOS applications, Win16 applications also run in a VDMapplications also run in a VDM
Unlike DOS applications, all Win16 Unlike DOS applications, all Win16 applications run in same VDM unless applications run in same VDM unless you specify otherwiseyou specify otherwise This lets them act like Win32 applicationsThis lets them act like Win32 applications This also lets multiple Win16 applications This also lets multiple Win16 applications
interact with one another within a single interact with one another within a single VDMVDM
Win16 Concepts and Win16 Concepts and ApplicationsApplications
MultitaskingMultitasking Sharing processor time between Sharing processor time between
threadsthreads Win16-on-Win32 (WOW)Win16-on-Win32 (WOW)
Name for collection of components, Name for collection of components, interfaces, and capabilities that permits interfaces, and capabilities that permits Win32 subsystems to provide native Win32 subsystems to provide native support for well-behaved 16-bit support for well-behaved 16-bit Windows applicationsWindows applications
Win16 Concepts and Win16 Concepts and ApplicationsApplications
Figure 11-10: The Task Manager
Processes tab showing the wowexec environment
Win16-on-Win32 Win16-on-Win32 ComponentsComponents
Wowexec.exeWowexec.exe Wow32.dllWow32.dll Mmtask.tskMmtask.tsk Ntvdm.exe, ntvdm.dll, ntio.sys, and Ntvdm.exe, ntvdm.dll, ntio.sys, and
redir.exeredir.exe
Win16-on-Win32 Win16-on-Win32 ComponentsComponents
Vdmredir.dllVdmredir.dll Krnl386.exeKrnl386.exe Gdi.exeGdi.exe User.exeUser.exe
Memory SpaceMemory Space Separate and shared memorySeparate and shared memory
The “lose one, lose them all” effect of a single The “lose one, lose them all” effect of a single shared VDM explains why you might choose shared VDM explains why you might choose to run Win16 applications in separate VDMsto run Win16 applications in separate VDMs
Disadvantages of running Win16 applications Disadvantages of running Win16 applications in separate memory spaces hinge on memory in separate memory spaces hinge on memory usage and interprocess communicationsusage and interprocess communications
Message queuesMessage queues All Win16 applications running in a single All Win16 applications running in a single
process share a message queueprocess share a message queue
Memory SpaceMemory Space ThreadsThreads
All application threads within a WOW All application threads within a WOW VDM are cooperatively multitaskedVDM are cooperatively multitasked
Using only well-behaved DOS and Using only well-behaved DOS and Win16 applicationsWin16 applications In Windows XP terminology, any In Windows XP terminology, any
application that attempts direct access application that attempts direct access to hardware is called “ill-behaved”to hardware is called “ill-behaved” Such applications will not run in a VDMSuch applications will not run in a VDM
Program Compatibility Program Compatibility WizardWizard
Figure 11-11: The Program Compatibility Wizard starts with a welcome screen, then guides you through automated compatibility checks
Program Compatibility Program Compatibility WizardWizard
Figure 11-12: Compatibility mode settings are selected from a specific list of available options
Program Compatibility Program Compatibility WizardWizard
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 Assigning and Publishing Applications on Windows Applications on Windows
XP ProfessionalXP Professional PackagePackage File that contains instructions for the File that contains instructions for the
Windows InstallerWindows Installer TransformTransform
Specific type of Microsoft Installer file Specific type of Microsoft Installer file that usually ends in .mstthat usually ends in .mst
Resolving DLL Conflicts Resolving DLL Conflicts in Windows XPin Windows XP
Windows XP includes a remarkable new Windows XP includes a remarkable new technology called Windows Side by Side technology called Windows Side by Side (WinSxS) isolation support(WinSxS) isolation support
By default, Windows checks DLLs and By default, Windows checks DLLs and other common code components before other common code components before installing them on a computerinstalling them on a computer If it finds potential conflicts, it automatically If it finds potential conflicts, it automatically
makes the Registry modifications necessary to makes the Registry modifications necessary to point to alternate versions of DLLs and other point to alternate versions of DLLs and other shared objects in a special directory named shared objects in a special directory named %systemroot%\WINDOWS\WinSxS%systemroot%\WINDOWS\WinSxS
Chapter SummaryChapter Summary Windows XP Professional is divided into three Windows XP Professional is divided into three
main parts:main parts: Environment subsystemsEnvironment subsystems Executive ServicesExecutive Services User applicationsUser applications
In addition to the basic Win32 Subsystem, In addition to the basic Win32 Subsystem, two special-purpose operating environments two special-purpose operating environments (VDM and WOW) also run within that (VDM and WOW) also run within that subsystem to provide backward compatibility subsystem to provide backward compatibility for DOS and Win16 applicationsfor DOS and Win16 applications
Chapter SummaryChapter Summary Of these subsystems, only Win32 is Of these subsystems, only Win32 is
crucial to the functioning of crucial to the functioning of Windows XP as a wholeWindows XP as a whole
The other subsystems start up only The other subsystems start up only as they are neededas they are needed
Windows XP includes some Windows XP includes some interesting additional application interesting additional application management facilitiesmanagement facilities