Windows Vista virtual memory
By English word meaning, the word "Memory"
is "Something which is remembered", which
means the ability to recover or rediscover something
from past occurrences, events.
Primary and Secondary memory
In Computer Science, the word memory has the same meaning.
But, instead of remembrance, we call it as a place where
the programs get loaded and stored. There are two types
of memories, according to computer terminology namely,
Primary and secondary memory. The programs get loaded
and executed through primary memory i.e. RAM. The contents
in the RAM (Random Access Memory) get erased. When the
computer is switched off, rebooted, program ends its
execution. After a program gets terminated, the content
of program is removed from the RAM. In case of secondary
memory, the contents will not get erased unless we tell
the computer to do so. The contents in the secondary
memory will remain as it is, even if the system is switched
off.
What we saw till now, is the basics of memory management,
which a computer professional knows. We will come to
our topic now. Before, we see the main topic we need
to know what virtual memory is.
Expand the main memory logically, not physically
The primary memory in the system is too small to be
used, when the computer executing more than one program
at a time. For example, we keep open MS-Word application
and open MS-Excel application program simultaneously.
This concept is called Multiprogramming, which means
executing more than one program at the same time concurrently.
As said above, the memory is insufficient for the programs
to get executed. In this case, additional primary memory
is required to be added to the system. Purchasing additional
memory proved to be too expensive, in terms of cost.
So, researchers developed a strategic technique to expand
the main memory logically, not physically.
Virtual memory is a logical extension of main memory
Therefore, Virtual memory is a logical extension of
main memory. The physical memory is too small and also
is very expensive. But, some programs require higher
memory than the available amount, especially for the
multiprogramming environment. Whenever, the program
exceeds the total capacity, the memory management writes
some block of program on to the secondary storage device,
such as hard disk. Whenever a particular block is needed
for execution, the block in memory, which has finished
execution (This depends on the type of algorithms, they
follow.) is exchanged with a block which is kept in
the Hard disk. This is the basic concept behind Virtual
Memory system.
Secret behind Win386.swp & pagefile.sys
The block in the disk is kept in a file. This file in
Windows 3.1, Windows 95, 98, 98SE, ME was Win386.swp
and was supposed to be located in the folder where Windows
was installed. From, Windows XP on, this file has been
renamed to pagefile.sys and stored in root directory
of the partition where the Windows is installed.
SuperFetch extension of Demand Paged System
There are several tools which makes use of this unique,
interesting and challenging concept. Among them is the
SuperFetch. SuperFetch is the extension of a concept
called Demand Paged System, which is used mostly in
Windows during mid 90’s. The Demand Paged concept
was originally developed by David Cutler, was later
acquired and used by Microsoft when the company hired
Cutler.
Normally when the system is being shutdown, the contents
of RAM are stored into the virtual memory file in the
disk. The Superfetch goes beyond this concept, extends
this model such that, when the computer gets started
(Booting) again, it retrieves the pages from the disk,
which is likely to be utilized mostly by the applications,
loaded into memory, even before the user’s common
program gets started. Thus, programs get executed within
short period of time, which in turn speeds up the system.
The decision of removing pages in memory will be taken
by memory management after looking into history, which
the SuperFetch maintains for each page. One can store
pages in USB flash drives instead of system’s
hard disk. One needs to wait to see how better the USB
flash drives are used in Windows Vista.
Windows Vista Hibernate
Another mechanism in Windows Vista that makes use of
Virtual Memory concept is Hibernate. This is similar
to SuperFetch, saves the entire memory content into
the secondary storage during shutdown. This process
creates a file called hiberfil.sys. When the system
is switched on, after hibernation, the contents of memory,
stored, gets loaded from this file. Thus, in hibernation,
when the computer restarted, the desktop is restored
to previous old state. For example, Suppose, if you
have left MS-Word opened, during the shutdown with hibernation,
you will get back the word opened, when you restart
windows. For hibernation you must have a free disk space
which is as same as the system RAM. For example, if
you have 256 MB of RAM in your system, then you must
have 256 MB of hard disk space, in order to enter into
hibernation mode.
Virtual Memory concept helped to develop not only Windows
Vista, but also, almost all previous versions of Windows.
This concept is the backbone of Windows as large amount
of memory is needed to work with Windows Applications
including games, playing multimedia contents, all other
softwares. |