cmsc421 chapter 22 operating system concepts windows xp

62
CMSC421 CMSC421 Chapter 22 Chapter 22 Operating System Concepts Operating System Concepts Windows XP Windows XP

Upload: garey-walsh

Post on 24-Dec-2015

223 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: CMSC421 Chapter 22 Operating System Concepts Windows XP

CMSC421CMSC421

Chapter 22Chapter 22

Operating System ConceptsOperating System Concepts

Windows XPWindows XP

Page 2: CMSC421 Chapter 22 Operating System Concepts Windows XP

Windows XPWindows XP

Windows XP operating system is a Windows XP operating system is a 32/64-bit preemptive multitasking 32/64-bit preemptive multitasking operating system for AMD K6/K7, operating system for AMD K6/K7, Intel IA32/IA64 and later Intel IA32/IA64 and later microprocessors. It is the microprocessors. It is the successor to Windows NT/2000 and successor to Windows NT/2000 and the replacement for Windows the replacement for Windows 95/98.95/98.

Page 3: CMSC421 Chapter 22 Operating System Concepts Windows XP

HistoryHistory

Many features are from NT/2000.Many features are from NT/2000. Uses a client-server architecture Uses a client-server architecture

(like Mach) to implement multiple (like Mach) to implement multiple operating system personalities, operating system personalities, such as Win32 and POSIX.such as Win32 and POSIX.

Comes in two versions, Personal Comes in two versions, Personal and Professional.and Professional.

Page 4: CMSC421 Chapter 22 Operating System Concepts Windows XP

Design PrinciplesDesign Principles

SecuritySecurity ReliabilityReliability Windows and POSIX Application Windows and POSIX Application

CompatibilityCompatibility High PerformanceHigh Performance ExtensibilityExtensibility PortabilityPortability International SupportInternational Support

Page 5: CMSC421 Chapter 22 Operating System Concepts Windows XP

SecuritySecurity

Adherence to the design standards Adherence to the design standards to receive U.S. Government C-2 to receive U.S. Government C-2 security designation.security designation.

Extensive code review and testing, Extensive code review and testing, plus use of sophisticated automatic plus use of sophisticated automatic analysis tools to investigate analysis tools to investigate potential defects that might potential defects that might represent security vulnerabilities.represent security vulnerabilities.

Page 6: CMSC421 Chapter 22 Operating System Concepts Windows XP

ReliabilityReliability

Used extensive manual and Used extensive manual and automatic code review to identify automatic code review to identify over 63,000 lines in the source files over 63,000 lines in the source files that might contain issues not that might contain issues not detected by testing.detected by testing.

Extends driver verification to catch Extends driver verification to catch more subtle bugs, improves the more subtle bugs, improves the facilities for catching programming facilities for catching programming errors in user-level code,.errors in user-level code,.

Page 7: CMSC421 Chapter 22 Operating System Concepts Windows XP

Reliability -- IIReliability -- II

Subjects third party applications, Subjects third party applications, drivers and devices to a rigorous drivers and devices to a rigorous certification process.certification process.

New facilities for monitoring the New facilities for monitoring the health of the PC including health of the PC including downloading fixes for problems downloading fixes for problems before they are encountered by before they are encountered by the users.the users.

Page 8: CMSC421 Chapter 22 Operating System Concepts Windows XP

Windows/ POSIX Windows/ POSIX Application CompatibilityApplication Compatibility

Application compatibility is difficult to Application compatibility is difficult to achieve because each application checks achieve because each application checks for a particular version of Windows, may for a particular version of Windows, may have dependence on the quirks of the have dependence on the quirks of the implementation of APIs.implementation of APIs.

XP introduces a compatibility layer that XP introduces a compatibility layer that falls between applications and the Win32 falls between applications and the Win32 API. This layer makes XP look “bug-for-API. This layer makes XP look “bug-for-bug” compatible with previous versions of bug” compatible with previous versions of Windows.Windows.

Page 9: CMSC421 Chapter 22 Operating System Concepts Windows XP

Windows/ POSIX Windows/ POSIX Application Compatibility Application Compatibility

-- II-- II

Maintains support for running Maintains support for running many 16-bit applications using a many 16-bit applications using a “thunking layer” that translates “thunking layer” that translates 16-bit API calls into equivalent 32-16-bit API calls into equivalent 32-bit calls.bit calls.

64-bit version provides a thunking 64-bit version provides a thunking layer that translates 32-bit API layer that translates 32-bit API calls into native 64-bit calls.calls into native 64-bit calls.

Page 10: CMSC421 Chapter 22 Operating System Concepts Windows XP

Windows/ POSIX Windows/ POSIX Application Compatibility Application Compatibility

-- III-- III

POSIX support is a POSIX POSIX support is a POSIX subsystem called Interix.subsystem called Interix.

Most available UNIX-compatible Most available UNIX-compatible software compiles and runs under software compiles and runs under Interix without modification.Interix without modification.

Page 11: CMSC421 Chapter 22 Operating System Concepts Windows XP

High PerformanceHigh Performance

Desktop systems are largely Desktop systems are largely constrained by I/O performance.constrained by I/O performance.

Servers, and large multi-threaded Servers, and large multi-threaded and multi-processor environments and multi-processor environments are often constrained by CPU. are often constrained by CPU. Locking and cache-line Locking and cache-line management are key to scalability.management are key to scalability.

Page 12: CMSC421 Chapter 22 Operating System Concepts Windows XP

High Performance High Performance TechniquesTechniques

Asynchronous I/oAsynchronous I/o Optimized protocols for networksOptimized protocols for networks Kernel-based graphicsKernel-based graphics Sophisticated caching of file-system data.Sophisticated caching of file-system data. Memory managementMemory management Synchronization algorithmsSynchronization algorithms Reducing code-path length in critical Reducing code-path length in critical

functions.functions.

Page 13: CMSC421 Chapter 22 Operating System Concepts Windows XP

High Performance High Performance Techniques -- IITechniques -- II

Using better algorithms and per-Using better algorithms and per-processor data structures.processor data structures.

Implementing more scalable locking Implementing more scalable locking protocols.protocols.

Except while executing in the kernel Except while executing in the kernel dispatcher, threads in the dispatcher, threads in the subsystems of Windows XP can be subsystems of Windows XP can be preempted by higher-priority threads.preempted by higher-priority threads.

Page 14: CMSC421 Chapter 22 Operating System Concepts Windows XP

ExtensibilityExtensibility

Used a layered architecture.Used a layered architecture. Uses environmental subsystems to Uses environmental subsystems to

emulate different operating emulate different operating systems (DOS, Windows, POSIX).systems (DOS, Windows, POSIX).

Uses loadable drivers in the I/O Uses loadable drivers in the I/O system.system.

Uses RPCs for distributed Uses RPCs for distributed processing.processing.

Page 15: CMSC421 Chapter 22 Operating System Concepts Windows XP

PortabilityPortability

Can be moved from one hardware Can be moved from one hardware architecture to another with architecture to another with relatively few changes.relatively few changes.

Majority of the system is written in Majority of the system is written in C and C++.C and C++.

Processor-dependent code is Processor-dependent code is isolated in DLL called hardware-isolated in DLL called hardware-abstraction layer (HAL).abstraction layer (HAL).

Page 16: CMSC421 Chapter 22 Operating System Concepts Windows XP

Portability -- IIPortability -- II

Only shipped on IA32 compatible Only shipped on IA32 compatible platforms, it was also tested on platforms, it was also tested on DEC Alpha.DEC Alpha.

““Maintaining portability is a matter Maintaining portability is a matter of of use it or loss it.”use it or loss it.”

Page 17: CMSC421 Chapter 22 Operating System Concepts Windows XP

International SupportInternational Support

Uses National Language Support API.Uses National Language Support API. Uses UNICODE as the native language Uses UNICODE as the native language

character code.character code. ASCII is converted to UNICODE.ASCII is converted to UNICODE. System text strings are kept in resource System text strings are kept in resource

files that can be replaced to localize the files that can be replaced to localize the system for different languages.system for different languages.

Multiple locales can be used Multiple locales can be used concurrently.concurrently.

Page 18: CMSC421 Chapter 22 Operating System Concepts Windows XP

System ComponentsSystem Components

Hardware-Abstraction LayerHardware-Abstraction Layer KernelKernel ExecutiveExecutive

Page 19: CMSC421 Chapter 22 Operating System Concepts Windows XP

Windows XP block diagram

executive

Logon process

Security subsystem

Authentication package

Security account manager database

OS/2 applications

OS/2 subsystem

Win16 applications

Win16 VDM

Win32 applications

MSDOS applications

Win32 subsystem

POSIX subsystem

POSIX applications

MSDOS VDM

I/O manager

File system

Cache manager

Device drivers

Network drivers

Object manager

Security reference monitor

Process manager

kernel

Graphic device drivers

Local procedure

call facility

Virtual memory manager

Plug and play

managerWindow manager

Hardware abstraction layer

Hardware

Page 20: CMSC421 Chapter 22 Operating System Concepts Windows XP

Hardware Abstraction Hardware Abstraction LayerLayer

HAL is the layer of software that hides HAL is the layer of software that hides hardware differences from upper levels hardware differences from upper levels of the operating system.of the operating system.

HAL exports a virtual-machine HAL exports a virtual-machine interface that is used by the kernel interface that is used by the kernel dispatcher, the executive, and the dispatcher, the executive, and the device drivers.device drivers.

Only a single version of each device Only a single version of each device driver is required.driver is required.

Page 21: CMSC421 Chapter 22 Operating System Concepts Windows XP

KernelKernel

Kernel DispatcherKernel Dispatcher Threads and SchedulingThreads and Scheduling Implementation of Synchronization Implementation of Synchronization

PrimitivesPrimitives Software Interrupt: Async Proc CallsSoftware Interrupt: Async Proc Calls Software Interrupt: Deferred Proc Software Interrupt: Deferred Proc

CallsCalls Exceptions and InterruptsExceptions and Interrupts

Page 22: CMSC421 Chapter 22 Operating System Concepts Windows XP

Kernel -- IIKernel -- II

Is object orientedIs object oriented An An object typeobject type is a system defined data is a system defined data

type with a set of attributes and a set of type with a set of attributes and a set of methods.methods.

An An objectobject is an instance of an object type. is an instance of an object type. The kernel performs its job by using a set The kernel performs its job by using a set

of kernel objects whose attributes shore of kernel objects whose attributes shore the kernel data, and whose methods the kernel data, and whose methods perform the kernel activities.perform the kernel activities.

Page 23: CMSC421 Chapter 22 Operating System Concepts Windows XP

Kernel DispatcherKernel Dispatcher

Provides the foundation for the Provides the foundation for the executive and subsystemsexecutive and subsystems

Most is never paged outMost is never paged out Can not be preemptedCan not be preempted

Page 24: CMSC421 Chapter 22 Operating System Concepts Windows XP

Kernel Dispatcher Kernel Dispatcher ResponsibilitiesResponsibilities

Thread schedulingThread scheduling Implementation of synch primitivesImplementation of synch primitives Timer managementTimer management Software interruptsSoftware interrupts Exception dispatchingException dispatching

Page 25: CMSC421 Chapter 22 Operating System Concepts Windows XP

Threads and SchedulingThreads and Scheduling

Uses processes and threads for Uses processes and threads for executable code.executable code.

Process has a virtual memory Process has a virtual memory address space and information to address space and information to initialize each thread.initialize each thread.

Each thread is an executable unit Each thread is an executable unit dispatched by the kernel.dispatched by the kernel.

Page 26: CMSC421 Chapter 22 Operating System Concepts Windows XP

Thread statesThread states

ReadyReady StandbyStandby runningrunning waitingwaiting transitiontransition terminatedterminated

Page 27: CMSC421 Chapter 22 Operating System Concepts Windows XP

Priority schemePriority scheme

32-level scheme32-level scheme Variable class (0 - 15)Variable class (0 - 15) Real-time class (16 - 31)Real-time class (16 - 31) Uses a queue for each priorityUses a queue for each priority

Page 28: CMSC421 Chapter 22 Operating System Concepts Windows XP

Implementation of Implementation of Synchronization PrimitivesSynchronization Primitives

Dispatcher objects control dispatching and Dispatcher objects control dispatching and synchronizationsynchronization

Event objects record an event occurrenceEvent objects record an event occurrence Mutant provides mutexMutant provides mutex Semaphore object acts as a counter or a Semaphore object acts as a counter or a

gategate Thread object is the entity that is scheduledThread object is the entity that is scheduled Timer objects keep track of timeTimer objects keep track of time

Page 29: CMSC421 Chapter 22 Operating System Concepts Windows XP

Asynchronous Procedure Asynchronous Procedure CallCall

Break into an executing thread and call Break into an executing thread and call procedure.procedure.

APCs are used to begin execution of a APCs are used to begin execution of a new thread, terminate processes, and new thread, terminate processes, and deliver notification that an asynch I/O deliver notification that an asynch I/O has completed.has completed.

Queued to a specific threadQueued to a specific thread Allow the system to execute both system Allow the system to execute both system

and user code within a process’ contextand user code within a process’ context

Page 30: CMSC421 Chapter 22 Operating System Concepts Windows XP

Deferred Procedure CallDeferred Procedure Call

DPCs are used to postpone DPCs are used to postpone interrupt processing.interrupt processing.

Process timer expirationsProcess timer expirations Preempt thread execution at end Preempt thread execution at end

of scheduling quantumof scheduling quantum

Page 31: CMSC421 Chapter 22 Operating System Concepts Windows XP

Exceptions and InterruptsExceptions and Interrupts

Architecture-independent exceptionsArchitecture-independent exceptions• memory-access violationmemory-access violation• integer and floating point divide by zerointeger and floating point divide by zero• overflow or underflowoverflow or underflow• illegal instructionillegal instruction• data misalignmentdata misalignment• privileged instructionprivileged instruction• page read error, etcpage read error, etc

Page 32: CMSC421 Chapter 22 Operating System Concepts Windows XP

ExceptionsExceptions

Trap handlers deal with simple Trap handlers deal with simple exceptionsexceptions

More elaborate handling is performed More elaborate handling is performed by the kernel’s exception dispatcher.by the kernel’s exception dispatcher.

If no handler is found, a system error If no handler is found, a system error occurs and results in a “blue screen of occurs and results in a “blue screen of death”death”

Exception handing is more complex for Exception handing is more complex for user-mode processesuser-mode processes

Page 33: CMSC421 Chapter 22 Operating System Concepts Windows XP

Exceptions -- IIExceptions -- II

The interrupt dispatcher in the The interrupt dispatcher in the kernel handles interrupts by calling kernel handles interrupts by calling an Interrupt Service Routine (ISR) an Interrupt Service Routine (ISR) supplied by a device driver or a supplied by a device driver or a kernel trap handler routine.kernel trap handler routine.

For portability, the interrupt For portability, the interrupt dispatcher maps hardware dispatcher maps hardware interrupts into a standard set.interrupts into a standard set.

Page 34: CMSC421 Chapter 22 Operating System Concepts Windows XP

ExecutiveExecutive

Provides a set of services that all Provides a set of services that all environmental subsystems use:environmental subsystems use:• Object managerObject manager• Virtual memory managerVirtual memory manager• Process managerProcess manager• Local procedure call facilityLocal procedure call facility• I/O managerI/O manager• Security reference monitorSecurity reference monitor• Plug-and-play and security managersPlug-and-play and security managers• registryregistry• bootingbooting

Page 35: CMSC421 Chapter 22 Operating System Concepts Windows XP

Object ManagerObject Manager

A generic set of interfaces for managing A generic set of interfaces for managing the kernel-mode entities that is the kernel-mode entities that is manipulated by user-mode programs.manipulated by user-mode programs.

Examples:Examples:• semaphoressemaphores• mutexesmutexes• eventsevents• processesprocesses• threadsthreads

Page 36: CMSC421 Chapter 22 Operating System Concepts Windows XP

HandlesHandles

Each process has an object table that Each process has an object table that track the objects used by the processtrack the objects used by the process

User-mode code accesses these objects User-mode code accesses these objects using an opaque value called a handle using an opaque value called a handle that is returned by many APIs.that is returned by many APIs.

Object handles can be created by Object handles can be created by duplicating an existing handle, either duplicating an existing handle, either from either the same or different from either the same or different process.process.

Page 37: CMSC421 Chapter 22 Operating System Concepts Windows XP

Virtual FunctionsVirtual Functions

Objects are manipulated by a set of Objects are manipulated by a set of virtual functions with virtual functions with implementations provided by each implementations provided by each object type:object type:• query - gets object’s namequery - gets object’s name• parse - search for an object given the parse - search for an object given the

object’s nameobject’s name• security - makes security checks on all security - makes security checks on all

object operations.object operations.

Page 38: CMSC421 Chapter 22 Operating System Concepts Windows XP

Virtual Memory ManagerVirtual Memory Manager

The design of the VM Manager The design of the VM Manager assumes that the underlying assumes that the underlying hardware supports virtual-to-hardware supports virtual-to-physical mapping, a paging physical mapping, a paging mechanism, transparent cache mechanism, transparent cache coherence on multiprocessor coherence on multiprocessor systems and allows multiple page-systems and allows multiple page-table entries to map to the same table entries to map to the same physical page frame.physical page frame.

Page 39: CMSC421 Chapter 22 Operating System Concepts Windows XP

Virtual Memory Manager -- Virtual Memory Manager -- IIII

On IA32 processors each process has a On IA32 processors each process has a 4GB virtual address space. 4GB virtual address space.

The upper 2GB are mostly identical for all The upper 2GB are mostly identical for all processes, and are used by Windows XP processes, and are used by Windows XP in kernel mode to access the operating in kernel mode to access the operating system code and data structures.system code and data structures.

Key areas that are not identical are page Key areas that are not identical are page table self-map, hyperspace and session table self-map, hyperspace and session space.space.

Page 40: CMSC421 Chapter 22 Operating System Concepts Windows XP

Page Table Self-mapPage Table Self-map

The hardware uses a process’s The hardware uses a process’s page tables using physical page-page tables using physical page-frame numbers.frame numbers.

The VM manager maps the page The VM manager maps the page tables into a single 4GB region in tables into a single 4GB region in the process’ address space so they the process’ address space so they are accessed through virtual are accessed through virtual addresses.addresses.

Page 41: CMSC421 Chapter 22 Operating System Concepts Windows XP

HyperspaceHyperspace

Hyperspace maps the current Hyperspace maps the current process’ working set information process’ working set information into the kernel-mode address.into the kernel-mode address.

Page 42: CMSC421 Chapter 22 Operating System Concepts Windows XP

Session SpaceSession Space

Session space is used to share the Session space is used to share the win32 and other session-specific win32 and other session-specific drivers between all the processes drivers between all the processes in the same terminal-server in the same terminal-server session rather than with all the session rather than with all the processes in the system.processes in the system.

Page 43: CMSC421 Chapter 22 Operating System Concepts Windows XP

Process ManagerProcess Manager

Provides services for creating, deleting, Provides services for creating, deleting, and using processes, threads, and jobs.and using processes, threads, and jobs.

It has no knowledge about parent-child It has no knowledge about parent-child relationships; left to environmental relationships; left to environmental subsystems.subsystems.

Processes contain one or more threads.Processes contain one or more threads. Processes can be collected together Processes can be collected together

into job objects.into job objects.

Page 44: CMSC421 Chapter 22 Operating System Concepts Windows XP

Process CreationProcess Creation

Once a new process is created, the Once a new process is created, the initial thread is created and an APC initial thread is created and an APC (Async Procedure Call) is delivered (Async Procedure Call) is delivered to the thread to prompt the start of to the thread to prompt the start of execution at the user-mode image execution at the user-mode image loader (ntdll.DLL).loader (ntdll.DLL).

Also supports a UNIX fork( ) style Also supports a UNIX fork( ) style of process creation.of process creation.

Page 45: CMSC421 Chapter 22 Operating System Concepts Windows XP

Local Procedure Call Local Procedure Call FacilityFacility

XP uses a client-server model.XP uses a client-server model. Environmental subsystems are Environmental subsystems are

servers that implement particular servers that implement particular operating system personalities.operating system personalities.

XP uses LPCs to pass requests and XP uses LPCs to pass requests and results (messages) between client results (messages) between client and server processes within a and server processes within a single machine.single machine.

Page 46: CMSC421 Chapter 22 Operating System Concepts Windows XP

I/O ManagerI/O Manager

Responsible for file-systems, device Responsible for file-systems, device drivers, and network drivers.drivers, and network drivers.

Works with VM to provide memory Works with VM to provide memory mapped I/O operations.mapped I/O operations.

Is fundamentally asynchronous.Is fundamentally asynchronous. Device drivers are written according Device drivers are written according

to the Windows Driver Model (WDM) to the Windows Driver Model (WDM) specification.specification.

Page 47: CMSC421 Chapter 22 Operating System Concepts Windows XP

WDMWDM

Because of the richness of the Because of the richness of the WDM, it can be an excessive WDM, it can be an excessive amount of work to write a full WDM amount of work to write a full WDM device driver for each new device driver for each new hardware device.hardware device.

Page 48: CMSC421 Chapter 22 Operating System Concepts Windows XP

Cache ManagerCache Manager

Centralized facility.Centralized facility. Works with file-system and VM Works with file-system and VM

mangers.mangers. Caching in XP is based on files Caching in XP is based on files

rather than raw blocks.rather than raw blocks. Size of the cache changes Size of the cache changes

dynamically.dynamically.

Page 49: CMSC421 Chapter 22 Operating System Concepts Windows XP

CacheCache

Cache is divided into blocks of Cache is divided into blocks of 256KB.256KB.

Each block can hold a memory-Each block can hold a memory-mapped region (view) of a file.mapped region (view) of a file.

Each cache block is described by a Each cache block is described by a virtual-address control block virtual-address control block (VACB) that stores the virtual (VACB) that stores the virtual address and file offset of the view.address and file offset of the view.

Page 50: CMSC421 Chapter 22 Operating System Concepts Windows XP

Security Reference Security Reference MonitorMonitor

Centralized management of Centralized management of system entities in the object system entities in the object manager enables the use of a manager enables the use of a uniform mechanism to perform uniform mechanism to perform run-time access validation and run-time access validation and audit checks for every user-audit checks for every user-accessible entity in the system.accessible entity in the system.

Page 51: CMSC421 Chapter 22 Operating System Concepts Windows XP

Security TokensSecurity Tokens

The SRM is responsible for The SRM is responsible for manipulating the privileges in security manipulating the privileges in security tokens.tokens.

Special privileges are required to Special privileges are required to perform back or restore operations, perform back or restore operations, overcome certain checks as an overcome certain checks as an administrator, debug processes, etc.administrator, debug processes, etc.

Restricted tokens used to restrict the Restricted tokens used to restrict the damage of untrusted code.damage of untrusted code.

Page 52: CMSC421 Chapter 22 Operating System Concepts Windows XP

LoggingLogging

The SRM is logging security audit The SRM is logging security audit events. A C2 rating requires the events. A C2 rating requires the ability to detect and log all ability to detect and log all unauthorized attempts to access unauthorized attempts to access system resources.system resources.

Page 53: CMSC421 Chapter 22 Operating System Concepts Windows XP

Plug-and-Play ManagersPlug-and-Play Managers

Recognizes and adapts to changes in Recognizes and adapts to changes in the hardware configuration.the hardware configuration.

For PnP to work, both the device and For PnP to work, both the device and driver must support the PnP standard.driver must support the PnP standard.

Must be able to change the interrupts Must be able to change the interrupts dynamically.dynamically.

Must support dynamically Must support dynamically configurable resources.configurable resources.

Page 54: CMSC421 Chapter 22 Operating System Concepts Windows XP

RegistryRegistry

Configuration information is stored Configuration information is stored in an internal database -- the in an internal database -- the registry.registry.

Entries (hives) are for system Entries (hives) are for system information, default user information, default user preferences, software installation, preferences, software installation, and security.and security.

Used to boot the system.Used to boot the system.

Page 55: CMSC421 Chapter 22 Operating System Concepts Windows XP

BootingBooting

SequenceSequence• power onpower on• BIOS begins executingBIOS begins executing• boot loader (NTLDR)boot loader (NTLDR)• determines boot devicedetermines boot device• loads Hardware-Abstraction Libraryloads Hardware-Abstraction Library• loads kernel and system hiveloads kernel and system hive• loads driversloads drivers

Page 56: CMSC421 Chapter 22 Operating System Concepts Windows XP

Booting -- IIBooting -- II

• Begins kernel executionBegins kernel execution• Creates 2 threadsCreates 2 threads

– system process for all internal worker system process for all internal worker threadsthreads

– user-mode SMSS (similar to UNIX init user-mode SMSS (similar to UNIX init process)process)

• finishes initializationfinishes initialization• creates WINLOGONcreates WINLOGON• creates CSRSS (Win32 subsystem)creates CSRSS (Win32 subsystem)

Page 57: CMSC421 Chapter 22 Operating System Concepts Windows XP

Environmental SubsystemEnvironmental Subsystem

Is user-mode processes layered Is user-mode processes layered over the native windows XP exec over the native windows XP exec servers to run programs developed servers to run programs developed for other Oss (16-bit Windows, for other Oss (16-bit Windows, DOS, and POSIX).DOS, and POSIX).

Win32 calls the VM manager to Win32 calls the VM manager to load the executable code and load the executable code and return what type the application is.return what type the application is.

Page 58: CMSC421 Chapter 22 Operating System Concepts Windows XP

Environmental Subsystem Environmental Subsystem - II- II

Uses LPC subsystem to provide OS Uses LPC subsystem to provide OS services to client processes.services to client processes.

Since each subsystem is run as a Since each subsystem is run as a separate user-mode process, a crash in separate user-mode process, a crash in one has no effect on other processes. one has no effect on other processes. The exception is in Win32, which The exception is in Win32, which provides all keyboard, mouse, and provides all keyboard, mouse, and graphical display capabilities -- If it graphical display capabilities -- If it fails, the system requires a reboot.fails, the system requires a reboot.

Page 59: CMSC421 Chapter 22 Operating System Concepts Windows XP

MS-DOS EnvironmentMS-DOS Environment

Virtual DOS Machine emulates Intel Virtual DOS Machine emulates Intel 486 instructions, emulates MS-DOS 486 instructions, emulates MS-DOS ROM DIOS and INT 21h software ROM DIOS and INT 21h software interrupt services and has virtual interrupt services and has virtual device drivers for the screen, device drivers for the screen, keyboard, and communication ports.keyboard, and communication ports.

Some MSDOS programs fail because Some MSDOS programs fail because they require access to the disk they require access to the disk hardware directly.hardware directly.

Page 60: CMSC421 Chapter 22 Operating System Concepts Windows XP

16-Bit Windows 16-Bit Windows EnvironmentEnvironment

VDM has Windows on Windows VDM has Windows on Windows (WOW32) for Windows 3.1 software (WOW32) for Windows 3.1 software and emulates the kernel routines.and emulates the kernel routines.

Applications that rely on the Applications that rely on the internal structure of the 16-bit internal structure of the 16-bit window manager may not work.window manager may not work.

Only one Win16 application can run Only one Win16 application can run at a time.at a time.

Page 61: CMSC421 Chapter 22 Operating System Concepts Windows XP

32-Bit Windows Env. On 32-Bit Windows Env. On IA64IA64

Requires a “thunking” layer to Requires a “thunking” layer to translate 32-bit Win32 calles into translate 32-bit Win32 calles into the corresponding 64-bit calls.the corresponding 64-bit calls.

The implementation of 32-bit and The implementation of 32-bit and 64-bit windows are essential the 64-bit windows are essential the same, IA64 provides direction same, IA64 provides direction execution of IA32 instructions.-- execution of IA32 instructions.-- higher level of compatibility.higher level of compatibility.

Page 62: CMSC421 Chapter 22 Operating System Concepts Windows XP