Thursday, January 26

Virtual memory

The purpose of virtual memory is to use the hard disk as an extension of RAM, thus increasing the available address space a process can use. Most personal computers have a relatively small amount ( typically less than 512 MB ) of main memory. This is usually not enough memory to hold multiple applications concurrently, such as word processing application, an e-mail program, and a graphics program, in addition to the operating system itself. Using virtual memory , your computer addresses more main memory on the hard driver.

The easiest way to think about virtual memory is to conceptualize it an imaginary memory location in which all addressing issues are handled by the operating system. The most common way to implement virtual memory is by using paging, a method in which main memory is divided into fixed-size blocks and programs are divided into the same size block. Typically, chunks of the program are brought into the memory as needed . It is not necessary to store contiguous chunks chunks of the program in contiguous of main memory. Because pieces of the program can be stored out of order, program addresses, once generated by the CPU, must be translated to main memory addresses.