virtual memory and windows paging concepts
TRANSCRIPT
-
8/2/2019 Virtual Memory and Windows Paging Concepts
1/7
A SMALL OVERVIEW OF SYSTEM
VIRTUAL MEMORY AND WINDOWS
PAGING CONCEPTSA SMALL OVERVIEW OF SYSTEM VIRTUAL MEMORY AND WINDOWS PAGINGCONCEPTS
Computer performs and completes its operations with help of memory. There are two types of
memory available in the physical system. They are,
Random Access Memory (RAM ) Main Memory
Virtual Memory
Random Access Memory is the physical chip that is located in the hardware of the system that can
act as a memory location. This is the part of Primary storage device of the system. The data cannot
be permanently stored in chip. All datas will be erased as soon the Physical system gets poweredoff. The memory can also be called as Main Memory.
Virtual Memory is a stimulation of physical RAM and is stored in the secondary storage of the
system. Hard disk will act as a secondary storage for the system. This technology helps to extend
additional memory capacity and work with RAM to load applications. The virtual memory will
reduce the cost of expanding the capacity of physical RAM. The implementation of virtual memory
will diff for operating systems, but the basic concept is same.
If an application opens it first load the data into the free address locations of the RAM (physical
memory) and the processor communicates with the RAM to fetch the data for the further
processing. As RAM is a physical memory location, the speed for the communication, storage
function and its process are very fast compared to the virtual memory. The virtual memory workswith the help of secondary storage device and its speed is low compared to the physical storage
location (RAM).
Consider a scenario that a system is not configured with virtual memory and is only using the
physical memory to complete its works. Such a configuration cannot handle multitasking or
multiprocessors. If we open one application it will be loading into the available free space of the
RAM and hence there will be no space available to load the second application. The second
application needs to wait until the first applications to be closed free up the RAM space. By
implementing additional RAM for the system will create room for the second application to occupy
the RAM space, but is required additional cost. There will also be a limitation to install the physical
RAM on the physical system.
To overcome the situation scientists developed the virtual memory method, where the less or not
frequently used data from the RAM will be moved to the Hard disk virtual memory location and
thus free space in RAM for the processing of the new data. If an application requires a data that is
stored in the virtual memory, it is then transferred back to the RAM for the process. Paging is an
important part of the virtual memory implementation that in most contemporary general-purpose
operating systems, allowing them to use disk storage for data that does not fit into physical random-
access memory (RAM).
An adequate amount Memory is needed for the smooth and reliable functioning of the Operating
system. The RAM and virtual memory is added together to give the total memory size for the
system. The applications that are requires heavy memory module for their functioning only see thetotal allocated memory size of the system.
The movement of data from RAM to virtual memory and vice versa is called ad thrashing. The data
-
8/2/2019 Virtual Memory and Windows Paging Concepts
2/7
follow is taken care automatically by the operating system without manual intervention. This
transfer of data will create slowness in the performance of the operating system. We can analysis the
data transfer from the continuous blinking of Hard disk LED or we can understand it from the noise
from the Hard disk head movement through the platter.
In Windows, virtual memory uses Paging.sys file to process its operations. By default the Pagefile
is located in the root directory of the operating system. We can tweak the performance of the
pagefile using the Windows Advanced virtual memory setup. This can be access from,
My Computer -> Properties -> Advanced -> Settings -> Performance Options -> Advanced ->
Change
System Managed
Windows default configuration for the paging file size is to automatically expand its size, but it will
consume more hard disk space in case if the application crashes, more utilization of virtual memory
or due to memory leaks. This functionality also causes heavy fragmentation of the data that is
written in the paging file, as it expands without limit. The result will be slowness in the
http://www.techiesweb.com/wp-content/uploads/2011/05/clip_image003.jpghttp://www.techiesweb.com/wp-content/uploads/2011/05/clip_image001.jpg -
8/2/2019 Virtual Memory and Windows Paging Concepts
3/7
performance of the operating system.
These settings also have an advantage that, the operating system can automatically increase the
paging file when required without the interaction of the Administrators. This helps to reduce
slowness of the system in time of heavy usages.
http://www.techiesweb.com/wp-content/uploads/2011/05/clip_image004.jpg -
8/2/2019 Virtual Memory and Windows Paging Concepts
4/7
The System Managed size can be set by selecting the radio button to the System Managed Size tab.
Thus system will take control of the paging file and thus increase or decreases its usage accordingly.
Custom Size
The custom settings will limit the growth of the paging file size. In normal condition to tweak the
performance of the system and the usage of the hard disk space we use custom settings.
The recommend custom setting for the paging file configuration is to set the Initial size as 1.5 times
larger of the total physical memory of the system and the Maximum size is 2.5 times larger of the
total physical memory.
Locking of the paging file size will helps to make a control on the hard disk capacity. If the system
primary partition is not having a sufficient amount of space, setting a limit is very useful.
http://www.techiesweb.com/wp-content/uploads/2011/05/clip_image005.jpg -
8/2/2019 Virtual Memory and Windows Paging Concepts
5/7
No Paging File
This setting will not create a paging file in the system and thus virtual memory mechanism will notbe functioning for the particular operating system.
The functionality can also be used to reconfigure the paging file from one disk drive to another eg:
C drive to D drive.
http://www.techiesweb.com/wp-content/uploads/2011/05/clip_image006.jpg -
8/2/2019 Virtual Memory and Windows Paging Concepts
6/7
Notes:
We cannot leave the paging file configuration blank for the primary boot partition. The partitionfrom where the Windows operating system boots because to create a memory dump file during the
time of operating system crash a small amount of paging file to be configured in the primary
partition. The crash report is first written into the paging file and on the first booting after the
operating crash the recorded data is written into memory dump file memory.dmp.
The paging file settings for an operating system is purely depends on the operating system,
applications that running, the total amount of physical memory, mode of implementation etc.
Defragmentations tools can be used to keep arrange of the fragmented paging file blocks in the
hard disk and thus improve the system total performance. The tools such as PageDefrag are used for
the defragmentation of the paging file.
The data which are written in the paging file is in unencrypted format. There are tools available forencrypting the data that are writing on the paging file eg: TrueCrypt Free Open-Source Disk
Encryption tool.
The paging file configurations can be located from the registry location (Start->Run->regedit),
editing the values will change the present paging file configuration.
Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SessionManager\Me
mory Management
http://www.techiesweb.com/wp-content/uploads/2011/05/clip_image007.jpg -
8/2/2019 Virtual Memory and Windows Paging Concepts
7/7
Paging file will be emptied at the time of normal reboot and all the written contents in the Pagefile
(pagefile.sys) will be get cleared. If you need not want the pagefile to be cleared, we need to set that
in the registry value ClearPageFileAtShutdown.
The paging file settings cannot be applied soon as we set the configurations; it required a system
reboot to implement the paging file settings.
http://www.techiesweb.com/wp-content/uploads/2011/05/clip_image008.jpg