Previous section   Next section

STORED AND VIRTUAL MEMORY

Stored memory is the storage of data bits on devices such as a hard drive. Its management is predicated on the type of file system being used. The role and dynamics of storage for Windows Servers vary radically among the native NT File System (NTFS), the file allocation table (FAT), and FAT32. In general, stored memory is designated as "storable" and "retrievable archival." All three file system types are supported on x86 computer systems.

Virtual memory is defined as dynamic or temporary. Physical memory, known as random access memory (RAM), combines with temporary disk storage. For example, if a process requires more memory than is available from the system's RAM, the hard drive is used to temporarily store process data. It uses a set of temporary registers where information about processes is stored during execution. This is known as paging.

Stored Memory and File System Basics

Windows Server 2003 supports three file systems, NTFS, FAT, and FAT32, each of which has unique characteristics. For base-level security we have already established the clear advantage of native NTFS. However, under some circumstances, such as a need to switch between older Windows versions and Windows Server 2003, the FAT file system is necessary. FAT32 is an expanded version of FAT that allows larger disk partitions and is used primarily in the Windows 98 operating system. The relative merits of the three file systems are examined in detail in Chapter 14, but a brief review is appropriate at this stage.

THE FILE ALLOCATION TABLE: FAT AND FAT32

For the sake of this discussion, FAT and FAT32 are viewed as the same system except where specifically noted.

A file allocation table, FAT, is a simple file system that dates back to the days when the 5 1/4-inch floppy drive was the default medium and a 10-MB hard drive was an expensive luxury. In many cases, a system administrator may install Windows Server 2003 using FAT because of legacy MS-DOS or Windows 3.x applications that simply have not been updated to take advantage of Win32 functionality. FAT32, introduced to support Windows 98, is simply an extension of FAT with additional 32-bit application support.

A number of limitations, such as reduced security, are inherent in FAT and FAT32. Even so, these file systems are acceptable for legacy environments. One very nice feature Microsoft has included is the ability to convert the file system from FAT to NTFS (but not vice versa) when appropriate. This is accomplished by invoking the convert command from the Virtual DOS Machine with the following syntax:

CONVERT [drive:] /fs:ntfs [/nametable:filename]
Where filename is the name of file that is created during the
conversion process that contains a name translation table for unusual
filenames.

The file allocation table includes the following basic information about a file:

In the context of file storage on a disk or partition, the FAT hierarchy is very simple (Figure 2.18). The first sector contains the machine BIOS block followed by the file allocation table and a duplicate image. The root directory is the first set of information visible to a user. Individual files are stored in the root directory or in created subdirectories.

Figure 2.18. Disk Structure of the FAT File System

graphics/02fig18.gif

THE NTFS FILE SYSTEM

NTFS was introduced with Windows NT 3.1 as an outgrowth of the original OS/2 High-Performance File System (HPFS). With the introduction of Windows NT Server 4.0, the NTFS file system has taken a giant leap forward in terms of stability and flexibility. It boasts numerous advantages over the FAT file system, including the following:

NOTE

Windows Server 2003 tightens the security of NTFS by providing only the administrator the right to write to the root directory. In previous versions, Everyone has full control in the root directory. The tightened security also prevents anyone other than administrators from modifying files in the root directory that were created by other users.


The NTFS file system maintains a number of key files that should not be removed or unnecessarily modified. Table 2.2 summarizes several of the most important keys.

Table 2.2. NTFS Files

File

Description

$

Root directory name

$Bitmap

Bitmap representation used by MFT for tracking volume contents

$Boot

Boot file listing bootable volumes

$Mft

Master File Table (MFT)

$MftMirr

MFT mirror

$Volume

Volume name and version information

NTFS Version 5 Differences

The Windows Server 2003 implementation of NTFS is version 5, which differs in a number of ways from the NTFS used in Windows NT for versions before Service Package 4. It is not backward compatible. Rather, during installation, if NTFS 4.0 is detected on a disk, it is upgraded to version 5.

One of the principal differences between NTFS version 5 and earlier versions is that NTFS 5 can undertake something akin to symbolic linking through the use of reparse points. The reparse point is 16 KB of data that takes the form of a tag that identifies the device driver. When a Windows Server 2003 NTFS process sees a reparse point tag, it redirects the action to the defined device driver. A symbolic link is a special type of reparse point used to redirect the NTFS process to a specified file or directory.

NTFS 5 has a useful link-tracking facility. Anytime a linked item is moved anywhere within the same domain, the link is tracked and remains intact.

NTFS 5 also supports disk quotas. These quotas are important because they permit regulation of disk usage. The specific management of disk quotas is discussed in Chapter 14.

Another important enhancement with NTFS 5 is support for the Encrypting File System (EFS). When a user wants to encrypt a file, a file encryption key (FEK) is generated. The Windows Server 2003 EFS uses an extended variant of the Data Encryption Standard algorithm (DESX).

NTFS 5 expands support of the CD-ROM File System (CDFS) that was based on a read-only principle. It now supports the Universal Data Format (UDF), which is emerging as the DVD-ROM format.

Finally, NTFS 5 supports FAT32 drives. Windows NT should not interpret FAT32 partitions or drives, nor can it boot from a FAT32 partition. Windows Server 2003 NTFS overcomes both of these limitations.

FILE OBJECTS IN THE NTFS FILE SYSTEM

NTFS boasts a relational database structure that uses B-trees to organize and stream file object management. Microsoft publishes precious little information about the internal structure of this database, known as the Master File Table (MFT), although it is the first line in an NTFS partition. The MFT is in a mirrored format for redundancy. Pointers from the boot sector describe the location of the MFT and its mirror.

Think of the MFT as the trunk of the B-tree in which small files and directory data are stored in residence (Figure 2.19). Large files and directories are stored as nonresident in extents (branch extensions) or runs (runners). Nonresident data can cross multiple extents or runs.

Figure 2.19. A Simplified View of the MFT Structure

graphics/02fig19.gif

File and directory objects are similar in structure and use the same form for defining information sometimes known as metadata; however, their back ends differ. The NTFS treats directory objects as a special form of file object. Both files and directories contain standard attributes, a file name, and security descriptors (Figure 2.20). Files also include raw data that is otherwise not managed by the operating system. The directory object holds indexes of the relative location and size of the directory, plus a bitmap representation of the directory structure. The term bitmap does not refer to the kind of bitmap graphic commonly known to any PC user; here the bitmap is utilized by the database as a kind of road map depiction of the structure.

Figure 2.20. The NTFS View of Files and Directories

graphics/02fig20.gif

File names follow a specific convention depending on the file system; FAT has an 8-character maximum with a 3-character extension (8.3) and NTFS has a maximum of 255 characters. Directories are separated in all cases with the backslash (\). Windows NT directories are similar to UNIX directories in that they are a special form of file object that merely maintains information about the files they manage.

The NTFS database structure facilitates system recovery, which is not available with the file allocation table. NTFS's transaction database methodology employs a logging process to initiate disk-writing instructions. Data enters cache memory, where it is then directed to the VMM for background or lazy writing to disk. The VMM sends the data to the fault-tolerant driver (assuming the existence of a RAID structure), which then attempts to physically write to the drive. If it is successful, the transaction in the database is released. If not successful, the record of the logged process is retained in the transaction table until restoration.

The Virtual Memory Manager and Paging

Windows Server 2003 uses a flat 32-bit virtual and linear memory scheme, reserving half of the capacity for system resources and half for applications. It allows tuning of addressable memory for applications, which was unavailable to Windows NT. For information on how this is accomplished for your version of the operating system, examine the Help files. The VMM allocates each process an address space, which is then mapped to physical memory in 4-KB pages (Figure 2.21). As memory is required, the system swaps between physical memory (hardware RAM) and pageable memory stored on the hard drive.

Figure 2.21. Virtual Memory and Paging

graphics/02fig21.gif

The VMM provides memory mapping through a table that defines virtual addresses. It also regulates the paging process—the movement from physical to disk memory. The area on a disk drive where paging occurs is known as the pagefile, the proper sizing of which can be critical to overall system performance. By default, Windows Server 2003 sets up a pagefile equal to the amount of installed RAM plus 12 MB (unless the available disk space is less than that formula). The minimum pagefile size is 2 MB. Since hard drive space is relatively inexpensive, we recommend expanding the pagefile if system performance becomes an issue.

Pagefile size is changed in the following steps after you log on as the administrator: Open Control Panel double-click the System icon select Advanced System Properties click Performance click Change if multiple drives are listed in the Drive box, select the drive containing the pagefile in the Initial Size box, increase or decrease the amount click Set click OK to close the Virtual Memory box click OK on the Performance Options box click OK on the Systems Property box. The computer must be restarted for the change to take effect.


  Previous section   Next section
Top