Friday, December 4, 2009

Virtual memory

What is Virtual Memory?

Computer users place great demands on their computers and computing devices today more than ever before. The size and complexity of modern sophisticated computer applications the vast amounts of information that is being stored, shared, and utilized daily requires that large amounts of computer memory remain available so the computer can access and present data in an effective manner.


Virtual memory is a rather ingenious method of harnessing the computer's actual memory capacity and manipulating it using a combination of the operating system and memory hardware capabilities. Data can be temporarily stored and filed for quick access with the operating system acting as the determinant, allowing for smoother operating capacity.

Virtual memory is typically accomplished by using a method called paging. Paging is a simplified term that applies to the way in which a computer chooses to store information according to differing criteria.

Virtual memory is crucial to modern computers because it allows for a large expansion of a computer's otherwise limiting features. Multi-tasking, which is the process of running multiple applications and programs simultaneously on a single computer, relies heavily on virtual memory for smooth and error-free operation.

Virtual memory serves as a supplement to a computer's RAM (Random Access Memory) in that it stores and serves data quickly to meet the immediate needs of a program or application. Disk memory, such as a computer's hard drive, is capable of being much larger but also much slower at being called to action.

The average computer user needs to worry very little about the detailed specifications or mechanisms of their computer's virtual memory. However, over time a computer's hard drive will become cluttered and disorganized due to the computer repeatedly having to find "pockets" of space to use as virtual memory. The disk defragmenter utility is an important maintenance tool that enables the computer to organize stored data in a manner in which it doesn't have to skip around so much to look for it - drastically increasing computer speed and functionality. The recommended schedule for the need of defragmenting a computer's hard drive depends heavily on the amount that it is used. A good rule of thumb for daily users is to run the disk defragmenter about once a month. More frequent computer users may need to perform this maintenance as frequently as once a week.

How Virtual Memory Works?

In essence, the operating system uses a portion of the hard drive as "false memory," or virtual memory, to make applications believe they have more memory to work with than they actually do. Virtual memory begins by the computer comprehending the RAM available to it, then it calculates the amount of hard drive space available and tells the software that there is so much RAM available between the two sources of storage. Therefore, when a word processor looks for room to store information temporarily, the operating system tells it that there is more available than just the memory of the RAM. There is hard drive space for usage that functions logically like more RAM.

http://www.ehow.com/how-does_5005642_how-virtual-memory-works.html


How Virtual Memory Works in Windows?

Sometimes, your computer processes too many programs at once, they will use system resources (specifically RAM) and will slow down your computer. With weak systems, it will cause hanging-up, and will require restarting, then all your unsaved files will be lost. However, you can use this method to get rid of that.

Fortunately, Windows XP is built not only for the hyperspeed computers, so it has a tool which help the weak ones deal with the lack of system resources. It is called virtual memory. Using this, Windows can move data in or out to quicken the work, prevent the RAM from being overloaded, and make the work complete.

http://soft4all.info/how-to/how-to-use-virtual-memory-in-windows-xp/

How Virtual Memory Works in linux?

Nearly every VMM interaction involves the MMU, or Memory Management Unit, excluding the disk subsystem. The MMU allows the operating system to access memory through virtual addresses by using data structures to track these translations. Its main job is to translate these virtual addresses into physical addresses, so that the right section of RAM is accessed.

The Zoned Buddy Allocator interacts directly with the MMU, providing valid pages when the kernel asks for them. It also manages lists of pages and keeps track of different categories of memory addresses.

The Slab Allocator is another layer in front of the Buddy Allocator, and provides the ability to create cache of memory objects in memory. On x86 hardware, pages of memory must be allocated in 4KB blocks, but the Slab Allocator allows the kernel to store objects that are differently sized, and will manage and allocate real pages appropriately.

Finally, a few kernel tasks run to manage specific aspects of the VMM. Bdflush manages block device pages (disk IO), and kswapd handles swapping pages to disk.

Pages of memory are either Free (available to allocate), Active (in use), or Inactive. Inactive pages of memory are either dirty or clean, depending on if it has been selected for removal yet or not. An inactive, dirty page is no longer in use, but is not yet available for re-use. The operating system must scan for dirty pages, and decide to deallocate them. After they have been guaranteed sync’d to disk, an inactive page my be “clean,” or ready for re-use.

http://www.enterprisenetworkingplanet.com/netsysm/article.php/3741281

How Virtual Memory Works in OSX?

Mac OS X, like Linux, supports both swap partitions and the use of swap files, but the default and recommended configuration is to use multiple swap files.[11]



No comments:

Post a Comment