MEMORY MANAGEMENT UTILITIES


In Chapter 17, you were introduced to the basic DOS memory model and concepts. You should recall that conventional memory is used primarily for programs and applications. Conventional memory encompasses the first 640K of memory used in the DOS memory structure. Expanded Memory Specification (EMS) is extended or reserved memory that emulates conventional memory. It ranges from the top of the 640K barrier to 1024K. The High Memory Area (HMA) utilizes the top 384K of expanded memory in the DOS memory model. The Extended Memory Specification (XMS) is above the HMA. It includes all the memory addresses over 1088K. If you need more information about this structure, refer to Chapter 17 for a refresher.

Several DOS memory management utilities and software drivers organize and make better use of available memory.

  • MEMMAKER is a DOS memory utility program that is run from a DOS command line. It loads device drivers and TSRs into Upper Memory Blocks (UMBs). This helps to free up conventional memory space for programs.

  • HIMEM.SYS is a DOS device driver loaded in the CONFIG.SYS that allows applications to run in extended memory. HIMEM.SYS is also present in Windows 9.x. In fact, both Windows 3x and Windows 9x require HIMEM.SYS for booting up.

  • EMM386.EXE is a DOS memory management utility that opens the door to UMBs so that software drivers and programs can be loaded. EMM386.EXE uses limulation. Limulation is a technique used to translate or change extended memory to expanded memory.

Virtual Memory and Swap Files

A portion of a hard disk that is set aside for a certain range of memory address is referred to as virtual memory. This space on the hard drive acts as a sort of overflow buffer for RAM, or ‘real memory’ as more memory is needed. A process called memory paging is used to create and swap memory addresses in and out of the hard drive’s allocated virtual memory space. The main purpose of virtual memory is to allow the CPU to use hard drive space as memory. The virtual memory manager controls virtual memory. If the virtual memory manager cannot allocate memory requested by a specific application in Windows 9x, a page fault will occur.

Virtual memory space is allocated on a hard drive in two ways: as a temporary swap file and as a permanent swap file.

  • A temporary swap file is hard drive space that is used temporarily for memory overflow. If the computer is powered off, all information in the temporary swap file is lost. In other words, a temporary swap file is considered volatile memory. The original temporary swap file was named WIN386.SWP in Windows 3x.

  • A permanent swap file doesn’t go away when the computer system is turned off. It handles the memory paging process faster than a temporary swap file. The permanent swap file was called 386PART.PAR in Windows 3x.

The procedures for changing virtual memory settings in Windows 9x, Me, NT, 2000, and Windows XP are discussed in their respective chapters (i.e., Chapters 24, 25, 26, 27, and 28).

The Virtual Machine

When you start a DOS session or go to the command prompt from within Windows, the OS actually creates a separate memory space for your session to run in. This is called a Virtual Machine (VM). It was evident in Windows 3x that multitasking was occurring, because the user could open several ‘DOS windows’ or VMs at once.

The most important thing to realize about VMs is that they run in their own protected memory space. This means that if one program running in its own VM fails, other programs running in separate VMs are not affected. In other words, you can open multiple DOS or command prompt sessions. If one of the sessions fails, the other sessions will not be affected. This explains why the core components of an operating system, such as KERNEL.EXE, GDI.EXE, and USER.EXE, are designed to run in a protected memory space—so that they are protected from other programs that may fail.

In Windows 3x, we used Program Information Files (PIFs) to allocate specific amounts of memory to our separate DOS VMs. In newer operating systems, you can still create PIF files and assign properties to VMs.

To display the assigned properties of the MS-DOS prompt in Windows 95, click Start > Programs, right-click the MS-DOS prompt, and left-click Properties. You will see the following tabs: General, Program, Font, Memory, Screen, and Misc. If you click the Memory tab, you will see the conventional, expanded, and extended memory assigned to the DOS VM. If you click the Program tab and select Advanced, the window shown in Figure 23.5 will display. If you are trying to run a DOS application in a Windows 95 environment and receive the message “This Program cannot be run in Windows,” you should make sure that the “Prevent MS-DOS-based programs from detecting Windows” box (also shown in Figure 23.5) is checked for the advanced properties of the DOS prompt properties associated with the application. Click OK twice and run your DOS application again.

click to expand
Figure 23.5: MS-DOS prompt advanced program settings.




The A+ Certification & PC Repair Handbook
The A+ Certification & PC Repair Handbook (Charles River Media Networking/Security)
ISBN: 1584503726
EAN: 2147483647
Year: 2003
Pages: 390

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net