Page 312 - DCAP403_Operating System
P. 312

Unit 14: Windows 2000




          the application’s executable code. The memory manager returns a status to Win32 that tells what   Notes
          kind of executable the code is. If it is not a nativeWin32 executable, theWin32 environment checks
          whether the appropriate environmental subsystem is running; if the subsystem is not running,
          it is started as a user-mode process. Then, Win32 creates a process to run the application, and
          passes control to the environmental subsystem.
          The environmental subsystem uses the Windows 2000 LPC facility to get kernel services for the
          process. This approach helps Windows 2000 to be robust, because the parameters passed to a
          system call can be checked for correctness before the actual kernel routine is invoked. Windows
          2000 prohibits applications from mixing API routines from different environments. For instance,
          a Win32 application cannot call a POSIX routine.
          Since each subsystem is run as a separate user-mode process, a crash in one has no effect on the
          others. The exception is Win32, which provides all the keyboard, mouse, and graphical display
          capabilities. If it fails, the system is effectively disabled.
          The Win32 environment categorizes applications as either graphical or character based, where
          a character-based application is one that thinks that interactive output goes to an 80 by 24
          ASCII display. Win32 transforms the output of a character-based application to a graphical
          representation in a window. This transformation is easy: Whenever an output routine is
          called, the environmental subsystem calls a Win32 routine to display the text. Since the Win32
          environment performs this function for all character-based windows, it can transfer screen text
          between windows via the clipboard. This transformation works for MS-DOS applications, as well
          as for POSIX command-line applications.

          MS-DOS Environment

          The MS-DOS environment does not have the complexity of the other Windows 2000 environmental
          subsystems. It is provided by a Win32 application called the virtual DOS machine (VDM). Since
          the VDM is just a user-mode process, it is paged and dispatched like any other Windows 2000
          thread. The VDM has an instruction-execution unit to execute or emulate Intel 486 instructions.
          The VDM also provides routines to emulate the MS-DOS ROM BIOS and .int  software interrupt
          services, and has virtual device drivers for the screen, keyboard, and communication ports. The
          VDM is based on the MS-DOS 5.0 source code; it gives the application at least 620 kilobytes of
          memory.
          The Windows 2000 command shell is a program that creates a window that looks like an MS-DOS
          environment. It can run both 16-bit and 32-bit executables. When an MS-DOS application is run,
          the command shell starts a VDM process to execute the program. If Windows 2000 is running
          on an x86 processor, MS-DOS graphical applications run in full-screen mode, and character
          applications can run full screen or in a window. If Windows 2000 is running on different processor
          architecture, all MS-DOS applications run in windows. Some MS-DOS applications access the
          disk hardware directly, but they fail to run on Windows 2000 because disk access is privileged to

          protect the file system. In general, MS-DOS applications that directly access hardware will fail to
          operate under Windows 2000.
          Since MS-DOS is not a multitasking environment, some applications have been written that hog
          the CPU-for instance, by using busy loops to cause time delays or pauses in execution. The priority
          mechanism in the Windows 2000 dispatcher detects such delays and automatically throttles the
          CPU consumption (and causes the offending application to operate incorrectly).
          16-Bit Windows Environment

          The Win16 execution environment is provided by a VDM that incorporates additional software
          called Windows on Windows that provides the Windows 3.1 kernel routines and stub routines for
          window manager and GDI functions. The stub routines call the appropriate Win32 subroutines,




                                           LOVELY PROFESSIONAL UNIVERSITY                                   305
   307   308   309   310   311   312   313   314   315   316   317