Virtual memory

Virtual Memory is a way of managing memory which is a recent trend of technology used in computers. Hardware (the physical part of the computer, such as the CPU or graphics card) runs software. This software will need computer memory to run, and do what it needs to do. Most computers in use today can do more than one thing at a time, they run more than one application. This is known as multiprocessing. 

In this case, all the programs or applications that are running on the computer at a time share its resources. A computer does not have more processors or main memory (RAM) just because more programs run on it.

Virtual memory is the idea that the application sees a block of memory of a given size. The application can use this memory as it sees fit. This block of memory is virtual in the sense that it comes from different parts. Some of it may be in the main memory of the computer, but some may also be on disk. The CPU has a special part, called Arithmetic Logic Unit which does some of the translations between application memory and system resources. Modern operating systems also do a part of this work.

When a program tries to access a block of memory that is not in system memory, that program is stopped, and the block is loaded into system memory. What was in that part of the system memory is written to disk. This is usually called paging.

Certain computer systems, such as  embedded systems, do not use virtual memory, because they need a very fast response time, or one that always stays the same. One of the problems is that with virtual memory it is difficult to predict the response time. An application that uses a part of memory which needs to be loaded from disk will have a different response time from one that does not. Therefore, virtual memory concept is not used in embedded systems. 

Category:Computer science