CLICK HERE FOR BLOGGER TEMPLATES AND MYSPACE LAYOUTS »

Monday, September 1, 2008

IES070101-amali4

Comparison between Windows and Linux in implements virtual memory:

WindowUNIX/Linux
Window use the term swapping to differentiate from general paging, and call the dedicated secondary store just a page file.
In Linus swapping only refers to virtual memory scope and paging to both. Page in is transferring a page from the disk to RAM. Page out is transferring a page from RAM to the disk. But swap in and out only refer to transferring pages between RAM and dedicated swap space or swap file, and not any other place on disk.
In window the file used for paging is named pagefile.sys. The default location of the page file is in the root directory of the partition where Windows is installed. Windows can be configured to use free space on any available drives for pagefiles. It is required, however, for the boot partition (i.e. the drive containing the Windows directory) to have a pagefile on it if the system is configured to write either kernel or full memory dumps after a crash. Windows uses the paging file as temporary storage for the memory dump. When the system is rebooted, Windows copies the memory dump from the pagefile to a separate file and frees the space that was used in the pagefile.It use the term "swap" to describe both the act of moving memory pages between RAM and disk, and the region of a disk the pages are stored on. It is common to use a whole partition of a hard disk for swapping.Linux supports using a virtually unlimited number of swapping devices, each of which can be assigned a priority. When the operating system needs to swap pages out of physical memory, it uses the highest-priority device with free space. If multiple devices are assigned the same priority, they are used in a fashion similar to level 0 RAID arrangements. This provides improved performance as long as the devices can be accessed efficiently in parallel. Therefore, care should be taken assigning the priorities.
Windows 2000, XP, and Vista offer the DisablePagingExecutive registry setting, which controls whether kernel-mode code and data can be eligible for paging out.

Linux offers the /proc/sys/vm/swappiness parameter, which changes the balance between swapping out runtime memory, as opposed to dropping pages from the system page cache.

Windows makes heavy use of the working set concept. The working set is defined as the amount of main memory currently assigned to the process, so
the working set consists of its pages that are present in the main memory. The size of the working set is, however, not constant. So the disadvantages that
come with working sets are heavily reduced.
Linux used NRU algorithm
for page replacement, but due to the various
shortcomings of the algorithm, they have changed it and implemented an approximate
Windows NT and its variants employ a dynamically allocated pagefile for memory management. A pagefile is allocated on disk, for less frequently accessed objects in memory, leaving more RAM available to actively used objectsMost hard drive installations of Linux utilize a "swap partition", where the disk space allocated for paging is separate from general data, and is used strictly for paging operations.

Reference:

1.http://en.wikipedia.org/wiki/Paging

2.http://www.faqs.org/docs/linux_admin/x1762.html

3.http://gaurang.org/academics/csci555/termpaper2.pdf

4.http://www.experts-exchange.com/OS/Miscellaneous/Q_21365611.html

0 comments: