Windows IT Pro
Windows IT Library
  - Advertise        
Windows IT Pro Logo

  Home  |   Books  |   Chapters  |   Topics  |   Authors  |   Book Reviews  |   Whitepapers  |   About Us  |   Contact Us  |   ITTV  |   IT Jobs

search for  on    power search   help
 






Managing Memory and Disks
View the book table of contents
Author: Sean Daily
Published: February 1997
Copyright: 1997
Publisher: 29th Street Press
 


Running 16-bit Applications In Separate Subsystems
To provide better stability and isolation for 16-bit Windows 3.x applications, Windows NT gives you the option of running these applications in their own separate memory space. When you select this option, Windows NT creates a separate VDM and WOW application environment that is physically isolated from any other WOW environments currently active on the system.

To force a Windows 3.x application to run in a separate, protected memory space, follow these steps:
  1. Locate and right-click the shortcut icon you will use to launch the application.
  2. From the context-sensitive menu appearing next to the icon, choose Properties.
  3. In the application’s Properties window, choose the Shortcut tab, shown in Figure 6.2.
  4. Check the Run in Separate Memory Space box. In the future, when you start the application using this shortcut, it will run in a separate memory space.
Caution: Setting a shortcut to run an application in a separate memory space affects only that shortcut, not the application itself or any other shortcuts. To guarantee that the program is always run in the desired manner, configure other icons used to launch the program (including any located in the Startup group/folder) to run with the separate memory space option.

Using the separate memory space feature for a Win16 application has advantages and disadvantages. The major advantages are stability and isolation. The application has its own private VDM and WOW environment, it has maximum available resources, and it is protected from other Windows 3.x applications (they are also protected from it). However, the application can still communicate with other Windows applications running in other subsystems using standard Windows communication features such as dynamic data exchange (DDE) and object linking and embedding (OLE).

Problems and Answers: I thought NT prevented programs from crashing each other! I have a Windows 3.x application that keeps crashing other Windows 3.x programs. What can I do to stop this from happening?

By default, Windows NT runs all Win16 (Windows 3.x-compatible) applications in a shared memory space for maximum compatibility and minimum memory usage. If you have problems with particular Windows 3.x applications crashing, isolate those programs by editing their shortcut properties and selecting the Run in Separate Memory Space option in the Shortcut tab.

The main disadvantage to running applications in their own separate memory spaces is that it uses more system memory. Each Win16 application run in a separate memory space has significant overhead: a separate and complete VDM is launched and complete copies of all DOS and Windows environmental settings and support files are placed into memory. If many different Win16 applications are run this way simultaneously, the overhead quickly drains the amount of free RAM on your system. Unless you have an abundance of RAM, be selective when choosing Win16 applications to run in this manner.

Tip: Run any 16-bit applications that are prone to crashing or that consume large amounts of system resources in their own separate memory space; the effect they have on other applications will be minimized.

Multitasking 32-Bit Windows Programs
In Windows NT 4.0, multitasking 32-bit Windows (Win32) applications is much more straightforward than multitasking 16-bit applications. Win32 applications communicate directly with the Win32 subsystem, requiring no translation of 16- to 32-bit instructions (i.e., “thunking”) or VDMs. Win32 applications are the fastest and most efficient applications you can run in Windows NT. This seamless multitasking is augmented by special features of the Win32 API (which the Win32 subsystem supports), such as the multithreading that makes multitasking even more efficient.

Unlike DOS and Win16 applications, Win32 applications do not have any memory or multitasking-related options to configure. When editing the properties of a Win32 application shortcut, you may notice that the Run in Separate Memory Space option is grayed out and unavailable. Every 32-bit Windows application you launch in Windows NT is automatically run in its own protected memory space. Each program is, therefore, automatically isolated from other 32-bit Windows applications and applications in other environmental subsystems.

Multitasking POSIX and OS/2 Applications
As noted in Chapter 1, Windows NT provides support for POSIX1 and OS/2 1.x character-mode applications in addition to support for Win32, Win16, and MS-DOS applications. This support is implemented in Windows NT via two separate environmental subsystems: the POSIX and OS/2 subsystems, respectively. These subsystems emulate a native environment for these applications within Windows NT 4.0.

As with the Win32 environment subsystem, the POSIX and OS/2 subsystems and individual POSIX and OS/2 applications run in their own protected address spaces, which protects them from any other applications that might be running on Windows NT. These applications communicate with their respective subsystems through a message-passing mechanism in the Windows NT Executive known as a Local Procedure Call (LPC) facility. All POSIX and OS/2 applications are preemptively multitasked in respect to each other as well as to other applications running on the system.

Finally, Windows NT also provides support for OS/2 multithreading applications. Every thread created by an OS/2 application is implemented with a Windows NT thread inside the same process, and these threads receive the thread priority and ID that are relevant in OS/2. The Windows NT Kernel Dispatcher handles the scheduling of OS/2 application threads as it does with normal threads, but maps the OS/2 priority levels numbering of 0–63 to Windows NT priority levels 0–15 (because they are part of normal user applications, OS/2 threads never receive NT’s higher, realtime priority thread levels of 16–31).


MANAGING DISKS WITH DISK ADMINISTRATOR

Properly managing mass storage devices such as hard disks and CD-ROM drives is critical to the efficient operation of your system. If you have used a DOS-based operating system (or even OS/2), you are probably familiar with the Fdisk and Format commands used for hard disk and hard disk partition management. In Windows NT, hard disks and other high-capacity storage devices are managed with the Windows NT Disk Administrator utility. This program is a graphical utility (as opposed to the character-based Fdisk and Format utilities) that lets you view and make changes to the various drive and partition configurations on your Windows NT computer.

During installation, Windows NT Setup asked you to select a target hard disk partition for your NT installation. If you installed Windows NT on a new hard disk, you probably created and formatted a partition for the installation files. Now that installation is complete, you need the Disk Administrator to manage your system’s disk drives.

The Disk Administrator utility is located in the Start Menu/Programs/Administrative Tools submenu and is shown in Figure 6.3.

Special Note: Only members of the Administrators local group can run the Disk Administrator utility.

The Disk Administrator main window displays a variety of information about your disk configuration, including graphical depictions of available mass storage devices on your computer. Hard disk drives, CD-ROM drives, and other removable mass-storage devices including removable hard disks and optical or magneto-optical (M-O) drives are shown. The default view (called the Disk Configuration View) represents each drive as a rectangular box, and each box can be divided into one or more sections. Each section represents an individual partition or area of free space on that drive. Hard disks and similar devices are labeled as “Disk 0” and “Disk 1,” and CD-ROM drives are labeled starting with “CD-ROM 0.”

In addition, each individual partition section has a color or pattern at the top indicating its partition type. Table 6.2 describes what each color represents.

Special Note: You may have heard that Windows NT supports a feature called RAID (Redundant Array of Inexpensive Disks) for disk fault tolerance and data redundancy. The two fault tolerance levels supported by Windows NT, mirror sets (RAID 1) and stripe sets with parity (RAID 5), can only be created by a computer running Windows NT Server. Windows NT Workstation supports only disk striping (RAID 0), which provides performance benefits but no fault tolerance.

You can customize these color schemes using the Colors and Patterns option found in the Options menu. If this menu is not shown in the Disk Administrator window, you can display it by choosing the Disk Configuration option from the View menu or by pressing Ctrl-D.

An alternative view of the drive display window, called the Volumes View, is available if you choose the Volumes option in the View menu or press Ctrl-V. In this view, each system drive is represented by a small icon; the display offers information and various statistics about the drive, including the drive label, the total drive capacity, the free capacity in megabytes, and, as a percentage of the total drive, the drive’s file system type, as well as fault-tolerance information (e.g., whether the drive is part of a fault-tolerance configuration, what type of volume it is, what the fault-tolerance overhead is, etc.). This view is handy for obtaining “snapshot” views of your system’s various drives. The Volumes View is shown in Figure 6.4.

Partitions, Volumes, and Drives
Before using Disk Administrator to manage your system drives and partitions, you should understand the terminology used in Windows NT for referring to different types of system partitions. The following sections define the most commonly used terms.

Primary and Extended Partitions
In Windows NT-speak, a partition is a structural division of a disk. A single disk can have more than one partition. There are two major types of partitions, primary and extended.

A primary partition is the only type of partition that can contain an operating system. The system partition (see the following description) of your Windows NT computer must, therefore, be a primary disk partition. One drive can have up to four primary partitions, each assigned one drive letter (e.g., C:, D:).

An extended partition is a special partition that can be subdivided into one or more logical drives. Each logical drive is assigned its own letter. A drive can only have one extended partition (and optionally one or more primary partitions too), but the extended partition can contain any number of logical drives.

System Partition
Any partition that contains an operating system is a system partition. In Windows NT, the system partition is the partition that contains the hardware-specific files needed to boot Windows NT, including the NT Boot Manager (usually this is the system’s drive C:). The system partition may or may not be the partition that contains the Windows NT 4.0 installation directory (see the following Boot Partition section).

On Intel x86-based computers, the system partition can be formatted with either the file allocation table (FAT) system or the NT File System (NTFS). However, on RISC-based systems, the system partition must be formatted with the FAT file system (subsequent partitions, including the boot partition, may be formatted using either file system). Because FAT partitions do not have NTFS’s security capabilities, Windows NT provides a special feature for RISC-based systems in the Disk Administrator that can be used to secure the system partition. This option can secure the FAT-based system partition so that only system administrators have access to it.

To secure the FAT-based system partition on a RISC computer, follow these steps:
  1. From the Disk Administrator’s Partition menu, choose Secure System Partition.
  2. Windows NT will ask you to confirm the request.
Special Note: When the option that secures the FAT-based system from all but system administrators is in effect, a check mark appears next to the Secure System Partition command in the Partition menu.
  1. After you have confirmed your choice, Disk Administrator informs you that it must restart the computer to activate security on the system partition.


Page: 1, 2, 3, 4, 5, 6, 7, 8

next page



Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro Windows Dev Pro IT Job Hound ITTV
IT Library Technology Resource Directory Connected Home Windows Excavator Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 Copyright © 2009 Penton Media, Inc., All rights reserved. Terms and Use | Privacy Statement | Reprints and Licensing