What is the difference between virtual memory and physical memory




















When the power is turned off, all the data in the RAM are lost and the operating system and other data are loaded again to the RAM from the hard disk when the computer is turned on. Hard disk is a non-volatile memory a memory that keeps data even when it is not powered that is used to store data in a computer. It is made up of circular disks called platters that stores magnetic data. Virtual memory is used when the computer lacks the RAM space for executing a program.

Virtual memory combines the RAM space with the hard disk space. When the computer does not have enough RAM space to execute a program, the virtual memory transfers data from the RAM to a paging file, which frees up the space in the RAM.

A portion of the hard disk is used to store the page file. This transferring process is done so rapidly so that the user does not feel a difference.

Virtual memory can hold an entire block of data while the part that is currently executing resides on the RAM. Physical memory is the primary memory that has the currently executing programs. On the other hand, virtual memory extends the capacity of the main memory to execute large programs using the hard disk. What is Physical Memory — Definition, Functionality 2.

What is Virtual Memory — Definition, Functionality 3. Physical memory refers to the RAM or the primary memory in the computer. Physical memory is a volatile memory. Therefore, it requires a continuous flow of power to retain data. However, power failures and interruptions can erase the data in the physical memory. Also, this memory is linearly addressable.

In other words, the memory addresses increases in a linear manner. The CPU can directly access the physical memory. It holds programs on the execution lineup. Usually, the hard disk stores the programs. It requires more time for the CPU to access the hard disk always to execute programs. A process termed swapping is used to exchange data via virtual memory. The use of virtual memory makes it appear that a computer has a greater RAM capacity because virtual memory allows the emulation of the transfer of whole blocks of data, enabling programs to run smoothly and efficiently.

Instead of trying to put data into often-limited volatile RAM memory, data is actually written onto the hard disk. Accordingly, the size of virtual memory is limited only by the size of the hard disk, or the space allocated to virtual memory on the hard disk. When information is needed in RAM, the exchanges system rapidly swaps blocks of memory also often termed pages of memory between RAM and the hard disk.

Modern virtual-memory systems replace earlier forms of physical file swapping and fragmentation of programs. In a sense, virtual memory is a specialized secondary type of data storage, and a portion of the hard drive is dedicated to the storage of specialized virtual-memory files also termed pages.

The area of the hard drive dedicated to storing blocks of data to be swapped via virtual memory interface is termed the page file. In most operating systems, there is a preset size for the page file area of the hard disk, and page files can exist on multiple disk drives. Users of most modern operating systems can, however, vary the size of the page file to meet specific performance requirements.

As with the page file size, although the actual size of the pages is preset, modern operating systems usually allow the user to vary the size of the page. Virtual memory pages range in size from a thousand bites to many megabytes.

The use of virtual memory allows an entire block of data or programming e.



0コメント

  • 1000 / 1000