Navigation



Resource Management

Windows is a resource manager and treats everything in the computer, including memory, video, serial ports, and sound, as resources. Windows manages resources through device drivers. Applications consume resources and must request access to any resource form Windows by using subroutines called the application programming interface (API). Applications can also use a dynamic-link library (DLL) file to address the Windows operating system directly. DLL files store subroutines that either come with the compiler that created the application or are created by the programmer, and always end with the .dll extension.

RAM is the most important resource that the operating system must manage. In Windows, when a program starts, it loads what is called a stub in conventional memory. This stub makes a request to the operating system for RAM. The operating system then allocates the amount of RAM if it is available. This area of RAM is known as a segment, and its location is stored in a heap. Once loaded, a program can ask for resources as required, as long as the requested resources are available. Windows can provide more functional memory than the available RAM by using what is called virtual memory, i.e., the swap file, or the paging file in Windows XP, on the hard disk drive. When an application needs more memory than is available, the Memory Pager moves blocks data from RAM to virtual memory, i.e., the swap file, on the system's hard disks. This frees up the RAM but the hard disk drive is much slower than RAM. To compensate for this lack of speed, Windows prioritizes programs and caches the less frequently programs to the hard disk drive. In Windows 95 the user must set the amount of hard disk space to be used and must specify whether it is to operate in 32-bit mode but Windows 98 automatically adjusts the size of the swap file and the way virtual memory is allocated when physical memory becomes low.

Later versions of Windows overcomes the problem of having to reset the CPU to run an MS-DOS program by running what is known as virtual 8086 mode, an extension of 386 protected mode that allows for the creation of virtual 8086 machines. A virtual 8086 machine is a segment of RAM that operates as if it is an 8086 computer. Windows will run itself in one virtual machine (VM) and allocate another VM to a MSDOS program. Because Windows can run several VMs, it also overcomes the limitations of running only one MS-DOS program at a time.


Untitled Document  

Advertisement