Solution for the difference between virtual and physical memory

August 03, 2020 by Louie Sharp


Hope that if you have any difference between virtual and physical memory on your computer, this guide can help you.



Virtual memory is an area of ​​secondary storage space in a computer system (such as a hard disk or solid state drive) that behaves as if it were part of the main memory or system storage. ,

Ideally, the data needed to run applications is stored in RAM, where the processor can quickly access it. However, when large applications are running or many applications are running at the same time, the system RAM may become full.

To work around this issue, some data stored in RAM that is not actively used can be temporarily moved to virtual memory (physically located on a hard drive or other storage device). This frees up space in RAM, which can then be used to store data that the system must immediately access.

By exchanging data between RAM and virtual memory when not needed, and returning it from virtual memory to RAM when needed, the system can continue to run with much lower costs. physical memory than you would otherwise need.

Virtual memory allows the system to run large applications or multiple applications simultaneously without running out of memory. Specifically, the system can operate as if its total RAM resources were equal to the amount of physical RAM plus the amount of virtual RAM.

Why Do I Need Virtual Memory?

Virtual memory was developed when physical RAM was very expensive and RAM is always more expensive per gigabyte than storage media like hard drives and solid state drives. For this reason, using a combination of physical and virtual memory is much cheaper than equipping a computer system with more RAM.

difference between virtual and physical memory

Since using virtual memory (or increasing virtual memory) does not require additional financial costs (since it takes up available space), it allows the computer to use more memory than is physically available on the system.

Another key factor in using virtualFree memory is that the amount of physical RAM that can be installed is limited in all computer systems (depending on hardware and software). By using virtual memory, the system can continue to operate outside of these physical RAM limits.

Virtual Memory Versus Physical Memory

Since RAM is more expensive than virtual memory, computers should - under the same conditions - have as little RAM as possible and as much virtual memory as possible.

In fact, the properties of virtual memory are different from those of physical memory. The main difference between virtual and physical memory is that RAM is much faster than virtual memory.

Thus, a system with 2 GB of physical RAM and 2 GB of virtual memory does not provide the same performance as a similar system with 4 GB of physical RAM. To understand why, you need to understand how virtual memory works.

How Does Virtual Memory Work?

When an application (including the operating system) is running, it saves the location There are program streams and other data in the virtual address, while the data is actually stored. in RAM at a physical address. If this RAM space is urgently needed later by another process, the data can be moved from RAM to virtual memory.

It is the responsibility of the computer's memory manager to keep track of all this data when exchanging physical and virtual memory. The memory manager maintains a table that maps the virtual addresses used by the operating system and applications to the physical addresses where the data is actually stored. When data is exchanged between RAM and virtual memory, the table is updated so that a particular virtual address always points to the correct physical location.

A computer can only run threads and modify data stored in RAM, not in virtual memory. You should not neglect the exchange of necessary data in the working memory. As a result, virtual memory usage is associated with performance degradation.

In other words, a system with 4 GB of RAM will usually perform better than a system with 2 GB of RAM and 2 GB of virtual memory, as replacement affects performance. For this reason, it is called virtual memory slower than main memory.

One potential problem with virtual memory is that if the system has too little RAM in relation to the amount of virtual memory, the system can spend most of its CPU resources on communication. Meanwhile, the work of useful labor almost stops - a process called beating.

To avoid brute-force, you usually need to reduce the number of concurrent applications or simply increase the amount of RAM in the system.

Operating systems, like most versions of Windows, usually advise users not to increase virtual memory more than 1.5 times the amount of available physical memory. A system with 4 GB of RAM must have no more than 6 GB of virtual memory.

To minimize the performance degradation caused by switching between physical and virtual memoryIn memory, it is best to use the fastest storage device attached to the system to allocate virtual memory and determine storage space. virtual memory on its own partition.

How To Increase Virtual Memory On The System

Types Of Virtual Memory: Paging And Segmentation

The virtual memory on a system can be managed in a variety of ways. The two most common approaches are pagination and segmentation.

Virtual Swap Memory

On a paging system, memory is divided into several blocks, which are typically 4 KB in size and are called pages. The processes are then allocated enough pages to cover their storage needs. This means that a small amount of space is always wasted, except in the unusual case where the process requires exactly a few pages.

During normal operation, pages (that is, 4 KB blocks of memory) are swapped between RAM and a page file representing virtual memory.

Virtual PC Segmentation memory

Segmentation is an alternative approach to memory management in which processes are assigned segments of varying lengths instead of fixed pages to meet their exact needs. This means that, unlike an outsourcing system, memory is not wasted in the segment.

Segmentation can also divide applications into logically independent address spaces, making them easier to share and more secure.

Why is virtual memory bigger than physical memory?

One problem with segmentation, however, is that each segment has a different length and therefore can lead to "fragmentation" of memory. This means that small blocks of memory that are too small to be useful may remain scattered when allocating and unmapping segments.

As these small blocks are created, fewer and fewer segments of usable size may be allocated. And when the operating system starts using these small segments, a large number needs to be tracked and each process has to use many different segments., which is inefficient and can reduce performance.

Advantages And Disadvantages Of Virtual Memory

Although RAM is now relatively inexpensive compared to the cost of developing virtual memory, it is still extremely useful and is still used in many, perhaps most, computer systems. The main issue with virtual memory is performance.







Related posts:

  1. Blue Screen Of Death Windows 7 Physical Memory Dump

    How to fix a blue screen kernel dump The blue screen dump is an error screen that appears just before the system reboots because the operating system stops working properly for various reasons and the memory contents are saved in the data file. This is a common problem that mainly occurs on different versions of the Windows operating system and is commonly known as Blue Screen of Death (BSoD). Blue Screen Dump Fix refers to fixing an error displayed on the screen. It is sometimes difficult to find a specific error based on the information displayed on ...
  2. Microsoft Fix Low Virtual Memory

    What does the "Not enough memory in Windows 10" error mean? This means your Windows resources are being used for some reason. This can be a problem, because in this case all open programs may not work correctly and freeze. You may not be able to save an open work. There are a number of reasons for this, but don't worry. We can solve this problem. Not enough memory in Windows 10 The easiest and fastest way to solve this problem is to press the "Ctrl + Alt + Del" keys at the same time to launch ...
  3. Virtual Memory Too Small

    Windows is full of annoying little bugs, and "Out of virtual memory" is one of them. Usually your computer freezes first. Then an error pops up indicating that your virtual memory is too small. In this article, we will explain the causes of this error and how to fix it once and for all. What is virtual memory? Virtual memory, also known as a paging file, is a file on your hard disk that Windows uses in addition to physical memory (RAM) as needed. For example, if you are running an application or process that cannot handle ...
  4. How To Increase Windows 7 Virtual Memory For Games

    Parent of an article written by his teammate Josh Carrier in 2010. I thought it was time to rethink the process of increasing virtual memory on your workstation. We often use this technique when trying to improve the performance of systems where SOLIDWORKS is having trouble importing or exporting geometry or handling large assemblies. We're essentially raising the limit and giving the operating system the extra wiggle room it needs to maneuver when physical memory gets low. Virtual memory is used only when the system's physical memory is exhausted and the system needs additional information. One ...
  5. What Is The Difference Between Linux And Unix Kernel

    Thank you very much Mr. Mayer for your comments. I appreciate you reading the article. Please read my views below: ============================================== ====== ==================== @ Macus Mayer > What you write is true, but misleading. What for? You say there are some exceptions in Unix-like kernels that follow the microkernel approach, but you are not giving examples of microkernel operating systems (NeXTStep and Mac OS X would be such operating systems). By the way). All the operating systems you mentioned (from Sys V to Solaris) use the same Linux: a monolithic kernel, so it is not unique to Linux. ...
  6. Difference Between Antivirus Internet Security Firewall

    In the previous article, we explained the difference between Kaspersky Total Security and Kaspersky Internet Security. Now let's compare Kaspersky Internet Security and Kaspersky Anti-Virus. Kaspersky Anti-Virus provides basic security for your computer. Features include scanning your software and files for viruses, monitoring activity, scanning for vulnerabilities, and monitoring internet traffic. The set of security tools in Kaspersky Internet Security is more extensive. The aforementioned functions are extended with a number of other useful tools. Firewall This provides secure access to your local network and the world wide web. You can define rules for each ...
  7. Where Is Virtual Directory In Windows 7

    Because WinXP hosts work with directly mounted NTFS partitions, regardless of whether they are on the same hard drive or on different decks. This way I can store application data on external media and only have one copy for more than one PC, so no sync etc. is needed. Of course, it is only displayed by one PC at a time. With the VHD / VHDX trick, you can also use dynamic memory so you don't have to worry about Gio size: And $ MFT has a trick to keep it as small as possible (very ...
  8. Error 1056 Virtual Driver

    This issue has been fixed. The update was first introduced in a special version of Receiver 3.4 CU2. This update was also included in version 4.x of Receiver for Windows released on June 26, 2013. This issue has also been fixed in HDX RealTime 1.4.200 Optimization Pack. This update is also included in version 1.5 and all later versions of the HDX RealTime Optimization Pack. Solution 1 Note. If this error persists, the receiver installation may be damaged. If you need to reinstall, follow these steps: Solution 2 If solution 1 does not solve ...
  9. Hardware Malfunction Nmi Parity Check Memory Parity Error Windows 7

    I have a Dell Inspiron E1705 laptop Win XP Pro, SP3. I have 2 memory modules, each with 1 GB totaling 2 GB of RAM. He also has a special graphics card: NVIDIA GeForce Go 7800 (which has been replaced with NEW cards of the same model TWICE after being blown out due to fan failure) The system worked without problems for several years, until August 30, 2010, audio and video were temporarily interrupted (several times per second) until the system hung - this was during what I watched the video. via Adobe FLASH Reader. 1.) When rebooting, the ...